...
|
...
|
@@ -53,6 +53,16 @@ class Pay extends Api |
|
|
if(!$res){
|
|
|
$this->error('无效的订单');
|
|
|
}
|
|
|
|
|
|
//暂时写支付成功
|
|
|
$status = $this->order_status;
|
|
|
$orderModel = new Order();
|
|
|
$orderModel->where(['uid'=>$this->uid,'order_sn'=>$order_sn,'status'=>$status[0]])->update(['status'=>$status[1]]);
|
|
|
$this->success('成功');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//创建支付对象
|
|
|
$config = config('verify.wx_pay');
|
|
|
$pay_order_sn = Common::genPayOrderSn('pay');//支付订单号
|
...
|
...
|
@@ -156,6 +166,18 @@ class Pay extends Api |
|
|
$app = Factory::payment($config);
|
|
|
$pay_order_sn = Common::genPayOrderSn('pay');//支付订单号
|
|
|
|
|
|
//写入订单
|
|
|
$res = Common::createOrder($data,$pay_order_sn,$this->uid);
|
|
|
if($res){
|
|
|
$this->success('成功');
|
|
|
}
|
|
|
$this->error('创建订单失败');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//暂时没有真正支付
|
|
|
$ffg_host = config('verify.ffg_host');
|
|
|
$result = $app->order->unify([
|
|
|
'body' => '佛山市理想中网络科技有限公司',
|
...
|
...
|
|