mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 22:10:49 +00:00
支付端优化
This commit is contained in:
parent
de23fa25ed
commit
739ff267bd
@ -168,7 +168,7 @@ class StoreOrderController
|
||||
$userInfo = $request->user()->toArray();
|
||||
if ($checkOrder = $this->services->getOne(['order_id|unique' => $key, 'uid' => $userInfo['uid'], 'is_del' => 0]))
|
||||
return app('json')->status('extend_order', 410209, ['orderId' => $checkOrder['order_id'], 'key' => $key]);
|
||||
[$addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckillId, $bargainId, $shipping_type, $real_name, $phone, $storeId, $news, $invoice_id, $quitUrl, $advanceId, $virtual_type, $customForm] = $request->postMore([
|
||||
[$addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckillId, $bargainId, $shipping_type, $real_name, $phone, $storeId, $news, $invoice_id, $advanceId, $customForm] = $request->postMore([
|
||||
[['addressId', 'd'], 0],
|
||||
[['couponId', 'd'], 0],
|
||||
['payType', ''],
|
||||
@ -184,9 +184,7 @@ class StoreOrderController
|
||||
[['store_id', 'd'], 0],
|
||||
['new', 0],
|
||||
[['invoice_id', 'd'], 0],
|
||||
['quitUrl', ''],
|
||||
[['advanceId', 'd'], 0],
|
||||
['virtual_type', 0],
|
||||
['custom_form', []],
|
||||
], true);
|
||||
$payType = strtolower($payType);
|
||||
@ -249,6 +247,7 @@ class StoreOrderController
|
||||
if (!$uni) return app('json')->fail(100100);
|
||||
$orderInfo = $this->services->get(['order_id' => $uni]);
|
||||
$uid = $type == 1 ? (int)$request->uid() : $orderInfo->uid;
|
||||
$orderInfo->is_channel = $this->getChennel[$request->getFromType()] ?? ($request->isApp() ? 0 : 1);
|
||||
$orderInfo->pay_uid = $uid;
|
||||
$orderInfo->save();
|
||||
$orderInfo = $orderInfo->toArray();
|
||||
|
||||
@ -281,8 +281,6 @@ class StoreOrderCreateServices extends BaseServices
|
||||
}
|
||||
/** @var StoreOrderCartInfoServices $cartServices */
|
||||
$cartServices = app()->make(StoreOrderCartInfoServices::class);
|
||||
/** @var StoreSeckillServices $seckillServices */
|
||||
$seckillServices = app()->make(StoreSeckillServices::class);
|
||||
$priceData['coupon_id'] = $couponId;
|
||||
$order = $this->transaction(function () use ($cartIds, $orderInfo, $cartInfo, $key, $userInfo, $useIntegral, $priceData, $combinationId, $seckillId, $bargainId, $cartServices, $seckillServices, $uid, $addressId, $advanceId) {
|
||||
//创建订单
|
||||
|
||||
@ -197,7 +197,7 @@ class StoreOrderRefundServices extends BaseServices
|
||||
}
|
||||
/** @var Pay $pay */
|
||||
$pay = app()->make(Pay::class, [$drivers]);
|
||||
if ($refundOrder['channel_type'] == 'routine') {
|
||||
if ($refundOrder['is_channel'] == 1) {
|
||||
$refundData['trade_no'] = $refundOrder['trade_no'];
|
||||
$refundData['pay_new_weixin_open'] = sys_config('pay_new_weixin_open');
|
||||
//小程序退款
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user