Skip to content

Commit

Permalink
chore: Hide decline reason from end user
Browse files Browse the repository at this point in the history
  • Loading branch information
brtkwr committed Oct 24, 2024
1 parent 5e7e6bc commit c0d5d73
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 57 deletions.
7 changes: 0 additions & 7 deletions i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
"Amount is missing","Amount is missing"
Branding,Branding
"Buy now, receive your goods, pay your invoice later.","Buy now, receive your goods, pay your invoice later."
"Buyer address is invalid.","Buyer address is invalid."
"Buyer authentication failed.","Buyer authentication failed."
"Buyer info is inconsistent.","Buyer info is inconsistent."
"Buyer limit exceeded.","Buyer limit exceeded."
"Buyer not found.","Buyer not found."
"By checking this box, I confirm that I have read and agree to the %1.","By checking this box, I confirm that I have read and agree to the %1."
"Check last 100 debug log records","Check last 100 debug log records"
"Check last 100 error log records","Check last 100 error log records"
Expand Down Expand Up @@ -78,9 +73,7 @@ Payment,Payment
"Please try again later.","Please try again later."
Production,Production
Project,Project
Reason,Reason
"Registered Organisation","Registered Organisation"
"Risk too high.","Risk too high."
Sandbox,Sandbox
Search,Search
"Search for company","Search for company"
Expand Down
7 changes: 0 additions & 7 deletions i18n/nb_NO.csv
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
"Amount is missing","Beløp mangler"
Branding,Merkevarebygging
"Buy now, receive your goods, pay your invoice later.","Kjøp nå, motta varene dine, betal fakturaen senere."
"Buyer address is invalid.","Kjøperens adresse er ugyldig."
"Buyer authentication failed.","Kjøperautentisering feilet."
"Buyer info is inconsistent.","Kjøperinformasjon er inkonsekvent."
"Buyer limit exceeded.","Kjøpsgrense er nådd."
"Buyer not found.","Kjøper ikke funnet."
"By checking this box, I confirm that I have read and agree to the %1.","Ved å krysse av denne boksen bekrefter jeg at jeg har lest og godtar %1."
"Check last 100 debug log records","Sjekk siste 100 feilsøkingsloggposter"
"Check last 100 error log records","Sjekk siste 100 feilloggposter"
Expand Down Expand Up @@ -78,9 +73,7 @@ Payment,Betaling
"Please try again later.","Vennligst prøv igjen senere."
Production,Produksjon
Project,Prosjekt
Reason,Årsak
"Registered Organisation","Registrert organisasjon"
"Risk too high.","For høy risiko."
Sandbox,Sandbox
Search,Søk
"Search for company","Søk etter selskap"
Expand Down
7 changes: 0 additions & 7 deletions i18n/nl_NL.csv
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
"Amount is missing","Bedrag ontbreekt"
Branding,Merknaam
"Buy now, receive your goods, pay your invoice later.","Koop nu, ontvang uw goederen, betaal uw factuur later."
"Buyer address is invalid.","Het adres van de koper is ongeldig."
"Buyer authentication failed.","Authenticatie van koper mislukt."
"Buyer info is inconsistent.","De informatie over de koper is inconsistent."
"Buyer limit exceeded.","Koperslimiet overschreden."
"Buyer not found.","Koper niet gevonden."
"By checking this box, I confirm that I have read and agree to the %1.","Door dit vakje aan te vinken bevestig ik dat ik de %1 heb gelezen en ermee akkoord ga."
"Check last 100 debug log records","Controleer de laatste 100 debug-logboek records"
"Check last 100 error log records","Controleer de laatste 100 foutenlogboek records"
Expand Down Expand Up @@ -78,9 +73,7 @@ Payment,Betaling
"Please try again later.","Probeer het later opnieuw."
Production,Productie
Project,Project
Reason,Reden
"Registered Organisation","Geregistreerde organisatie"
"Risk too high.","Risico te hoog."
Sandbox,Zandbak
Search,Zoekopdracht
"Search for company","Zoek naar bedrijf"
Expand Down
7 changes: 0 additions & 7 deletions i18n/sv_SE.csv
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
"Amount is missing","Belopp saknas"
Branding,Branding
"Buy now, receive your goods, pay your invoice later.","Köp nu, få dina varor, betala din faktura senare."
"Buyer address is invalid.","Köparens adress är ogiltig"
"Buyer authentication failed.","Köparens autentisering misslyckades."
"Buyer info is inconsistent.","Köparinformation är inkonsekvent."
"Buyer limit exceeded.","Inköpsgränsen har uppnåtts."
"Buyer not found.","Köparen hittades inte."
"By checking this box, I confirm that I have read and agree to the %1.","Genom att markera denna ruta bekräftar jag att jag har läst och godkänner %1."
"Check last 100 debug log records","Kontrollera de senaste 100 felsökningsloggposterna"
"Check last 100 error log records","Kontrollera de senaste 100 felloggposterna"
Expand Down Expand Up @@ -78,9 +73,7 @@ Payment,Betalning
"Please try again later.","Försök igen senare."
Production,Produktion
Project,Projekt
Reason,Orsak
"Registered Organisation","Registrerad organisation"
"Risk too high.","För hög risk."
Sandbox,Sandbox
Search,Sök
"Search for company","Sök efter företag"
Expand Down
30 changes: 1 addition & 29 deletions view/frontend/web/js/view/payment/method-renderer/two_payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,40 +243,12 @@ define([
message: this.orderIntentApprovedMessage
});
} else {
this.showErrorMessage(this.getDeclinedErrorMessage(response.decline_reason));
this.showErrorMessage(this.orderIntentDeclinedMessage);
}
} else {
this.showErrorMessage(this.generalErrorMessage);
}
},
getDeclinedErrorMessage: function (declineReason) {
var message = this.orderIntentDeclinedMessage,
reason = '';
switch (declineReason) {
case 'TOO_HIGH_RISK':
reason = $t('Risk too high.');
break;
case 'BUYER_LIMIT_EXCEEDED':
reason = $t('Buyer limit exceeded.');
break;
case 'BUYER_NOT_FOUND':
reason = $t('Buyer not found.');
break;
case 'BUYER_ADDRESS_DEVIATION':
reason = $t('Buyer address is invalid.');
break;
case 'BUYER_INFO_INCONSISTENT':
reason = $t('Buyer info is inconsistent.');
break;
case 'BUYER_AUTHENTICATION_FAILED':
reason = $t('Buyer authentication failed.');
break;
}
if (reason) {
message += ' ' + $t('Reason') + ': ' + reason;
}
return message;
},
processOrderIntentErrorResponse: function (response) {
var message = this.generalErrorMessage,
self = this;
Expand Down

0 comments on commit c0d5d73

Please sign in to comment.