#jokamax

1 messages · Page 1 of 1 (latest)

primal duneBOT
lofty pike
#

(If I'm not clear : don't hesitate to say it to me)

ancient zenith
#

if you do want to do it the way you describe I don't think it's possible as there isn't a way to force the redirect_to_url action for Subscription PaymentIntents unfortunately

lofty pike
#

No We can't (and don"t want) to use stripe subscription. We handle simple payment, and repeating payment via stripe payment intent session_off

#

We use payment intent with session_off and somtimes it's OK and sometimes "requires_action" (Ok for that). I just want to now the correct way when we encouter requires_actions to finish payment

ancient zenith
lofty pike
#

Yes : After confirmation, if a PaymentIntent object displays the required_action state, confirm its next_action property. If set to redirect_to_url, 3DS authentication is required.

#

My question is : is it possible to use bakend object

#

paymentIntent.getNextAction().getRedirectToUrl().getUrl()

#

?

#

is it always filled in this case ?

ancient zenith
#

that gives you the URL that the customer visits

#

it's filled in if you passed return_url when confirming the PaymentIntent and 3DS was then required

lofty pike
#

Ohhhhh if I don't fill return_url : the redirect not work ??

#

(not work == is empty)

ancient zenith
#

if you don't pass return_url the next action type will be use_stripe_sdk and there is no URL to access since it's assumed you'll use our frontend

lofty pike
#

Ok I understand

#

So last question on a production case

#

I have two type in production of requires_action :

#
  1. https://dashboard.stripe.com/payments/pi_3O23VkHagJ8u1cfk0p9HILRO

https://dashboard.stripe.com/payments/pi_3O1sGpHagJ8u1cfk10WhMQV6
In case 1. json seem to have an URL (american express)
In case 2. json no have URL
Is the solution with returnUrl + redirectUrl will work for this case 2 ???

#

Oups : I'll give you the pi_xxxx

#
  1. "pi_3O23VkHagJ8u1cfk0p9HILRO"
  2. "pi_3O1sGpHagJ8u1cfk10WhMQV6"
ancient zenith
#

if you need a url you must pass return_url

#

it's wrong(and it's the mistake you're making) to try to find a URL inside the use_stripe_sdk object and redirect to that, that will not work consistently/at all. You need to pass return_url if you want to handle the redirect yourself.

lofty pike
#

Perfectly clear !
Thanks : i'll developpe the solution on this way