#deondk-xamarin
1 messages ยท Page 1 of 1 (latest)
do you remember our convo about stripe integration into xamarin with 3DS?
yes
what Ive found is when I do this call on client side: var s = stripe.ConfirmPaymentIntentSynchronous(parameters, publishKey);
I can get the 3DS url returned in java
so if I can find a way to convert the java to C# string I should be able to redirect to 3DS from client side after confirming.
should that work?
also how can I search for a test account by ID in backend stripe?
can you share more of the code (like what are parameters and how do you access the URL) so I can check something?
well I get a java dictionary returned and when investigating the java I can find the url in the NextAction object
just need to figure out how to convert it to a c# object
trying something like this now:
var s = stripe.ConfirmPaymentIntentSynchronous(parameters, publishKey);
if (s.NextAction != null)
{
var n = s.NextAction.Values.ToList();
var url = n[3].ToString();
}
that feels wrong to me
is the type of next_action = use_stripe_sdk?
again, can you share more of the code (like what are parameters)? Also the PaymentIntent pi_xxx where you're testing this
I ask because lots of people make a mistake where they try to get a url from inside use_stripe_sdk , which is wrong, since that field is explicitly undocumented, we change it all the time, and it might not contain a URL. I want to make sure you're not falling into that trap. There are solutions for forcing there to consistently be a URL though, we talked about them yesterday (https://stripe.com/docs/payments/3d-secure#manual-redirect)
this is in client side after I get pi from api
in api: var options = new PaymentIntentCreateOptions
{
Amount = (long)payment.Amount * 100,
Currency = currency.CurrencyCode,
Description = payment.Description,
PaymentMethodId = paymentMethod.Id,
ApplicationFeeAmount = (long)totalApplicationFee
};
Also the PaymentIntent pi_xxx where you're testing this
but yeah, I would assume you're doing the mistake I described
can you help me to find the testing account Im using in backend?
a quick way to check is try the card 4000000000003220 , you'll see the next_action is totally different and has no URL
I have a couple different accounts
not sure how I could help you exactly. Do you have the pi_xxx PaymentIntent ID?
you can log that from your code
Is there a way to search backend via ID for the accout?
not really no
if you post the ID I can maybe tell you the name of the account it's associated with
that's an Express account L***Man*****s , belonging to a platform with the same sort of name
most of our accounts have that name in ๐ its our company name
dont worry think I found it
so just to confirm
If I confirm pi in api in backend and get no error then payment is done? Nothing left to do on client side?
no, you need to look at the status of the PaymentIntent, not just if the request failed or not. It might succeed but return the PaymentIntent in a non-terminal status.
ok. pi_3KjJvx2ZHju5IOtm1WX7NA6J
status is succeeded but I cant see it on test account
ok sorry still looking at wrong test account.
it went to acct_1IgVWK2ZHju5IOtm
found it
that one seems successful yes
@silk glen @plain thorn will take over for me, I have to run and won't be back until tomorrow
Hi! Sorry for the delay. Do you still need help with your question?
Hi yes
I open a webview manually for 3DS in android but for some reason the 3DS url keeps on timing out
?
Hello ๐
Apologies for the delay here
channel is super busy today
While I catch up, can you give me a quick summary of what you need help with?
I am manually opening a webview to confirm 3DS in android xamarin
so I confirm the paymentintent in api
then retreive the pi on client side and get the 3DS redirect and open a webview to confirm
but I get a timeout on the link
do you have a payment intent ID I can take a look at?
pi_3KjPnG2Z7qPIBjK40PWYD3GM
Thank you. Checking in to that PI
it seems that when I retreive the pi again then something happens that makes it not working
when I skip that and get the url from backend directly it seems to go through
is there any security involved in that url that will make it not work in certain circumstances?
So you are redirecting to the same URL the same way, but when you retrieve the PaymentIntent an extra time, the redirect doesn't work?
In what way does it not work?
@silk glen still around?
Hi there
Hey!
sorry actually just figured the issue out myself
Perfect!