53 lines
1.9 KiB
PHP
53 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace lib\Controllers\DBMS;
|
|
|
|
use lib\Services\ClientService;
|
|
use lib\Services\AddDbService;
|
|
|
|
class PaymentController extends BaseController
|
|
{
|
|
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->getView()->setPath('service');
|
|
} //
|
|
public function getClientService(): ClientService
|
|
{
|
|
if ($this->_clientService === null) {
|
|
$this->_clientService = new ClientService();
|
|
}
|
|
return $this->_clientService;
|
|
}
|
|
|
|
//부가서비스 : 닷디펜더,딥파인더 등, deepfinder_list.php,dotdefender_list.php
|
|
//CLI 접속방법 : php index.php SiteController/extraservice/client_code/코드번호
|
|
//WEB 접속방법 : http://localhost/SiteController/extraservice/sitekey/dbms.prime-idc.jp/client_code/코드번호
|
|
public function billpaper(mixed $sitekey = null, mixed $client_code = null): string
|
|
{
|
|
if ($sitekey === null) {
|
|
$sitekey = $this->getSegments('sitekey');
|
|
if ($sitekey === null) {
|
|
throw new \Exception("sitekey 값이 정의되지 않았습니다.");
|
|
}
|
|
}
|
|
if ($client_code === null) {
|
|
$client_code = $this->getSegments('client_code');
|
|
if ($client_code === null) {
|
|
throw new \Exception("client_code 값이 정의되지 않았습니다.");
|
|
}
|
|
}
|
|
$this->siteInfo = DBMS_SITEINFOS[$sitekey];
|
|
if (!$this->siteInfo) {
|
|
throw new \Exception("[{$sitekey}] 값에 해당하는 사이트정보가 존재하지 않습니다.");
|
|
}
|
|
$this->client = $this->getClientService()->getEntitByCode($client_code);
|
|
if (!$this->client) {
|
|
throw new \Exception("[{$client_code}] 값에 해당하는 고객정보가 존재하지 않습니다.");
|
|
}
|
|
return $this->render(__FUNCTION__);
|
|
}
|
|
} //Class
|