Fix
parent
109a78f8bb
commit
290e8288cd
|
|
@ -6,6 +6,7 @@ use App\Enums\DealerLvl;
|
||||||
use App\Enums\DealerOrderStatus;
|
use App\Enums\DealerOrderStatus;
|
||||||
use App\Enums\DealerWalletAction;
|
use App\Enums\DealerWalletAction;
|
||||||
use App\Enums\PayWay;
|
use App\Enums\PayWay;
|
||||||
|
use App\Enums\WxpayTradeType;
|
||||||
use App\Exceptions\BizException;
|
use App\Exceptions\BizException;
|
||||||
use App\Models\DealerOrder;
|
use App\Models\DealerOrder;
|
||||||
use App\Models\DealerOrderAllocateLog;
|
use App\Models\DealerOrderAllocateLog;
|
||||||
|
|
@ -346,13 +347,17 @@ class OrderService
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PayWay::WxpayH5:
|
case PayWay::WxpayH5:
|
||||||
|
if (is_null($tradeType = WxpayTradeType::tryFromPayWay($payLog->pay_way))) {
|
||||||
|
throw new BizException('支付方式 非法');
|
||||||
|
}
|
||||||
|
|
||||||
$app = EasyWeChatFactory::payment(config('wechat.payment.yzk'));
|
$app = EasyWeChatFactory::payment(config('wechat.payment.yzk'));
|
||||||
|
|
||||||
$data = (new WeChatPayService($app))->pay([
|
$data = (new WeChatPayService($app))->pay([
|
||||||
'body' => app_settings('app.app_name').'-批零订单',
|
'body' => app_settings('app.app_name').'-批零订单',
|
||||||
'out_trade_no' => $payLog->pay_sn,
|
'out_trade_no' => $payLog->pay_sn,
|
||||||
'total_fee' => bcmul($order->total_amount, '100'),
|
'total_fee' => bcmul($order->total_amount, '100'),
|
||||||
'trade_type' => WeChatPayService::$tradeTypes[$payLog->pay_way],
|
'trade_type' => $tradeType->value,
|
||||||
'notify_url' => url(route('yzk_wxpay.paid_notify', [], false), [], true),
|
'notify_url' => url(route('yzk_wxpay.paid_notify', [], false), [], true),
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue