#deondk-xamarin

1 messages ยท Page 1 of 1 (latest)

white jackal
#

can we just talk here instead? what's your current question?

silk glen
#

do you remember our convo about stripe integration into xamarin with 3DS?

white jackal
#

yes

silk glen
#

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?

white jackal
#

can you share more of the code (like what are parameters and how do you access the URL) so I can check something?

silk glen
#

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();
}

white jackal
#

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)

silk glen
#

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     
                    

                };
white jackal
#

Also the PaymentIntent pi_xxx where you're testing this

#

but yeah, I would assume you're doing the mistake I described

silk glen
#

can you help me to find the testing account Im using in backend?

white jackal
#

a quick way to check is try the card 4000000000003220 , you'll see the next_action is totally different and has no URL

silk glen
#

I have a couple different accounts

white jackal
#

not sure how I could help you exactly. Do you have the pi_xxx PaymentIntent ID?

#

you can log that from your code

silk glen
#

Is there a way to search backend via ID for the accout?

white jackal
#

not really no

#

if you post the ID I can maybe tell you the name of the account it's associated with

silk glen
#

yes that would help a lot

#

acct_1IdFQq2Z7qPIBjK4

white jackal
#

that's an Express account L***Man*****s , belonging to a platform with the same sort of name

silk glen
#

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?

white jackal
#

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.

silk glen
#

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

white jackal
#

that one seems successful yes

white jackal
#

@silk glen @plain thorn will take over for me, I have to run and won't be back until tomorrow

plain thorn
#

Hi! Sorry for the delay. Do you still need help with your question?

silk glen
#

Hi yes

#

I open a webview manually for 3DS in android but for some reason the 3DS url keeps on timing out

silk glen
#

?

vivid goblet
#

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?

silk glen
#

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

vivid goblet
#

do you have a payment intent ID I can take a look at?

silk glen
#

pi_3KjPnG2Z7qPIBjK40PWYD3GM

placid rover
#

Thank you. Checking in to that PI

silk glen
#

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?

placid rover
#

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?

cobalt solar
#

@silk glen still around?

silk glen
#

Hi there

knotty oxide
#

Hey!

silk glen
#

sorry actually just figured the issue out myself

knotty oxide
#

Perfect!