Merge branch 'develop' of gitee.com:zi-chunsheng-e-commerce/mall-server into 1.x
commit
16c056f9bb
|
|
@ -6,6 +6,7 @@ use App\Enums\DealerLvl;
|
|||
use App\Enums\DealerOrderStatus;
|
||||
use App\Enums\DealerWalletAction;
|
||||
use App\Enums\PayWay;
|
||||
use App\Enums\WxpayTradeType;
|
||||
use App\Exceptions\BizException;
|
||||
use App\Models\DealerOrder;
|
||||
use App\Models\DealerOrderAllocateLog;
|
||||
|
|
@ -346,13 +347,17 @@ class OrderService
|
|||
break;
|
||||
|
||||
case PayWay::WxpayH5:
|
||||
if (is_null($tradeType = WxpayTradeType::tryFromPayWay($payLog->pay_way))) {
|
||||
throw new BizException('支付方式 非法');
|
||||
}
|
||||
|
||||
$app = EasyWeChatFactory::payment(config('wechat.payment.yzk'));
|
||||
|
||||
$data = (new WeChatPayService($app))->pay([
|
||||
'body' => app_settings('app.app_name').'-批零订单',
|
||||
'out_trade_no' => $payLog->pay_sn,
|
||||
'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),
|
||||
]);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue