Closed softwaredevzestgeek closed 3 months ago
Hi @softwaredevzestgeek, what do you have set as the 'API_HOST'? Also, have you added your own custom functions to your WordPress site?
@scottyzen i reached out to softwaredevzestgeek for help in getting the 3ds to work. This PR was the work in progress of that effort. Since then I've made some more progress.
I created a plugin which extends the graphql library to expose a createPaymentIntent method:
https://github.com/Amcolex/wc-stripe-headless-graphql
and the corresponding frontend checkout flow:
https://github.com/Amcolex/woonuxt/tree/feature/stripe-payment-intent-flow
The trick I'm using is triggering the checkout at the start (which fails), in order to create an order+orderKey, and then use that to generate the proper Payment Intent from the backend. Its a bit hacky, but I don't know of a better solution.
Once the payment is completed the stripe webhook automatically sets the order status to 'Processing'.
This is all very new to me, so i have no idea if this is actually any good. If it makes sense, I'd be happy to see these merged into woonuxt-settings and woonuxt
‼️ Deploy request for sleepy-chandrasekhar-717c3d rejected.