update: get subscribe url

This commit is contained in:
tokumeikoi
2022-05-09 23:26:59 +08:00
parent d74ab728fe
commit ed749f85ae
9 changed files with 19 additions and 31 deletions

View File

@ -39,7 +39,7 @@ class PaymentService
public function pay($order)
{
// custom notify domain name
$notifyUrl = config('v2board.app_url', env('APP_URL')) . "/api/v1/guest/payment/notify/{$this->method}/{$this->config['uuid']}";
$notifyUrl = url("/api/v1/guest/payment/notify/{$this->method}/{$this->config['uuid']}");
if ($this->config['notify_domain']) {
$parseUrl = parse_url($notifyUrl);
$notifyUrl = $this->config['notify_domain'] . $parseUrl['path'];
@ -47,7 +47,7 @@ class PaymentService
return $this->payment->pay([
'notify_url' => $notifyUrl,
'return_url' => config('v2board.app_url', env('APP_URL')) . '/#/order/' . $order['trade_no'],
'return_url' => config('v2board.app_url') . '/#/order/' . $order['trade_no'],
'trade_no' => $order['trade_no'],
'total_amount' => $order['total_amount'],
'user_id' => $order['user_id'],