getdokan / dokan

Multivendor marketplace platform
https://wordpress.org/plugins/dokan-lite/
248 stars 191 forks source link

Stripe Express integration error #2302

Open daniel-toader opened 3 days ago

daniel-toader commented 3 days ago

Bug Description

On June 20th, I opened a support ticket on dokan.co (#67904).

Fast forward to today, I received a response from Md Fayeakuzzaman advising me to address my issue here on GitHub / Dokan.

I recognize that you've identified an error that appears to be related to integration rather than being a site-specific issue. Additionally, I see that you have previously reported this same problem. I am deeply sorry for any inconvenience this may have caused you.

Our support team primarily handles site-specific issues, which is why this particular matter has taken longer to address. Since you've identified it as an integration-oriented issue...

The related similar issue: https://github.com/getdokan/dokan/issues/2168

Here's the new issue I'm encountering with the Stripe Express integration: When a customer changes their card, a problem occurs.

448701602_1279477633014952_1083772132536310086_n

Step To Reproduce

I enabled test mode using a Stripe Express test account and test cards, which can be found here: https://docs.stripe.com/testing.

Steps to reproduce the integration error: I attempted a payment with a Stripe test card that had insufficient funds, using the number 4000000000009995.

Result: "Payment failed, insufficient funds."

Without leaving the checkout page or making any changes, I then attempted to complete the order using a different Stripe test card, the well-known 4242424242424242.

On the first click on the place the order button: "We're not able to process this payment. Please try again later."

On the second click on the place the order button: "You cannot modify the customer on a PaymentIntent once it has already been set. To fulfill a payment with a different customer, cancel this PaymentIntent and create a new one."

Leaving the checkout and returning starts a new payment session, and the payment with the second test card is successful.

Expected Behaviour

Ideally, the payment intent should update to the "new customer" or retain the "old customer" given the client is the same, and only the card changes.