mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	update: payment add custom notify domain name
This commit is contained in:
		| @@ -26,6 +26,7 @@ class PaymentService | ||||
|             $this->config['enable'] = $payment['enable']; | ||||
|             $this->config['id'] = $payment['id']; | ||||
|             $this->config['uuid'] = $payment['uuid']; | ||||
|             $this->config['notify_domain'] = $payment['notify_domain']; | ||||
|         }; | ||||
|         $this->payment = new $this->class($this->config); | ||||
|         if (isset($this->payment->customResult)) $this->customResult = $this->payment->customResult; | ||||
| @@ -39,8 +40,15 @@ class PaymentService | ||||
|  | ||||
|     public function pay($order) | ||||
|     { | ||||
|         // custom notify domain name | ||||
|         $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']; | ||||
|         } | ||||
|  | ||||
|         return $this->payment->pay([ | ||||
|             'notify_url' => url("/api/v1/guest/payment/notify/{$this->method}/{$this->config['uuid']}"), | ||||
|             'notify_url' => $notifyUrl, | ||||
|             'return_url' => config('v2board.app_url', env('APP_URL')) . '/#/order/' . $order['trade_no'], | ||||
|             'trade_no' => $order['trade_no'], | ||||
|             'total_amount' => $order['total_amount'], | ||||
|   | ||||
		Reference in New Issue
	
	Block a user