...
|
...
|
@@ -448,13 +448,13 @@ class Goods extends Api |
|
|
// 创建订单
|
|
|
if ($this->model->order_add($this->user_id, $order)) {
|
|
|
// 发起微信支付
|
|
|
if($this->request->request('type')&&$this->request->request('type')=='gzh'){
|
|
|
// if($this->request->request('type')&&$this->request->request('type')=='gzh'){
|
|
|
$this->init_wx_pay_for_gzh(true);
|
|
|
$this->make_wx_pay('wechat');
|
|
|
}else{
|
|
|
$this->init_wx_pay_for_wxapp();
|
|
|
$this->make_wx_pay('wxapp');
|
|
|
}
|
|
|
// }else{
|
|
|
// $this->init_wx_pay_for_wxapp();
|
|
|
// $this->make_wx_pay('wxapp');
|
|
|
// }
|
|
|
}
|
|
|
$error = $this->model->getError() ?: '订单创建失败';
|
|
|
return $this->error($error);
|
...
|
...
|
@@ -768,6 +768,6 @@ class Goods extends Api |
|
|
$config = $payment->configForJSSDKPayment($prepayId); // 返回数组
|
|
|
return $this->success('预支付成功',$config);
|
|
|
}
|
|
|
return $this->error('微信支付调用失败',[$result,$third,['user_id' => $this->user_id, 'platform' => $platform]]);
|
|
|
return $this->error('微信支付调用失败',$result);
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|