Authored by 郝肖肖

微信 支付确认接口

@@ -54,7 +54,15 @@ function jsApiCall(orderCode, jsApiParameters) { @@ -54,7 +54,15 @@ function jsApiCall(orderCode, jsApiParameters) {
54 'getBrandWCPayRequest', 54 'getBrandWCPayRequest',
55 jsApiParameters, 55 jsApiParameters,
56 function (res) { 56 function (res) {
57 - window.location.href = '/home/orders/detail?order_code=' + orderCode; 57 + //发送支付确认
  58 + $.ajax({
  59 + type: 'GET',
  60 + url: '/shopping/pay/wechatPayConfirm?order_code=' + orderCode,
  61 + dataType: 'json',
  62 + success: function (res) {
  63 + window.location.href = '/home/orders/detail?order_code=' + orderCode;
  64 + }
  65 + });
58 } 66 }
59 ); 67 );
60 } 68 }
@@ -156,7 +156,29 @@ class PayController extends AbstractAction @@ -156,7 +156,29 @@ class PayController extends AbstractAction
156 156
157 } while (false); 157 } while (false);
158 } 158 }
159 - 159 + /**
  160 + * 微信支付发送确认
  161 + */
  162 + public function wechatPayConfirmAction()
  163 + {
  164 + $result = array('code' => '400', 'message' => '支付确认发送失败!');
  165 + do {
  166 + if (!$this->isAjax()) {
  167 + break;
  168 + }
  169 +
  170 + $uid = $this->getUid();
  171 + $orderCode = $this->get('order_code', '');
  172 + if (empty($uid) || empty($orderCode)) {
  173 + break;
  174 + }
  175 +
  176 + $result = OrderData::payConfirm($orderCode, 22, $uid);
  177 + } while (false);
  178 +
  179 + $this->echoJson($result);
  180 + }
  181 +
160 /** 182 /**
161 * 选择支付时,时间间隔校验插入 183 * 选择支付时,时间间隔校验插入
162 */ 184 */