Skip to content

Commit 432c635

Browse files
Merge pull request #91 from ratepay/M2-90-No-errormessage-on-invalid-IBAN
M2-90 - Refined invalid IBAN error message mechanism
2 parents a51a6c7 + 23965ff commit 432c635

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Model/Method/AbstractMethod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ public function authorize(\Magento\Payment\Model\InfoInterface $payment, $amount
324324
throw new DisablePaymentMethodException(__($message), $sMethodCode); // RatePAY Error Message
325325
} else {
326326
$sReason = $resultRequest->getReasonMessage();
327-
if (empty($message) && stripos($sReason, "IBAN is invalid") !== false) {
327+
if (empty($message) && stripos($sReason, "IBAN") !== false && stripos($sReason, "invalid") !== false) {
328328
$message = __($sReason);
329329
}
330330
throw new PaymentException(__($message)); // RatePAY Error Message

i18n/de_DE.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ ratepay_terms_block_6, "einverstanden." ,module,RatePAY_Payment
169169
"Determines when the capture call is sent to Ratepay API","Legt fest zu welchem Zeitpunkt der Capture call an die Ratepay API gesendet wird.",module,RatePAY_Payment
170170
"Active payment types","Aktive Zahlarten",module,RatePAY_Payment
171171
"Validation failed: Bank-account parameter IBAN is invalid.","Validierung fehlgeschlagen: Angegebene IBAN ist ungültig",module,RatePAY_Payment
172+
"Validation failed: Bank-account parameter IBAN (DE) has invalid length (must be 22).","Validierung fehlgeschlagen: Angegebene IBAN hat eine ungültige Länge (muss 22 Zeichen lang sein).",module,RatePAY_Payment
172173
"Ratepay_invoice","Rechnung",module,RatePAY_Payment
173174
"Ratepay_installment","Ratenzahlung",module,RatePAY_Payment
174175
"Ratepay_installment0","0% Finanzierung",module,RatePAY_Payment

0 commit comments

Comments
 (0)