正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
@@ -160,7 +160,7 @@ class OrderController extends HomeBaseController | @@ -160,7 +160,7 @@ class OrderController extends HomeBaseController | ||
160 | if ($data['payment'] == 1) { | 160 | if ($data['payment'] == 1) { |
161 | $info = [ | 161 | $info = [ |
162 | 'attach' => $oid, | 162 | 'attach' => $oid, |
163 | - 'openid' => session('openid'), | 163 | + 'openid' => session('user.openid'), |
164 | 'body' => '萨米户外', | 164 | 'body' => '萨米户外', |
165 | 'total_fee' => $final_price | 165 | 'total_fee' => $final_price |
166 | ]; | 166 | ]; |
@@ -236,7 +236,7 @@ class OrderController extends HomeBaseController | @@ -236,7 +236,7 @@ class OrderController extends HomeBaseController | ||
236 | if ($info['order_type'] == 1) { | 236 | if ($info['order_type'] == 1) { |
237 | Db::name('order_log')->where(['oid' => $oid])->update(['order_amount' => $order_amount]); | 237 | Db::name('order_log')->where(['oid' => $oid])->update(['order_amount' => $order_amount]); |
238 | } | 238 | } |
239 | - echo json_encode(['msg' => '支付成功', 'code' => 20000]); | 239 | + echo json_encode(['msg' => '支付成功', 'code' => 20000, 'url'=>url('user/Center/orderDetail', ['oid' => $oid])]); |
240 | exit(); | 240 | exit(); |
241 | } else { | 241 | } else { |
242 | echo json_encode(['msg' => '支付失败', 'code' => 40000]); | 242 | echo json_encode(['msg' => '支付失败', 'code' => 40000]); |
@@ -245,7 +245,7 @@ class OrderController extends HomeBaseController | @@ -245,7 +245,7 @@ class OrderController extends HomeBaseController | ||
245 | } elseif ($payment == 1) { | 245 | } elseif ($payment == 1) { |
246 | $data = [ | 246 | $data = [ |
247 | 'attach' => $oid, | 247 | 'attach' => $oid, |
248 | - 'openid' => session('openid'), | 248 | + 'openid' => session('user.openid'), |
249 | 'body' => '萨米户外', | 249 | 'body' => '萨米户外', |
250 | 'total_fee' => $order_amount | 250 | 'total_fee' => $order_amount |
251 | ]; | 251 | ]; |
@@ -341,7 +341,7 @@ class OrderController extends HomeBaseController | @@ -341,7 +341,7 @@ class OrderController extends HomeBaseController | ||
341 | //微信支付 | 341 | //微信支付 |
342 | private function wxPay($info) | 342 | private function wxPay($info) |
343 | { | 343 | { |
344 | - $pay = new \Payment($info['attach'], session('user.openid'), $info['body'], $info['total_fee']); | 344 | + $pay = new \Payment($info['attach'], $info['openid'], $info['body'], $info['total_fee']); |
345 | return $pay->pay(); | 345 | return $pay->pay(); |
346 | } | 346 | } |
347 | 347 |
-
请 注册 或 登录 后发表评论