diff --git a/Application/Sdk/Controller/BaseController.class.php b/Application/Sdk/Controller/BaseController.class.php index 81b57f1d..d89b100c 100644 --- a/Application/Sdk/Controller/BaseController.class.php +++ b/Application/Sdk/Controller/BaseController.class.php @@ -34,7 +34,6 @@ class BaseController extends RestController{ $a = ACTION_NAME; $data = json_decode ( base64_decode ( file_get_contents ( "php://input" ) ), true ); - if (isset($data['api_ver']) && $data['api_ver'] == 2) { if (!(in_array($c, $this->noNeedGame) || in_array($a, $this->noNeedGame) || in_array($c.".".$a, $this->noNeedGame))) { // 解决在游戏中未退出的用户 user_token 不存在问题 $userToken = M('user', 'tab_')->where(['id' => $data['user_id']])->getField('user_token'); @@ -96,56 +95,6 @@ class BaseController extends RestController{ } } - } else { // 旧版 - - - C(api('Config/lists')); - - if( - !preg_match("/apple_alipay_pay/",GetCurUrl()) - &&!preg_match("/apple_weixin_pay/",GetCurUrl()) - &&!preg_match("/get_alipay_zmxy_return/",GetCurUrl()) - &&!preg_match("/apple_platform_pay/",GetCurUrl()) - &&!preg_match("/notice/",GetCurUrl()) - &&!preg_match("/apple_union_pay/",GetCurUrl()) - &&!preg_match("/test/",GetCurUrl()) - &&!preg_match("/wap_shortcut_pay/",GetCurUrl()) - &&!preg_match("/shortcut_pay/",GetCurUrl()) - &&!preg_match("/android_shortcut_pay/",GetCurUrl()) - &&!preg_match("/wap_shortcut_pay/",GetCurUrl()) - &&!preg_match("/apple_weixin_pay/",GetCurUrl()) - &&!preg_match("/Ipa365/",GetCurUrl()) - &&!preg_match("/user_login/",GetCurUrl()) - &&!preg_match("/platform_coin_deduction/",GetCurUrl()) - ){ - $data = json_decode(base64_decode(file_get_contents("php://input")),true); - - // #判断数据是否为空 - if(empty($data) || empty($data['game_id'])){ - echo base64_encode(json_encode(array("status"=>10,"return_msg"=>"操作数据或游戏ID不能为空")));exit(); - } - $md5Sign = $data['md5_sign']; - unset($data['md5_sign']); - - #获取游戏key - $game_data = M("game","tab_")->alias("g")->field("s.*") - ->where(['g.apply_status'=>1,'g.id'=>$data['game_id']]) - ->join("left join tab_game_set s on s.game_id = g.id") - ->find(); - if(empty($game_data)){ - $this->set_message(0,"fail","游戏不存在或未通过审核"); - } - - if (isset($data['openid'])) // 小程序支付增加参数 - unset($data['openid']); - $md5_sign = $this->encrypt_md5($data,$game_data["access_key"]);//mengchuang DZQkkiz!@#9527 - if($md5Sign !== $md5_sign){ - $this->set_message(0,"fail","验签失败"); - } - - } - - } } diff --git a/Application/Sdk/Controller/SpendController.class.php b/Application/Sdk/Controller/SpendController.class.php index 6ccbfca1..95246c0e 100644 --- a/Application/Sdk/Controller/SpendController.class.php +++ b/Application/Sdk/Controller/SpendController.class.php @@ -386,4 +386,30 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`; exit(); } + public function shortcut_notice() { + $orderno = $_GET ['orderno'] == "" ? $_GET ['out_trade_no'] : $_GET ['orderno']; + + $pay_where = substr($orderno, 0, 2); + $Scheme = file_get_contents ( "./Application/Sdk/Scheme/" . $_GET ['game_id'] . ".txt" ); + $map ['pay_order_number'] = $orderno; + switch ($pay_where) { + case 'SP' : + $result = M ( 'Spend', 'tab_' )->field ( "pay_status" )->where ( $map )->find (); + break; + case 'PF' : + $result = M ( 'deposit', 'tab_' )->field ( 'pay_status' )->where ( $map )->find (); + break; + case 'TB' : + $result = M ( 'balance', 'tab_' )->field ( 'pay_status' )->where ( $map )->find (); + break; + case 'BR' : + $result = M ( 'bind_recharge', 'tab_' )->field ( 'pay_status' )->where ( $map )->find (); + break; + } + $this->assign('Scheme', $Scheme); + $this->assign('status', $result['pay_status']); + $this->display(); + + } + } diff --git a/Application/Sdk/Controller/WapPayController.class.php b/Application/Sdk/Controller/WapPayController.class.php index 20edbcbf..64f2923e 100644 --- a/Application/Sdk/Controller/WapPayController.class.php +++ b/Application/Sdk/Controller/WapPayController.class.php @@ -323,8 +323,8 @@ class WapPayController extends BaseController{ )); //echo "发起支付==》".time()."
"; if ($rsp['responseCode'] == '88') { - sleep(5); - redirect(U('Spend/pay_success',array('orderno' => $payInfo['order_id'], 'user_id'=>$param['user_id'],'game_id'=>$param['game_id'])));exit; +// sleep(5); + redirect(U('Spend/shortcut_notice',array('orderno' => $payInfo['order_id'], 'user_id'=>$param['user_id'],'game_id'=>$param['game_id'])));exit; } else { // 支付失败 redirect(U('Spend/pay_success',array('orderno' => $payInfo['order_id'], 'user_id'=>$param['user_id'],'game_id'=>$param['game_id'])));exit; diff --git a/Application/Sdk/View/default/Spend/pay_way_v1.html b/Application/Sdk/View/default/Spend/pay_way_v1.html index 9d4a1236..098a6b2e 100644 --- a/Application/Sdk/View/default/Spend/pay_way_v1.html +++ b/Application/Sdk/View/default/Spend/pay_way_v1.html @@ -92,12 +92,13 @@ --> - + +
@@ -110,13 +111,13 @@
- + diff --git a/Application/Sdk/View/default/WapPay/wap_shortcut_pay.html b/Application/Sdk/View/default/WapPay/wap_shortcut_pay.html index 64b96cdd..ca30293a 100644 --- a/Application/Sdk/View/default/WapPay/wap_shortcut_pay.html +++ b/Application/Sdk/View/default/WapPay/wap_shortcut_pay.html @@ -11,8 +11,6 @@ - - 支付中心 @@ -185,22 +183,22 @@