diff --git a/Api/TpayInterface.php b/Api/TpayInterface.php index a18b0b3..264794e 100644 --- a/Api/TpayInterface.php +++ b/Api/TpayInterface.php @@ -32,6 +32,8 @@ public function getApiKey(): ?string; public function getSecurityCode(): ?string; + public function getOpenApiClientId(): ?string; + public function getOpenApiSecurityCode(): ?string; public function getMerchantId(): ?int; diff --git a/Model/ApiFacade/Transaction/TransactionApiFacade.php b/Model/ApiFacade/Transaction/TransactionApiFacade.php index c750cd5..1281c43 100755 --- a/Model/ApiFacade/Transaction/TransactionApiFacade.php +++ b/Model/ApiFacade/Transaction/TransactionApiFacade.php @@ -96,7 +96,7 @@ private function createOriginApiInstance(TpayInterface $tpay) private function createOpenApiInstance(TpayInterface $tpay) { try { - $this->openApi = new OpenApi($tpay->getClientId(), $tpay->getOpenApiPassword(), !$tpay->useSandboxMode()); + $this->openApi = new OpenApi($tpay->getOpenApiClientId(), $tpay->getOpenApiPassword(), !$tpay->useSandboxMode()); $this->openApi->authorization(); $this->useOpenApi = true; } catch (Exception $exception) { diff --git a/Model/Tpay.php b/Model/Tpay.php index b5c8c63..c12805c 100755 --- a/Model/Tpay.php +++ b/Model/Tpay.php @@ -219,9 +219,9 @@ public function getMerchantId(): ?int return (int) $this->getConfigData('merchant_id'); } - public function getOpenApiClientId() + public function getOpenApiClientId(): ?string { - return $this->getConfigData('open_api_client_id') ?? ''; + return $this->getConfigData('open_api_client_id'); } public function getSecurityCode(): ?string