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

赠送优惠券

... ... @@ -160,7 +160,7 @@ class OrderController extends HomeBaseController
if ($data['payment'] == 1) {
$info = [
'attach' => $oid,
'openid' => session('openid'),
'openid' => session('user.openid'),
'body' => '萨米户外',
'total_fee' => $final_price
];
... ... @@ -236,7 +236,7 @@ class OrderController extends HomeBaseController
if ($info['order_type'] == 1) {
Db::name('order_log')->where(['oid' => $oid])->update(['order_amount' => $order_amount]);
}
echo json_encode(['msg' => '支付成功', 'code' => 20000]);
echo json_encode(['msg' => '支付成功', 'code' => 20000, 'url'=>url('user/Center/orderDetail', ['oid' => $oid])]);
exit();
} else {
echo json_encode(['msg' => '支付失败', 'code' => 40000]);
... ... @@ -245,7 +245,7 @@ class OrderController extends HomeBaseController
} elseif ($payment == 1) {
$data = [
'attach' => $oid,
'openid' => session('openid'),
'openid' => session('user.openid'),
'body' => '萨米户外',
'total_fee' => $order_amount
];
... ... @@ -341,7 +341,7 @@ class OrderController extends HomeBaseController
//微信支付
private function wxPay($info)
{
$pay = new \Payment($info['attach'], session('user.openid'), $info['body'], $info['total_fee']);
$pay = new \Payment($info['attach'], $info['openid'], $info['body'], $info['total_fee']);
return $pay->pay();
}
... ...