#seruymt
1 messages · Page 1 of 1 (latest)
hi! hmm, if you're using our Magento plugin I don't think you have to do any of that really, the plugin implements all those flows for you.
Hi
it will work in case when you are using magento HTML frontend.. but we are using headless magento (only like backend) and separate frontend (PWA)
hmm ok. I have no idea what that is but can try to help.
overall the steps you mention are correct.
Because when you confirm transaction on frontend (stripe.confirmPayment) you got the error while placing order since transaction already confirmed.
Is that an error from the Stripe API? If you're getting that error it means you're probably creating the PaymentIntent incorrectly. Do you have an examplepi_xxxPaymentIntent that you tested with and got that error?
well on the Stripe side that all looks good and was a normal PaymentIntent, successfully confirmed and handled between a back and a front end, no errors.
the problem, frontend confirm the transaction (which is really weird for me) and while placing order stripe magento extension expect that transaction shouldn't be confirmed and as a result throw the exception
we need to have the flow to fill CC data on frontend and confirm transaction on backend
well that's not really something we officially support today, as you say, its's a beta.
Usually it works the way that PaymentIntent you linked worked — you confirm on the frontend, which processes the PaymentIntent, and you use webhooks to be notified of the success.
yeah, but confirmation expect already created order (when stripe sends webhook) and according to the flow place order happening only after customer fill stripe form with CC data and click the button.. one more thing, we have additional internal validators on place order event, thats why we need to confirm payment on backed after all checks pass
makes sense i think. Bear in mind I know nothing about Magento or our plugin(support for that is handled by a different team, I work with developers directly integrating with the API). Ultimately I would assume you just can't do what you want here without building a direct integration with Stripe and not using any plugin.
ok, lets forget we have any plugins.. lets discuss a flow and figure out the sequence of stripe requests
is this logic works with apple/google pay?
you can make it work if you add a PaymentRequestButton integration to the page as as well https://stripe.com/docs/stripe-js/elements/payment-request-button