1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-25 20:17:23 +08:00

重命令若干路由

This commit is contained in:
xiaochong0302 2025-04-15 17:51:45 +08:00
parent 41ffefcd48
commit 4d2deaa203
2 changed files with 15 additions and 14 deletions

View File

@ -52,8 +52,8 @@ class Setting extends Service
{ {
$alipay = $this->getSettings('pay.alipay'); $alipay = $this->getSettings('pay.alipay');
$alipay['return_url'] = $alipay['return_url'] ?: kg_full_url(['for' => 'home.alipay_callback']); $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['notify_url'] = $alipay['notify_url'] ?: kg_full_url(['for' => 'home.alipay.notify']);
return $alipay; return $alipay;
} }
@ -62,8 +62,8 @@ class Setting extends Service
{ {
$wxpay = $this->getSettings('pay.wxpay'); $wxpay = $this->getSettings('pay.wxpay');
$wxpay['return_url'] = $wxpay['return_url'] ?: kg_full_url(['for' => 'home.wxpay_callback']); $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['notify_url'] = $wxpay['notify_url'] ?: kg_full_url(['for' => 'home.wxpay.notify']);
return $wxpay; return $wxpay;
} }
@ -109,11 +109,11 @@ class Setting extends Service
$result = $this->getSettings($section); $result = $this->getSettings($section);
if ($section == 'live.notify') { if ($section == 'live.notify') {
$result['stream_begin_url'] = $result['stream_begin_url'] ?: kg_full_url(['for' => 'home.live_notify'], ['action' => 'streamBegin']); $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['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['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['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['porn_url'] = $result['porn_url'] ?: kg_full_url(['for' => 'home.live.notify'], ['action' => 'porn']);
} }
return $result; return $result;

View File

@ -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() 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() 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() 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() 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() public function liveNotifyAction()
{ {
@ -198,6 +198,7 @@ class PublicController extends \Phalcon\Mvc\Controller
return $this->jsonSuccess(); return $this->jsonSuccess();
} else { } else {
$this->response->setStatusCode(403); $this->response->setStatusCode(403);
return $this->jsonError();
} }
} }