diff --git a/Api/TpayInterface.php b/Api/TpayInterface.php index f9576a6..8b4aeca 100644 --- a/Api/TpayInterface.php +++ b/Api/TpayInterface.php @@ -42,7 +42,7 @@ public function getOpenApiPassword(): ?string; public function getApiKey(): ?string; - public function getSecurityCode(): ?string; + public function getSecurityCode(?int $storeId = null): ?string; public function getOpenApiClientId(): ?string; @@ -66,7 +66,7 @@ public function getTermsURL(): string; /** Check if send an email about the new invoice to customer */ public function getInvoiceSendMail(): string; - public function useSandboxMode(): bool; + public function useSandboxMode(?int $storeId = null): bool; /** Check if checkout amount is in range of installments payment channel */ public function getInstallmentsAmountValid(): bool; diff --git a/Model/Tpay.php b/Model/Tpay.php index bfdca5a..b0fc16d 100755 --- a/Model/Tpay.php +++ b/Model/Tpay.php @@ -224,9 +224,9 @@ public function getOpenApiClientId(): ?string return $this->getConfigData('openapi_settings/open_api_client_id'); } - public function getSecurityCode(): ?string + public function getSecurityCode(?int $storeId = null): ?string { - return $this->getConfigData('general_settings/security_code'); + return $this->getConfigData('general_settings/security_code', $storeId); } public function onlyOnlineChannels(): bool @@ -274,9 +274,9 @@ public function isOriginApiCardUse(): bool return (bool) $this->getConfigData('cardpayment_settings/cardpayment_origin_api_use'); } - public function useSandboxMode(): bool + public function useSandboxMode(?int $storeId = null): bool { - return (bool) $this->getConfigData('general_settings/use_sandbox'); + return (bool) $this->getConfigData('general_settings/use_sandbox', $storeId); } public function getPaymentRedirectUrl(): string