...
|
...
|
@@ -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();
|
|
|
}
|
|
|
|
...
|
...
|
|