Skip to content

Commit

Permalink
Fix Open API configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
s4ddly committed Jan 11, 2024
1 parent de7bf9d commit 8c2af33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Api/TpayInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public function getApiKey(): ?string;

public function getSecurityCode(): ?string;

public function getOpenApiClientId(): ?string;

public function getOpenApiSecurityCode(): ?string;

public function getMerchantId(): ?int;
Expand Down
2 changes: 1 addition & 1 deletion Model/ApiFacade/Transaction/TransactionApiFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions Model/Tpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8c2af33

Please sign in to comment.