#TLShadow-setup-intents

1 messages ยท Page 1 of 1 (latest)

crude tartan
vagrant stream
#

yeah we are already doing that .. problem is .. that i use .completeSetup .. which redirects automatically and it doesn't seem to give me an ifnromation that a redirect happend

#

so i guess i would have to use confirmCard .. with handle action disabeld

crude tartan
#

Sorry, I don't recognize completeSetup can you point me to where you're seeing that?

crude tartan
#

Oh, confirmSetup, that method automatically triggers the 3DS flow if it's needed since you have your customer on your site when that is being triggered.

vagrant stream
#

indeed and i would simply need an information wheater that happens or not

#

because i would need to stop the wordpress script if happens

#

but since its a automatic redirect .. i have few options to detect the change

#

so i was wondering if there is a way .. or i have to do it with confirm card actions disabled and do alle the processing myself

crude tartan
#

Why would you need or want to block the challenge from being displayed?

vagrant stream
#

no i don't want to block the challange

#

but since this is part of the order submission process in wordpress

#

i need to stop the order submission

#

else the dialog will be displayed and wordpress does another redirect to the success page, which would kill the 3ds overlay

#

so in case of 3ds i need to stop the normal process .. let 3ds complete ... and listen for the 3ds complete message to somewhat continue the normal prcoess

crude tartan
#

Sorry, I'm not sure I'm understanding the situation.

confirmSetup will display the 3DS challenge if it's required, and then after the challenge flow is completed the function redirects the browser to the site defined in the return_url parameter that you provide. Could you provide your success page as the return_url and allow confirmSetup to redirect there instead of another script?

vagrant stream
#

the problem is its a one page checkout, so we can't leave the page so return_url is not really an option

#

and the problem is .. there are further scripts and processing that are triggered .. in case no 3ds secure happens this takes place .. now with 3ds happening .. it also happens and all looks like the payment would be complete though 3ds hasn#t yet been confiremd by the user

#

so if i use the normal return_url the whole processing on wordpress would happen

#

and sorry nothing is meant offensive, the last days have been quite stressfull because of this topic so i'm a bit on the edge, and sorry if anything soudns agressive, i'm real glad for the provided help

crude tartan
#

No worries, no aggression being felt here! I know chaining all of this together can be quite tedious.

I don't think it's possible to intercept our scripts based on when they try to trigger an authentication flow.

I think in order to achieve something like this you would need to use Stripe.js to create a Payment Method, pass the created Payment Method to your server, confirm the Setup Intent server side, and then check to see where it moved to a requires_action state.

Were you thinking of using our Payment Element to collect payment method information, and if so were you thinking of accept types of Payment Methods other than cards?

vagrant stream
#

well we are already using payment elements to collect the information ... since we try to keep the payment information strictly to stripe (PCI compliance as you know)

#

currently the flow is .. to create a setup intent on each checkout .. use that to display element form (iframe) inline .. then collect the payment information in a setup intent .. and pass that intent to you backend .. attach it to a customer and then initiate the payment intent with that customer and payment method once the order has been completed/confirmed

#

and that inline method is more or less only for cards now .. the other methods like klarna use the whitelabel checkout provided by stripe once the order is complete

#

if it would be possible to extend it to klarna/giropay/sepa it would be nice to have .. but definitley a future topic .. currently we just need a stable inline flow for cards

crude tartan
#

The reason that I wanted to bring up other types of payment methods if you're using the Payment Element, is that some of those do full-page redirects as part of their authentication process. So I'm worried if you have too many scripts trying to run on that page it'll keep giving your troubles as you try to expand.

What is your wordpress script handling?

vagrant stream
#

yeah i'm aware of that problem that other payment method would require a diffrent approach or are not even handable without redirect
what do you mean by wordpress script handling ?

crude tartan
#

The impression that I've gotten is that there are scripts running on your site, and you're trying to figure out how to tell when 3DS is triggered so you can pause those scripts. I'm curious what those scripts are handling, could they be moved to run at a different part of the process?

vagrant stream
#

ah the problem is its the default wordpress/woocommerce script handling the submit

#

our script currently simply intercepts the pay now button .. submits the payment information to stripe by calling completeSetup ... and then tells woocommerce to continue or stop on error

#

and since 3ds returns niether .. it kinda is seen as success .. and the script continues to run as long as no full page redirect is happening

#

so currently my approach would be .. to switch to confirmCardSetup ... and disable automatic action handling .. and then continue handling those steps in the client script

crude tartan
#

I don't think confirmCardSetup works with the Payment Element. It's meant for use with Card Elements.

vagrant stream
#

ok thats something diffrerent ?

crude tartan
#

Correct, the Card Elements only accept card information, and can't handle other types of payment methods the way the Payment Element can.

vagrant stream
#

ah ok .. that would be okay .. since this implementation would be completly card specific then

crude tartan
#

Sorry, that's for accepting a payment, let me see if we have a Setup Intent specific version.

vagrant stream
#

its around the same corner .. you can switch them for most cases ๐Ÿ™‚

#

just the finalization is a bit different ๐Ÿ™‚

crude tartan
#

Yup, exactly.

vagrant stream
#

ok so guess next step is for me to implment card elements ๐Ÿ™‚ thanks, if i ran into a nother wall i'll ask again

crude tartan
#

Sounds good, we'll be here!