微信H5支付
parent
3b87d84079
commit
cf052f0047
|
|
@ -6,6 +6,7 @@ use App\Exceptions\WeChatPayException;
|
||||||
use Closure;
|
use Closure;
|
||||||
use EasyWeChat\Factory;
|
use EasyWeChat\Factory;
|
||||||
use EasyWeChat\Payment\Application;
|
use EasyWeChat\Payment\Application;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
class WeChatPayService
|
class WeChatPayService
|
||||||
{
|
{
|
||||||
|
|
@ -83,13 +84,11 @@ class WeChatPayService
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$prepayId = $result['prepay_id'];
|
return match ($params['trade_type']) {
|
||||||
|
static::TRADE_TYPE_APP => $this->app->jssdk->appConfig($result['prepay_id']),
|
||||||
if ($params['trade_type'] === static::TRADE_TYPE_APP) {
|
static::TRADE_TYPE_H5 => Arr::only($result, ['mweb_url']),
|
||||||
return $this->app->jssdk->appConfig($prepayId);
|
default => $this->app->jssdk->bridgeConfig($result['prepay_id'], false),
|
||||||
}
|
};
|
||||||
|
|
||||||
return $this->app->jssdk->bridgeConfig($prepayId, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue