Closed ryanmitchell closed 3 years ago
I did take a quick look into this myself as I'm having quite a lot of issue swith orders failing to be processed through due to the validation failure for timeslot, email etc also causing payments to be processed when the validation fails as it uses Iframed JS injection for the payment processing.
Is there any recommendation on maybe where to look into to try and find a solution? I'm happy to put time into this if i've given some direction into where to start or how I can help speed the process up in anyway :)
There is no consensus on an approach yet. @sampoyigi needs to make a call on how he sees it working.
When using Mobile when you select the bottom "My Order" button. This takes you to the /cart to confirm your order before going to /checkout. This would seem to be the best place to validate the user data before going to payment page so this would be /location => /cart => /checkout for both mobile and PC and validate the data there before going to /checkout for payment only? @sampoyigi thoughts?
Let's send an AJAX request right before the payment request instead of an extra checkout step (for user experience sake). This technique should be limited to payment gateways that use client SDK. Pointless for gateways such as PayPal and Mollie.
I'll spend some time on an initial version of this in the coming week and we can go from there.
@ryanmitchell let me know if I can help in anyway! This will solve a massive problem I've got with our payment gateway integration.
@JamesThanna You can certainly start if you can, I'm sure Ryan would gladly join in.
Looping back round to the payment button on stripe support and off the back of a discussion on discord.
We should look to do a pre-validation of fields such as email, name etc (anything not payment related) before we attempt payment. It may mean inserting an extra checkout step. This would allow us to support validation without taking payment - currently you can take payment and then find the email is already taken for example.
So either we add an extra step in the checkout or we validate each field on input. Either way it would be a good improvement.