Authored by 郝肖肖

微信 支付确认接口

... ... @@ -54,7 +54,15 @@ function jsApiCall(orderCode, jsApiParameters) {
'getBrandWCPayRequest',
jsApiParameters,
function (res) {
window.location.href = '/home/orders/detail?order_code=' + orderCode;
//发送支付确认
$.ajax({
type: 'GET',
url: '/shopping/pay/wechatPayConfirm?order_code=' + orderCode,
dataType: 'json',
success: function (res) {
window.location.href = '/home/orders/detail?order_code=' + orderCode;
}
});
}
);
}
... ...
... ... @@ -156,7 +156,29 @@ class PayController extends AbstractAction
} while (false);
}
/**
* 微信支付发送确认
*/
public function wechatPayConfirmAction()
{
$result = array('code' => '400', 'message' => '支付确认发送失败!');
do {
if (!$this->isAjax()) {
break;
}
$uid = $this->getUid();
$orderCode = $this->get('order_code', '');
if (empty($uid) || empty($orderCode)) {
break;
}
$result = OrderData::payConfirm($orderCode, 22, $uid);
} while (false);
$this->echoJson($result);
}
/**
* 选择支付时,时间间隔校验插入
*/
... ...