...
|
...
|
@@ -375,17 +375,14 @@ class OrderController extends HomeBaseController |
|
|
//欢迎支付宝支付
|
|
|
private function alipay($oid, $step)
|
|
|
{
|
|
|
$info = Db::name('order_info')->alias('o')
|
|
|
->field('order_sn,status,order_type,a.down_price,s.price,a.name,s.start_time,s.end_time')
|
|
|
->join('activity a', 'o.activity_id=a.id')
|
|
|
->join('activity_schedule s ', 'o.schedule_id=s.id')
|
|
|
->where(['o.id' => $oid])->find();
|
|
|
if($step == 1) {
|
|
|
$out_trade_no = '2018101210215'.$step;
|
|
|
$subject = '支付宝支付';
|
|
|
$total_amount = Db::name('order_info')->where(['id'=>$oid])->value('order_amount');
|
|
|
$body = '商品';
|
|
|
}elseif ($step == 2) {
|
|
|
$info = Db::name('order_info')->alias('o')
|
|
|
->field('status,order_type,a.down_price,s.price')
|
|
|
->join('activity a', 'o.activity_id=a.id')
|
|
|
->join('activity_schedule s ', 'o.schedule_id=s.id')
|
|
|
->where(['o.id' => $oid])->find();
|
|
|
$num = Db::name('order_detail')->where(['oid' => $oid, 'status' => ['neq', 2]])->count();
|
|
|
if ($info['status'] == 1) {
|
|
|
if ($info['order_type'] == 0) {
|
...
|
...
|
@@ -400,10 +397,7 @@ class OrderController extends HomeBaseController |
|
|
} else {
|
|
|
$order_amount = 0;
|
|
|
}
|
|
|
$out_trade_no = '2018101210215'.$step;
|
|
|
$subject = '支付宝支付';
|
|
|
$total_amount = $order_amount;
|
|
|
$body = '商品';
|
|
|
}else {
|
|
|
return false;
|
|
|
}
|
...
|
...
|
@@ -412,7 +406,9 @@ class OrderController extends HomeBaseController |
|
|
require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php';
|
|
|
require_once EXTEND_PATH . '/alipay/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php';
|
|
|
require EXTEND_PATH . '/alipay/config.php';
|
|
|
|
|
|
$out_trade_no = $info['order_sn'].$step;
|
|
|
$subject = '支付宝支付';
|
|
|
$body = $info['name'].'('.date('Y-m-d', $info['start_time']).')';
|
|
|
//超时时间
|
|
|
$timeout_express = "1m";
|
|
|
|
...
|
...
|
|