diff --git a/app/Config/Constants.php b/app/Config/Constants.php index 34f2a44..816c6ad 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -205,22 +205,30 @@ define('AUTH_ADAPTERS', [ ]); define("MALLS", [ - "support" => "support@idcjp.jp", - "master" => "master@idcjp.jp", - "title" => "Mall Master", - 'card' => "TEST", - 'payment' => [ + "support" => getenv("mall.support") ?: "support@idcjp.jp", + "master" => getenv("mall.master") ?: "master@idcjp.jp", + "title" => getenv("mall.title") ?: "Mall Master", + 'card' => getenv("mall.card") ?: "TEST", + 'payments' => [ 'CookiePayment' => [ - 'token_url' => getenv("payment.card.pay2.token_url") ?: "{TOKEN 발행 URL}", - 'token_id' => getenv("payment.card.pay2.id") ?: 'cookiepayments에서 발급받은 ID', - 'token_key' => getenv("payment.card.pay2.key") ?: 'cookiepayments에서 발급받은 연동키', - 'api_key' => getenv("payment.card.pay2.apikey") ?: "COOKIEPAY에서 발급받은 연동키", - 'api_url' => getenv("payment.card.pay2.url") ?: "{요청도메인}/keyin/payment", + 'token_url' => getenv("mall.payment.card.pay2.token_url") ?: "{TOKEN 발행 URL}", + 'token_id' => getenv("mall.payment.card.pay2.id") ?: 'cookiepayments에서 발급받은 ID', + 'token_key' => getenv("mall.payment.card.pay2.key") ?: 'cookiepayments에서 발급받은 연동키', + 'api_key' => getenv("mall.payment.card.pay2.apikey") ?: "COOKIEPAY에서 발급받은 연동키", + 'api_url' => getenv("mall.payment.card.pay2.url") ?: "{요청도메인}/keyin/payment", ], ], "banks" => [ - ["name" => "신한은행", "account" => "계좌번호", "holder" => "예금주"], - ["name" => "국민은행", "account" => "계좌번호1", "holder" => "예금주1"], + 'Shinhan' => [ + "name" => getenv("mall.bank.shinhan.name") ?: "신한은행", + "account" => getenv("mall.bank.shinhan.account") ?: "계좌번호", + "holder" => getenv("mall.bank.shinhan.holder") ?: "예금주" + ], + 'Kookmin' => [ + "name" => getenv("mall.bank.kookmin.name") ?: "국민은행", + "account" => getenv("mall.bank.kookmin.account") ?: "계좌번호", + "holder" => getenv("mall.bank.kookmin.holder") ?: "예금주" + ], ], ]); diff --git a/app/Libraries/Adapter/Payment/CookiePayment.php b/app/Libraries/Adapter/Payment/CookiePayment.php index c503304..6d8bc0f 100644 --- a/app/Libraries/Adapter/Payment/CookiePayment.php +++ b/app/Libraries/Adapter/Payment/CookiePayment.php @@ -19,10 +19,10 @@ class CookiePayment extends Payment $adapter = new APIAdapter(); $adapter->setHeader("content-type", "application/json; charset=utf-8"); /* 토큰 발행 API */ - $adapter->setURL(MALLS['payment']['CookiePayment']['token_url']); + $adapter->setURL(MALLS['payments']['CookiePayment']['token_url']); $adapter->setDatas(array( - MALLS['payment']['CookiePayment']['token_id'], - MALLS['payment']['CookiePayment']['token_key'], + MALLS['payments']['CookiePayment']['token_id'], + MALLS['payments']['CookiePayment']['token_key'], )); $token = $adapter->execute(); /* 여기 까지 */ @@ -35,9 +35,9 @@ class CookiePayment extends Payment { $adapter = new APIAdapter(); $adapter->setHeader("content-type", "application/json; charset=utf-8"); - $adapter->setHeader("ApiKey", MALLS['payment']['CookiePayment']['api_key']); + $adapter->setHeader("ApiKey", MALLS['payments']['CookiePayment']['api_key']); $adapter->setHeader("TOKEN", $this->getToken()); - $adapter->setURL(MALLS['payment']['CookiePayment']['api_url']); + $adapter->setURL(MALLS['payments']['CookiePayment']['api_url']); $datas = $this->getDatas(); // array( diff --git a/app/Views/front/billing/billing.php b/app/Views/front/billing/billing.php index 8e54ec3..698d435 100644 --- a/app/Views/front/billing/billing.php +++ b/app/Views/front/billing/billing.php @@ -19,7 +19,7 @@