Translate card errors
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Translate card errors
Hi,
How is it possible to translate errors when validating the card info in the checkout. Errors like:
Card has expired
Your card's security code is invalid.
...
Thanks !
K.
How is it possible to translate errors when validating the card info in the checkout. Errors like:
Card has expired
Your card's security code is invalid.
...
Thanks !
K.
Re: Translate card errors
If the error messages are returned by Stripe, you should pass the ISO language code via the Stripe API so Stripe returns error messages for that language. In case you want to do some local checks and return errors before sending the data to Stripe, you can use the translate view helper to translate error messages to other languages via the config:
https://aimeos.org/docs/Laravel/Overwrite_translations
Code: Select all
<?= $this->translate( 'client', 'Card number invalid' ); ?>
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star