202-ecommerce / stripe_official

After years of hard work with Stripe connector for PrestaShop, 202 ecommerce stop the development of Stripe module on January 9th 2023. Thanks for all contributors that help us!
20 stars 20 forks source link

Wrong postal code form field #134

Closed Teddy-GFCOM closed 2 years ago

Teddy-GFCOM commented 2 years ago

Hello,

I currently have a PrestaShop 1.7.8.2 with Stripe 2.4.2 installed and configured on it. The website use CloudFlare CDN. My PrestaShop sell only virtual products. PrestaShop is in French (default) and English.

A customer tried to make an order with a address in Canada. Everything worked fine in PrestaShop, except that Stripe Card Form asked for a Postal Code in french format NNNNN instead of a Canadian format, eg. S4T 1T2

The only fix I found was to disable the Postal Code in the form (not recomended)

clotairer commented 2 years ago

Hi @Teddy-GFCOM

This part is totally manage by Stripe Elements which is the front end library of Stripe. According to the stripe documentation : https://stripe.com/docs/js/element/postal_code_formatting postal code format depend of the credit card number. Do you have make the test with a Canadian Credit Card ?

Teddy-GFCOM commented 2 years ago

Hi @clotairer

Thank you.

After testing with a Canadian Credit Card (picked here https://stripe.com/docs/testing#international-cards) the forms works well, there is no issue.