From 4d2deaa2036706074c58992466123df7b3f04470 Mon Sep 17 00:00:00 2001 From: xiaochong0302 Date: Tue, 15 Apr 2025 17:51:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=91=BD=E4=BB=A4=E8=8B=A5=E5=B9=B2?= =?UTF-8?q?=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Admin/Services/Setting.php | 18 +++++++++--------- app/Http/Home/Controllers/PublicController.php | 11 ++++++----- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/app/Http/Admin/Services/Setting.php b/app/Http/Admin/Services/Setting.php index 197c6291..0c657885 100644 --- a/app/Http/Admin/Services/Setting.php +++ b/app/Http/Admin/Services/Setting.php @@ -52,8 +52,8 @@ class Setting extends Service { $alipay = $this->getSettings('pay.alipay'); - $alipay['return_url'] = $alipay['return_url'] ?: kg_full_url(['for' => 'home.alipay_callback']); - $alipay['notify_url'] = $alipay['notify_url'] ?: kg_full_url(['for' => 'home.alipay_notify']); + $alipay['return_url'] = $alipay['return_url'] ?: kg_full_url(['for' => 'home.alipay.callback']); + $alipay['notify_url'] = $alipay['notify_url'] ?: kg_full_url(['for' => 'home.alipay.notify']); return $alipay; } @@ -62,8 +62,8 @@ class Setting extends Service { $wxpay = $this->getSettings('pay.wxpay'); - $wxpay['return_url'] = $wxpay['return_url'] ?: kg_full_url(['for' => 'home.wxpay_callback']); - $wxpay['notify_url'] = $wxpay['notify_url'] ?: kg_full_url(['for' => 'home.wxpay_notify']); + $wxpay['return_url'] = $wxpay['return_url'] ?: kg_full_url(['for' => 'home.wxpay.callback']); + $wxpay['notify_url'] = $wxpay['notify_url'] ?: kg_full_url(['for' => 'home.wxpay.notify']); return $wxpay; } @@ -109,11 +109,11 @@ class Setting extends Service $result = $this->getSettings($section); if ($section == 'live.notify') { - $result['stream_begin_url'] = $result['stream_begin_url'] ?: kg_full_url(['for' => 'home.live_notify'], ['action' => 'streamBegin']); - $result['stream_end_url'] = $result['stream_end_url'] ?: kg_full_url(['for' => 'home.live_notify'], ['action' => 'streamEnd']); - $result['record_url'] = $result['record_url'] ?: kg_full_url(['for' => 'home.live_notify'], ['action' => 'record']); - $result['snapshot_url'] = $result['snapshot_url'] ?: kg_full_url(['for' => 'home.live_notify'], ['action' => 'snapshot']); - $result['porn_url'] = $result['porn_url'] ?: kg_full_url(['for' => 'home.live_notify'], ['action' => 'porn']); + $result['stream_begin_url'] = $result['stream_begin_url'] ?: kg_full_url(['for' => 'home.live.notify'], ['action' => 'streamBegin']); + $result['stream_end_url'] = $result['stream_end_url'] ?: kg_full_url(['for' => 'home.live.notify'], ['action' => 'streamEnd']); + $result['record_url'] = $result['record_url'] ?: kg_full_url(['for' => 'home.live.notify'], ['action' => 'record']); + $result['snapshot_url'] = $result['snapshot_url'] ?: kg_full_url(['for' => 'home.live.notify'], ['action' => 'snapshot']); + $result['porn_url'] = $result['porn_url'] ?: kg_full_url(['for' => 'home.live.notify'], ['action' => 'porn']); } return $result; diff --git a/app/Http/Home/Controllers/PublicController.php b/app/Http/Home/Controllers/PublicController.php index b8b4c01a..0cfcd5e7 100644 --- a/app/Http/Home/Controllers/PublicController.php +++ b/app/Http/Home/Controllers/PublicController.php @@ -104,7 +104,7 @@ class PublicController extends \Phalcon\Mvc\Controller } /** - * @Get("/alipay/callback", name="home.alipay_callback") + * @Get("/alipay/callback", name="home.alipay.callback") */ public function alipayCallbackAction() { @@ -112,7 +112,7 @@ class PublicController extends \Phalcon\Mvc\Controller } /** - * @Get("/wxpay/callback", name="home.wxpay_callback") + * @Get("/wxpay/callback", name="home.wxpay.callback") */ public function wxpayCallbackAction() { @@ -120,7 +120,7 @@ class PublicController extends \Phalcon\Mvc\Controller } /** - * @Post("/alipay/notify", name="home.alipay_notify") + * @Post("/alipay/notify", name="home.alipay.notify") */ public function alipayNotifyAction() { @@ -136,7 +136,7 @@ class PublicController extends \Phalcon\Mvc\Controller } /** - * @Post("/wxpay/notify", name="home.wxpay_notify") + * @Post("/wxpay/notify", name="home.wxpay.notify") */ public function wxpayNotifyAction() { @@ -188,7 +188,7 @@ class PublicController extends \Phalcon\Mvc\Controller } /** - * @Post("/live/notify", name="home.live_notify") + * @Post("/live/notify", name="home.live.notify") */ public function liveNotifyAction() { @@ -198,6 +198,7 @@ class PublicController extends \Phalcon\Mvc\Controller return $this->jsonSuccess(); } else { $this->response->setStatusCode(403); + return $this->jsonError(); } }