From 20f6115765c43a7abe5f38bf16794fb179dc6afa Mon Sep 17 00:00:00 2001 From: zhanggucheng Date: Wed, 5 Jan 2022 17:41:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=8A=B5=E6=89=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/SpendController.class.php | 6 +++- .../Sdk/View/default/Spend/pay_success3.html | 30 +++++++++++++++---- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/Application/Sdk/Controller/SpendController.class.php b/Application/Sdk/Controller/SpendController.class.php index b5530f29..90cc6472 100644 --- a/Application/Sdk/Controller/SpendController.class.php +++ b/Application/Sdk/Controller/SpendController.class.php @@ -294,7 +294,11 @@ class SpendController extends Controller { $pay_where = substr ( $orderno, 0, 2 ); $map ['pay_order_number'] = $orderno; $result = M ( 'Spend', 'tab_' )->field ( "pay_status" )->where ( $map )->find (); - + + $this->assign("paytype", 'platform'); + $this->assign("pay_amount", $result['cost']+$result['deduction_amount']); + $this->assign("goods", $result['props_name']); + $this->assign ( 'paystatus', $result ['pay_status'] ); $this->display ( 'pay_success3' ); } diff --git a/Application/Sdk/View/default/Spend/pay_success3.html b/Application/Sdk/View/default/Spend/pay_success3.html index 4dc2eb00..f20c22eb 100644 --- a/Application/Sdk/View/default/Spend/pay_success3.html +++ b/Application/Sdk/View/default/Spend/pay_success3.html @@ -70,13 +70,21 @@ border: 1px solid #999; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 try{ if(isAndroid){ - window.txyxsdk.getPayResult('succeed'); + if ("{$game_id}" == "256") { + window.txyxsdk.getPayResult('succeed', "{$goods}", "{$goods}", "0", 1, "{$paytype}", parseInt("{$pay_amount}")); + } else { + window.txyxsdk.getPayResult('succeed'); + } }else{ window.webkit.messageHandlers.exchangeResult.postMessage(1); } }catch(err){ if(isAndroid){ - window.mengchuang.getPayResult('succeed'); + if ("{$game_id}" == "256") { + window.txyxsdk.getPayResult('succeed', "{$goods}", "{$goods}", "0", 1, "{$paytype}", parseInt("{$pay_amount}")); + } else { + window.txyxsdk.getPayResult('succeed'); + } }else{ window.webkit.messageHandlers.exchangeResult.postMessage(1); } @@ -100,7 +108,11 @@ var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 try{ if(isAndroid){ - window.txyxsdk.getPayResult('fail'); + if ("{$game_id}" == "256") { + window.txyxsdk.getPayResult('fail', "{$goods}", "{$goods}", "0", 1, "{$paytype}", parseInt("{$pay_amount}")); + } else { + window.txyxsdk.getPayResult('fail'); + } }else{ window.webkit.messageHandlers.exchangeResult.postMessage(0); } @@ -143,7 +155,11 @@ $("#back_success").click(function() { var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 if(isAndroid){ - window.txyxsdk.getPayResult('succeed'); + if ("{$game_id}" == "256") { + window.txyxsdk.getPayResult('succeed', "{$goods}", "{$goods}", "0", 1, "{$paytype}", parseInt("{$pay_amount}")); + } else { + window.txyxsdk.getPayResult('succeed'); + } }else{ @@ -177,7 +193,11 @@ $("#back_error").click(function() { var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 if(isAndroid){ - window.txyxsdk.getPayResult('fail'); + if ("{$game_id}" == "256") { + window.txyxsdk.getPayResult('fail', "{$goods}", "{$goods}", "0", 1, "{$paytype}", parseInt("{$pay_amount}")); + } else { + window.txyxsdk.getPayResult('fail'); + } }else{ if (!Scheme)