|
@@ -277,6 +277,33 @@ class Client extends Base |
|
@@ -277,6 +277,33 @@ class Client extends Base |
277
|
}
|
277
|
}
|
278
|
|
278
|
|
279
|
|
279
|
|
|
|
280
|
+ /**
|
|
|
281
|
+ * 5.1立即支付
|
|
|
282
|
+ */
|
|
|
283
|
+ public function immediate_payment(){
|
|
|
284
|
+ $order_no=$this->postParam['order_no'];
|
|
|
285
|
+ Db::startTrans();
|
|
|
286
|
+ try{
|
|
|
287
|
+ //获取到订单信息
|
|
|
288
|
+ $res=Db::name('verification_order')->where(['order_no'=>$order_no])->find();
|
|
|
289
|
+ if($res){
|
|
|
290
|
+ $res=Db::name('verification_order')->where(['id'=>$res['id']])->update([
|
|
|
291
|
+ 'order_no'=>time().rand(10000,99999)
|
|
|
292
|
+ ]);
|
|
|
293
|
+ }
|
|
|
294
|
+ $res = (new \app\api\controller\v1\Wechat())->prepare_order($order_no);
|
|
|
295
|
+ Db::commit();
|
|
|
296
|
+ }catch (Exception $e){
|
|
|
297
|
+ Db::rollback();
|
|
|
298
|
+ $this->error($e->getMessage());
|
|
|
299
|
+ }
|
|
|
300
|
+ if($res){
|
|
|
301
|
+ $this->success('添加订单成功',$res);
|
|
|
302
|
+ }else{
|
|
|
303
|
+ $this->success('添加订单失败');
|
|
|
304
|
+
|
|
|
305
|
+ }
|
|
|
306
|
+ }
|
280
|
|
307
|
|
281
|
/**
|
308
|
/**
|
282
|
* 6、卡卷详情
|
309
|
* 6、卡卷详情
|