From 10a5156c546f9bf906c008e957afa5ff5d61af8e Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Sun, 8 Jan 2023 21:00:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Callback/Controller/NotifyController.class.php | 4 +--- Application/Sdk/Controller/PayH5Controller.class.php | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Application/Callback/Controller/NotifyController.class.php b/Application/Callback/Controller/NotifyController.class.php index 8d0fe52..3caae94 100644 --- a/Application/Callback/Controller/NotifyController.class.php +++ b/Application/Callback/Controller/NotifyController.class.php @@ -932,11 +932,9 @@ class NotifyController extends BaseController * 酷点回调 */ public function kd_callback() { - $params = I('post.'); + $params = file_get_contents('php://input'); KDLog::write('NOTIFY_INPUT:' . file_get_contents('php://input')); - KDLog::write('NOTIFY_POST:' . json_encode($params)); - KDLog::write('NOTIFY_REQUEST:' . json_encode($_REQUEST)); $response = new KDResponse($params); if (!$response->verify()) { diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index 9e7c3c3..b4df446 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -539,7 +539,7 @@ class PayH5Controller extends BaseController{ $notifyUrl = C('PAY_DOMAIN')."/callback.php/Notify/kd_callback"; $backUrl = C('PAY_DOMAIN')."sdk.php/Spend/paycallback/orderno/{$request['pay_order_number']}/user_token/".$this->userToken."/paytype/weixinpay/game_id/{$game_id}"; $body = '消费-' . $request["pay_order_number"]; - $response = KDApi::h5Pay($request['pay_order_number'], $request['price']*100, $notifyUrl, $backUrl, 'ALI_PAY', $body, get_client_ip()); + $response = KDApi::h5Pay($request['pay_order_number'], $request['price']*100, $notifyUrl, $backUrl, 'ALIPAY', $body, get_client_ip()); if($response->isSuccess()){ // 存入pay_url 继续支付 @@ -874,7 +874,7 @@ class PayH5Controller extends BaseController{ $notifyUrl = C('PAY_DOMAIN')."/callback.php/Notify/kd_callback"; $backUrl = C('PAY_DOMAIN')."sdk.php/Spend/paycallback/orderno/{$request['pay_order_number']}/user_token/".$this->userToken."/paytype/weixinpay/game_id/{$game_id}"; $body = '消费-' . $request["pay_order_number"]; - $response = KDApi::h5Pay($request['pay_order_number'], $request['price']*100, $notifyUrl, $backUrl, 'WX_PAY', $body, get_client_ip()); + $response = KDApi::h5Pay($request['pay_order_number'], $request['price']*100, $notifyUrl, $backUrl, 'WXPAY', $body, get_client_ip()); if($response->isSuccess()){ // 存入pay_url 继续支付