From d306bd1f18e0236261dc32759da9c25bda98b1ac Mon Sep 17 00:00:00 2001 From: tping Date: Mon, 1 Mar 2021 16:22:17 +0800 Subject: [PATCH] 1 --- .../Sdk/Controller/PayH5Controller.class.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index c03e8ea5..3337cfe5 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -791,13 +791,17 @@ class PayH5Controller extends BaseController{ $pay['bank_card_type'] = 0; $pay['return_url'] = C('PAY_DOMAIN')."sdk.php/Spend/paycallback/orderno/{$request['pay_order_number']}/user_token/".$this->userToken."/paytype/weixinpay/game_id/{$game_id}"; $heepay = new Heepay(); - $url = $heepay->wxh5_pay($pay); - $request['pay_url'] = $url;//."&tx_client=hideopen"; - $request['merchant_id'] = $pay_info['id']; - $request['merchant_way'] = self::WX_PAY; - $request['main_id'] = $main_id; - - $this->add_deposit($request, 1); + $json_data = $heepay->wxh5_pay($pay); + if($json_data['ret_code'] == "0000"){ + $request['pay_url'] = $json_data['url'] . "&tx_client=hideopen"; + $request['merchant_id'] = $pay_info['id']; + $request['merchant_way'] = self::WX_PAY; + $request['main_id'] = $main_id; + $this->add_deposit($request, 1); + } else { + jsonOutput(0, "支付失败"); + exit; + } }elseif(get_wx_pay_type() == 2){ if($request['code']==1){