#TLShadow-setup-intents
1 messages ยท Page 1 of 1 (latest)
Hi ๐ yes, Setup Intents go into a requires_action state when they require customer action such as completing a 3DS challenge. You can review the full lifecycle of Setup Intents here:
https://stripe.com/docs/payments/intents
You can also use webhooks to listen for the associated setup_intent.requires_action events that are generated when that happens:
https://stripe.com/docs/api/events/types#event_types-setup_intent.requires_action
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
Sorry, I don't recognize completeSetup can you point me to where you're seeing that?
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.
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
Why would you need or want to block the challenge from being displayed?
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
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?
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
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?
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
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?
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 ?
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?
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
I don't think confirmCardSetup works with the Payment Element. It's meant for use with Card Elements.
ok thats something diffrerent ?
Correct, the Card Elements only accept card information, and can't handle other types of payment methods the way the Payment Element can.
ah ok .. that would be okay .. since this implementation would be completly card specific then
You can use this as a reference guide for working with that type of element:
https://stripe.com/docs/payments/accept-card-payments?platform=web&ui=elements
Sorry, that's for accepting a payment, let me see if we have a Setup Intent specific version.
its around the same corner .. you can switch them for most cases ๐
just the finalization is a bit different ๐
Yup, exactly.
ok so guess next step is for me to implment card elements ๐ thanks, if i ran into a nother wall i'll ask again
Sounds good, we'll be here!