正在显示
1 个修改的文件
包含
7 行增加
和
11 行删除
@@ -375,17 +375,14 @@ class OrderController extends HomeBaseController | @@ -375,17 +375,14 @@ class OrderController extends HomeBaseController | ||
375 | //欢迎支付宝支付 | 375 | //欢迎支付宝支付 |
376 | private function alipay($oid, $step) | 376 | private function alipay($oid, $step) |
377 | { | 377 | { |
378 | - if($step == 1) { | ||
379 | - $out_trade_no = '2018101210215'.$step; | ||
380 | - $subject = '支付宝支付'; | ||
381 | - $total_amount = Db::name('order_info')->where(['id'=>$oid])->value('order_amount'); | ||
382 | - $body = '商品'; | ||
383 | - }elseif ($step == 2) { | ||
384 | $info = Db::name('order_info')->alias('o') | 378 | $info = Db::name('order_info')->alias('o') |
385 | - ->field('status,order_type,a.down_price,s.price') | 379 | + ->field('order_sn,status,order_type,a.down_price,s.price,a.name,s.start_time,s.end_time') |
386 | ->join('activity a', 'o.activity_id=a.id') | 380 | ->join('activity a', 'o.activity_id=a.id') |
387 | ->join('activity_schedule s ', 'o.schedule_id=s.id') | 381 | ->join('activity_schedule s ', 'o.schedule_id=s.id') |
388 | ->where(['o.id' => $oid])->find(); | 382 | ->where(['o.id' => $oid])->find(); |
383 | + if($step == 1) { | ||
384 | + $total_amount = Db::name('order_info')->where(['id'=>$oid])->value('order_amount'); | ||
385 | + }elseif ($step == 2) { | ||
389 | $num = Db::name('order_detail')->where(['oid' => $oid, 'status' => ['neq', 2]])->count(); | 386 | $num = Db::name('order_detail')->where(['oid' => $oid, 'status' => ['neq', 2]])->count(); |
390 | if ($info['status'] == 1) { | 387 | if ($info['status'] == 1) { |
391 | if ($info['order_type'] == 0) { | 388 | if ($info['order_type'] == 0) { |
@@ -400,10 +397,7 @@ class OrderController extends HomeBaseController | @@ -400,10 +397,7 @@ class OrderController extends HomeBaseController | ||
400 | } else { | 397 | } else { |
401 | $order_amount = 0; | 398 | $order_amount = 0; |
402 | } | 399 | } |
403 | - $out_trade_no = '2018101210215'.$step; | ||
404 | - $subject = '支付宝支付'; | ||
405 | $total_amount = $order_amount; | 400 | $total_amount = $order_amount; |
406 | - $body = '商品'; | ||
407 | }else { | 401 | }else { |
408 | return false; | 402 | return false; |
409 | } | 403 | } |
@@ -412,7 +406,9 @@ class OrderController extends HomeBaseController | @@ -412,7 +406,9 @@ class OrderController extends HomeBaseController | ||
412 | require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php'; | 406 | require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php'; |
413 | require_once EXTEND_PATH . '/alipay/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php'; | 407 | require_once EXTEND_PATH . '/alipay/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php'; |
414 | require EXTEND_PATH . '/alipay/config.php'; | 408 | require EXTEND_PATH . '/alipay/config.php'; |
415 | - | 409 | + $out_trade_no = $info['order_sn'].$step; |
410 | + $subject = '支付宝支付'; | ||
411 | + $body = $info['name'].'('.date('Y-m-d', $info['start_time']).')'; | ||
416 | //超时时间 | 412 | //超时时间 |
417 | $timeout_express = "1m"; | 413 | $timeout_express = "1m"; |
418 | 414 |
-
请 注册 或 登录 后发表评论