woocommerce / woocommerce-gateway-stripe

The official Stripe Payment Gateway for WooCommerce
https://wordpress.org/plugins/woocommerce-gateway-stripe/
231 stars 202 forks source link

Stripe modal & validation issue #391

Closed trilame closed 6 years ago

trilame commented 6 years ago

Hello, I'm facing an issue with the stripe modal feature. Basically, some validation checks (postcode format, phone number format, etc.) are triggered after after the Stripe modal popup is filled. So, we click pay, put card information, validate (it looks like everything went well in the modal), but we are back on the checkout page, with errors. I tested it with the last version but as well with 4.0 beta.

It is exactly what is described here: https://github.com/woocommerce/woocommerce-gateway-stripe/issues/161 https://github.com/woocommerce/woocommerce-gateway-stripe/issues/243

It is supposed to be fixed in 4.0, but unfortunately, I'm still facing it with the last beta...

Affected ticket(s)

What I expected

Woocommerce validations to be runned before showing the Stripe modal page, not after.

What happened instead

If there are errors in field post code (for example, text instead of numbers for country France), we can still access to the Stripe modal. After validation of the strip modal, we are back on the checkout page with the postcode error.

Steps to reproduce the issue

WC: 3.2.1 WP: 4.8.2 Woocommerce stripe gateway: last commit here

Thank you :) !

roykho commented 6 years ago

Did you test this on mobile or desktop?

trilame commented 6 years ago

On both

roykho commented 6 years ago

It works on desktop only. Does it validate if you left it empty?

roykho commented 6 years ago

Ok I think this validation is specific to format of the postcode. It validates if input was entered but not necessarily the format. This will be fixed when 4.0 is released. Thanks for reporting.

trilame commented 6 years ago

Hello @roykho I did some tests on desktop only.

If I left empty, the behavior is as expected (doesn't show the modal but a warning message).

I also tested on other fields, and i have the same problem with "Billing phone" If I leave Billing phone empty, it works as expected (doesn't show the modal but a warning message).

If it can help: my wordpress is in French, my theme still in english.

Regards