Skip to content

Commit

Permalink
Merge pull request #55 from ham1lts/fix-phrase
Browse files Browse the repository at this point in the history
PagBank 😍 Magento
  • Loading branch information
elisei authored Mar 20, 2024
2 parents ac58a20 + 84b0abd commit e01751b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Gateway/Http/Client/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Model/Api/ConsultPSInstallments.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions Plugin/VaultAddtionalCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}

/**
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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'));
}

/**
Expand All @@ -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'));
}

/**
Expand All @@ -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'));
}

/**
Expand All @@ -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'));
}

/**
Expand All @@ -649,7 +649,7 @@ public function canReviewPayment()
*/
public function acceptPayment(InfoInterface $payment)
{
throw new LocalizedException('Not implemented');
throw new LocalizedException(__('Not implemented'));
}

/**
Expand All @@ -659,7 +659,7 @@ public function acceptPayment(InfoInterface $payment)
*/
public function denyPayment(InfoInterface $payment)
{
throw new LocalizedException('Not implemented');
throw new LocalizedException(__('Not implemented'));
}

/**
Expand Down

0 comments on commit e01751b

Please sign in to comment.