|
|
@@ -61,20 +61,17 @@ class RechargeController extends BaseController
|
|
|
'modPrice' => 0,
|
|
|
'remark' => '免费续期充值',
|
|
|
];
|
|
|
- $order = RechargeClass::addOrder($data);
|
|
|
- $orderSn = $order['orderSn'];
|
|
|
- $name = $order['orderName'] ?? '充值';
|
|
|
- $totalFee = $order['amount'];
|
|
|
+ $order = RechargeClass::addOrder($data, true);
|
|
|
+ $orderSn = $order->orderSn;
|
|
|
+ $name = $order->orderName ?? '充值';
|
|
|
+ $totalFee = $order->amount;
|
|
|
|
|
|
//强制使用小程序的miniOpenId
|
|
|
$openId = $this->admin['miniOpenId'];
|
|
|
|
|
|
- $capitalType = dict::getDict('capitalType','xhRecharge','id');
|
|
|
+ $capitalType = dict::getDict('capitalType', 'xhRecharge', 'id');
|
|
|
//流水类型、优惠卷、微信支付(h5还是小程序支付)类型 带到回调
|
|
|
- $wxPayType = 0;
|
|
|
- if (httpUtil::isMiniProgram()) {
|
|
|
- $wxPayType = 1;
|
|
|
- }
|
|
|
+ $wxPayType = 1;
|
|
|
$attach = "couponId=0&capitalType=" . $capitalType . '&wxPayType=' . $wxPayType . '&rechargeRenew=1';
|
|
|
//订单30分钟后过期
|
|
|
$now = time();
|
|
|
@@ -126,20 +123,17 @@ class RechargeController extends BaseController
|
|
|
'modPrice' => 0,
|
|
|
'remark' => '',
|
|
|
];
|
|
|
- $order = RechargeClass::addOrder($data);
|
|
|
- $orderSn = $order['orderSn'];
|
|
|
- $name = $order['orderName'] ?? '充值';
|
|
|
- $totalFee = $order['amount'];
|
|
|
+ $order = RechargeClass::addOrder($data, true);
|
|
|
+ $orderSn = $order->orderSn;
|
|
|
+ $name = $order->orderName ?? '充值';
|
|
|
+ $totalFee = $order->amount;
|
|
|
|
|
|
//强制使用小程序的miniOpenId
|
|
|
$openId = $this->admin['miniOpenId'];
|
|
|
|
|
|
- $capitalType = dict::getDict('capitalType','xhRecharge','id');
|
|
|
+ $capitalType = dict::getDict('capitalType', 'xhRecharge', 'id');
|
|
|
//流水类型、优惠卷、微信支付(h5还是小程序支付)类型 带到回调
|
|
|
- $wxPayType = 0;
|
|
|
- if (httpUtil::isMiniProgram()) {
|
|
|
- $wxPayType = 1;
|
|
|
- }
|
|
|
+ $wxPayType = 1;
|
|
|
$attach = "couponId=0&capitalType=" . $capitalType . '&wxPayType=' . $wxPayType;
|
|
|
//订单30分钟后过期
|
|
|
$now = time();
|