作者 lihan
1 个管道 的构建 通过 耗费 0 秒

赠送优惠券

... ... @@ -152,6 +152,8 @@ class OrderController extends HomeBaseController
Db::commit();
//首次下单状态改变
Db::name('user')->update(['id' => session('user.id'), 'is_first' => 0]);
//微信支付
if ($data['payment'] == 1) {
$info = [
'attach' => $oid,
... ... @@ -160,9 +162,15 @@ class OrderController extends HomeBaseController
'total_fee' => $final_price
];
$this->success('微信支付', url('user/Center/orderDetail', ['oid' => $oid]), $this->wxPay($info));
} elseif ($data['payment'] == 2) {
}
//支付宝支付
elseif ($data['payment'] == 2) {
}
} elseif ($data['payment'] == 0) {
//余额支付
elseif ($data['payment'] == 0) {
$model = new OrderModel;
if ($model->orderCallBack($oid)) {
echo json_encode(['msg' => '下单成功', 'code' => 20000]);
... ...
... ... @@ -2,5 +2,7 @@
return
[
'AppID' => 'wx89d9ac6d013cfe38',
'AppSecret' => '01df709fc22b33d9f78b2f4023aa8dc2'
'AppSecret' => '01df709fc22b33d9f78b2f4023aa8dc2',
'MchId' => '1507647501',
'Key' => '94643738277625076870483309666648'
];
\ No newline at end of file
... ...