Browse Source

试课的支付 使用自定义支付成功页

lizhen_gitee 1 year ago
parent
commit
e11f875055
2 changed files with 4 additions and 0 deletions
  1. 2 0
      application/api/controller/Trylesson.php
  2. 2 0
      application/config.php

+ 2 - 0
application/api/controller/Trylesson.php

@@ -138,6 +138,7 @@ class Trylesson extends Api
         ];
 
         $apiKey = config('hitpay.apikey');
+        $redirect_cdnurl = config('hitpay.trylesson_redirect_cdnurl');
 
         try {
             $hitPayClient = new \HitPay\Client($apiKey, true);
@@ -146,6 +147,7 @@ class Trylesson extends Api
 
             $request->setAmount($money)
                 ->setCurrency('SGD')
+                ->setRedirectUrl($redirect_cdnurl)
                 ->setPaymentMethods(['paynow_online','card'])
                 ->setPurpose('Elin Dance Studio')
                 ->setWebhook($notifyurl)

+ 2 - 0
application/config.php

@@ -334,6 +334,8 @@ return [
     'hitpay' => [
         'apikey' => '096a06e94fb1e0a8b015485bb76ef5dd63c167679297e07331a687327bd8b12e',
         'salt' => 'LNrFYxOiGhtdHAuJiqqy3wOl1nVwyJn5dfOYkLquFx8j2J6bm2nsplTnpkYuKyo5',
+
+        'trylesson_redirect_cdnurl' => 'http://yueke.huxiukeji.cn/index/index/paysuccess',
     ],
 
     //奇讯云短信,正式