master
elf 2 years ago
parent 32a70c5f15
commit 10a5156c54

@ -932,11 +932,9 @@ class NotifyController extends BaseController
* 酷点回调 * 酷点回调
*/ */
public function kd_callback() { 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_INPUT:' . file_get_contents('php://input'));
KDLog::write('NOTIFY_POST:' . json_encode($params));
KDLog::write('NOTIFY_REQUEST:' . json_encode($_REQUEST));
$response = new KDResponse($params); $response = new KDResponse($params);
if (!$response->verify()) { if (!$response->verify()) {

@ -539,7 +539,7 @@ class PayH5Controller extends BaseController{
$notifyUrl = C('PAY_DOMAIN')."/callback.php/Notify/kd_callback"; $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}"; $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"]; $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()){ if($response->isSuccess()){
// 存入pay_url 继续支付 // 存入pay_url 继续支付
@ -874,7 +874,7 @@ class PayH5Controller extends BaseController{
$notifyUrl = C('PAY_DOMAIN')."/callback.php/Notify/kd_callback"; $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}"; $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"]; $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()){ if($response->isSuccess()){
// 存入pay_url 继续支付 // 存入pay_url 继续支付

Loading…
Cancel
Save