|
@@ -3,6 +3,7 @@ |
|
@@ -3,6 +3,7 @@ |
3
|
use Action\AbstractAction;
|
3
|
use Action\AbstractAction;
|
4
|
use Plugin\Helpers;
|
4
|
use Plugin\Helpers;
|
5
|
use LibModels\Wap\Home\OrderData;
|
5
|
use LibModels\Wap\Home\OrderData;
|
|
|
6
|
+use LibModels\Wap\Home\CartData;
|
6
|
use Plugin\Pay\weixin\JsApiPay;
|
7
|
use Plugin\Pay\weixin\JsApiPay;
|
7
|
use Plugin\Pay\weixin\lib\WxPayUnifiedOrder;
|
8
|
use Plugin\Pay\weixin\lib\WxPayUnifiedOrder;
|
8
|
use Plugin\Pay\weixin\lib\WxPayApi;
|
9
|
use Plugin\Pay\weixin\lib\WxPayApi;
|
|
@@ -131,5 +132,33 @@ class PayController extends AbstractAction |
|
@@ -131,5 +132,33 @@ class PayController extends AbstractAction |
131
|
} while (false);
|
132
|
} while (false);
|
132
|
}
|
133
|
}
|
133
|
|
134
|
|
|
|
135
|
+ /**
|
|
|
136
|
+ * 选择支付时,时间间隔校验插入
|
|
|
137
|
+ */
|
|
|
138
|
+ public function addPaymentIntervalAction()
|
|
|
139
|
+ {
|
|
|
140
|
+ $data = array('code'=>400,'message'=>'','data'=>'');
|
|
|
141
|
+
|
|
|
142
|
+ do {
|
|
|
143
|
+ if (!$this->isAjax()) {
|
|
|
144
|
+ break;
|
|
|
145
|
+ }
|
|
|
146
|
+
|
|
|
147
|
+ $uid = $this->getUid(TRUE);
|
|
|
148
|
+ $orderCode = $this->get('orderCode','');
|
|
|
149
|
+ $payment = $this->get('payment',0);
|
|
|
150
|
+
|
|
|
151
|
+ if (!$uid || !$orderCode || !$payment) {
|
|
|
152
|
+ break;
|
|
|
153
|
+ }
|
|
|
154
|
+
|
|
|
155
|
+ $res = CartData::savePrePayInfo($uid, $orderCode, $payment);
|
|
|
156
|
+ $data = array('code'=>$res['code'],'message'=>$res['message'],'data'=>$res['data']);
|
|
|
157
|
+
|
|
|
158
|
+ } while (false);
|
|
|
159
|
+
|
|
|
160
|
+ $this->echoJson($data);
|
|
|
161
|
+ }
|
|
|
162
|
+
|
134
|
|
163
|
|
135
|
} |
164
|
} |