diff --git a/Gateway/Http/Client/ApiClient.php b/Gateway/Http/Client/ApiClient.php index 1a80dcc..f0ec1e3 100644 --- a/Gateway/Http/Client/ApiClient.php +++ b/Gateway/Http/Client/ApiClient.php @@ -97,7 +97,7 @@ public function sendPostRequest($transferObject, $path, $request) $exc->getMessage() ); // phpcs:ignore Magento2.Exceptions.DirectThrow - throw new LocalizedException('Invalid JSON was returned by the gateway'); + throw new LocalizedException(__('Invalid JSON was returned by the gateway')); } return $data; @@ -143,7 +143,7 @@ public function sendGetRequest($transferObject, $path) $exc->getMessage() ); // phpcs:ignore Magento2.Exceptions.DirectThrow - throw new LocalizedException('Invalid JSON was returned by the gateway'); + throw new LocalizedException(__('Invalid JSON was returned by the gateway')); } return $data; diff --git a/Model/Api/ConsultPSInstallments.php b/Model/Api/ConsultPSInstallments.php index c6486e0..e84d80e 100644 --- a/Model/Api/ConsultPSInstallments.php +++ b/Model/Api/ConsultPSInstallments.php @@ -134,7 +134,7 @@ public function getPagBankInstallments($storeId, $creditCardBin, $amount) } } catch (InvalidArgumentException $exc) { // phpcs:ignore Magento2.Exceptions.DirectThrow - throw new LocalizedException('Invalid JSON was returned by the gateway'); + throw new LocalizedException(__('Invalid JSON was returned by the gateway')); } return $response; diff --git a/Plugin/VaultAddtionalCommand.php b/Plugin/VaultAddtionalCommand.php index 71e0670..a8658fc 100644 --- a/Plugin/VaultAddtionalCommand.php +++ b/Plugin/VaultAddtionalCommand.php @@ -460,7 +460,7 @@ public function validate() */ public function order(\Magento\Payment\Model\InfoInterface $payment, $amount) { - throw new LocalizedException('Not implemented'); + throw new LocalizedException(__('Not implemented')); } /** @@ -471,7 +471,7 @@ public function order(\Magento\Payment\Model\InfoInterface $payment, $amount) public function authorize(\Magento\Payment\Model\InfoInterface $payment, $amount) { if (!$payment instanceof OrderPaymentInterface) { - throw new LocalizedException('Not implemented'); + throw new LocalizedException(__('Not implemented')); } /** @var $payment OrderPaymentInterface */ $this->attachTokenExtensionAttribute($payment); @@ -504,11 +504,11 @@ public function authorize(\Magento\Payment\Model\InfoInterface $payment, $amount public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount) { if (!$payment instanceof OrderPaymentInterface) { - throw new LocalizedException('Not implemented'); + throw new LocalizedException(__('Not implemented')); } if ($payment->getAuthorizationTransaction()) { - throw new LocalizedException('Capture can not be performed through vault'); + throw new LocalizedException(__('Capture can not be performed through vault')); } $this->attachTokenExtensionAttribute($payment); @@ -609,7 +609,7 @@ protected function attachCreditCardInfo(OrderPaymentInterface $payment): void */ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) { - throw new LocalizedException('Not implemented'); + throw new LocalizedException(__('Not implemented')); } /** @@ -619,7 +619,7 @@ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) */ public function cancel(\Magento\Payment\Model\InfoInterface $payment) { - throw new LocalizedException('Not implemented'); + throw new LocalizedException(__('Not implemented')); } /** @@ -629,7 +629,7 @@ public function cancel(\Magento\Payment\Model\InfoInterface $payment) */ public function void(\Magento\Payment\Model\InfoInterface $payment) { - throw new LocalizedException('Not implemented'); + throw new LocalizedException(__('Not implemented')); } /** @@ -639,7 +639,7 @@ public function void(\Magento\Payment\Model\InfoInterface $payment) */ public function canReviewPayment() { - throw new LocalizedException('Not implemented'); + throw new LocalizedException(__('Not implemented')); } /** @@ -649,7 +649,7 @@ public function canReviewPayment() */ public function acceptPayment(InfoInterface $payment) { - throw new LocalizedException('Not implemented'); + throw new LocalizedException(__('Not implemented')); } /** @@ -659,7 +659,7 @@ public function acceptPayment(InfoInterface $payment) */ public function denyPayment(InfoInterface $payment) { - throw new LocalizedException('Not implemented'); + throw new LocalizedException(__('Not implemented')); } /**