6
0
Fork 0

优化微信支付配置

release
李静 2021-12-27 13:40:17 +08:00
parent f0c94a6356
commit 8da33e2414
2 changed files with 5 additions and 1 deletions

View File

@ -55,6 +55,10 @@ class WeChatPayService
*/
public function pay(array $params)
{
if (isset($params['notify_url'])) {
$params['notify_url'] = url(route('wxpay.paid_notify', [], false), [], true);
}
// 如果交易类型不存在,则使用 App 支付
if (! isset($params['trade_type'])) {
$params['trade_type'] = static::TRADE_TYPE_APP;

View File

@ -9,7 +9,7 @@ return [
'key' => env('WECHAT_PAYMENT_KEY'),
'cert_path' => env('WECHAT_PAYMENT_CERT_PATH'), // 绝对地址
'key_path' => env('WECHAT_PAYMENT_KEY_PATH'), // 绝对地址
'notify_url' => url(route('wxpay.paid_notify', [], false), [], true),
'notify_url' => env('WECHAT_PAYMENT_NOTIFY_URL'),
],
],
];