TransWikia.com

Magento 2 Stripe SCA (3d secure) rest api integration

Magento Asked by Ettore Panini on November 5, 2021

I’m creating a pwa based on magento 2 rest api.
I have installed stripe/stripe-payments official module to integrate stripe payments.
Everything works fine without SCA payments.

i have tried to replicate the same flow of magento’s frontend looking at the request done during the payments.

this is what i do:

1)

POST /guest-carts/:cartId/payment-information
RESPONSE {"message":"Authentication Required: pi_**_secret_**"}
CALL stripe.handleCardAction("pi_**_secret_**");

with that the stripe’s test modal appear.

3)

CLICK COMPLETE BUTTON ON MODAL
REPOST /guest-carts/:cartId/payment-information with same data of 1. (magento frontend make the same request)
RESPONSE {"message":"The provided PaymentMethod is already attached to another object. You cannot reuse PaymentMethods without attaching them to a Customer object first."}

on stripe dashboard i can see that this flow create two payments but with magento’s frontend only one.

what is missing?

Help please 🙂

One Answer

There has been a change which broke 3D Secure with PWA / REST API in versions 1.8.8 - 1.9.1 of the Stripe module. Upgrading to 1.9.2 will fix that issue.

Then you can use the following code to place an order through the REST API:

Answered by snez on November 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP