正在显示
1 个修改的文件
包含
4 行增加
和
6 行删除
@@ -102,7 +102,7 @@ class OrderController extends HomeBaseController | @@ -102,7 +102,7 @@ class OrderController extends HomeBaseController | ||
102 | if ($request->isPost()) { | 102 | if ($request->isPost()) { |
103 | $post = $request->param(); | 103 | $post = $request->param(); |
104 | $data['user_id'] = session('user.id'); | 104 | $data['user_id'] = session('user.id'); |
105 | - $data['order_sn'] = date('YmdHis') . rand(0, 9999); | 105 | + $data['order_sn'] = date('YmdHis') . rand(1000, 9999); |
106 | $data['activity_id'] = $post['activity_id']; | 106 | $data['activity_id'] = $post['activity_id']; |
107 | $data['schedule_id'] = $post['schedule_id']; | 107 | $data['schedule_id'] = $post['schedule_id']; |
108 | $data['add_time'] = time(); | 108 | $data['add_time'] = time(); |
@@ -430,15 +430,13 @@ class OrderController extends HomeBaseController | @@ -430,15 +430,13 @@ class OrderController extends HomeBaseController | ||
430 | //支付宝异步回调 | 430 | //支付宝异步回调 |
431 | public function alipayNotify() | 431 | public function alipayNotify() |
432 | { | 432 | { |
433 | - //print_r(cache('zfb')); | ||
434 | - $zfb = cache('zfb'); | ||
435 | - $zfb['out_trade_no'] = '2018'; | ||
436 | require EXTEND_PATH . '/alipay/config.php'; | 433 | require EXTEND_PATH . '/alipay/config.php'; |
437 | require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php'; | 434 | require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php'; |
438 | $alipay = new \AlipayTradeService($config); | 435 | $alipay = new \AlipayTradeService($config); |
439 | $return = request()->param(); | 436 | $return = request()->param(); |
440 | - //cache('zfb', $return); | ||
441 | - var_dump($alipay->check(cache('zfb'))); | 437 | + if($alipay->check($return)) { |
438 | + Db::name('user')->where(['id'=>10])->setInc('balance', 1); | ||
439 | + } | ||
442 | } | 440 | } |
443 | 441 | ||
444 | } | 442 | } |
-
请 注册 或 登录 后发表评论