#Ante75

1 messages · Page 1 of 1 (latest)

lament thunderBOT
light grail
#

đź‘‹ happy to help

#

you shouldn't use the URL for next action

#

this should take care of handling 3DS

#

for you

turbid spire
#

this problem is only with payments with 3d secure, but i don't understand what to do after the "requires_action" response

#

do I have to open a webView ? but in newAction I find "use_stripe_sdk"

I do not understand...

light grail
#

is this for mobile?

turbid spire
#

yes

light grail
#

what are you using? React native?

turbid spire
#

Xamarin forms

light grail
#

you can't use Stripe.js

#

with mobile

#

and we don't really support Xamarin

turbid spire
#

everything works perfectly,

#

the only problem is the cards with 3d secure

light grail
#

that doesn't mean it's OK

#

there's a huge risk with this, and we really don't recommend this at all

turbid spire
#

I do not know what you mean...

we followed all your guides

light grail
#

which one?

#

for web?

turbid spire
#

no for mobile iOS and Android

#

we integrated everything with the Stripe API

light grail
#

how did you that with Xamarin though?

turbid spire
#

is it available for Xamarin form, I don't understand what you mean

light grail
#

are you using Xamarin as a hybrid mobile app development kit?

#

are you using Stripe.js in a webview?

turbid spire
#

I use Stripe API in Xamarin Forms

light grail
#

the Stripe-dotnet is meant for the server-side code

#

not a mobile or web application

turbid spire
#

we used this api without no problems for mobile. We need only to know how this api works for the 3ds. Nobody tell us that this api doesen't work for xamarin.

atomic fractal
#

Hi, I'm taking over my colleague.

#

Backend SDKs are not designed to handle 3DS.

turbid spire
#

and so what can we do?

#

we have already do all the other stuff with this sdk

#

the only problem is with sdk. Rebuild everything only for this would be a big problem

#

*3ds

#

can we use stripe without 3ds?

atomic fractal
#

If the bank asks for 3DS you will need to handle it somehow, otherwise the payment fails.

#

If you use Stripe.js, stripe-ios, stripe-android or stripe-react-native, it will be handled for you.

turbid spire
#

we can't rebuild in native all the app only for this. The only problem is that the answer of paymentintentservice the status is "requires_action" . But in new_action the redirect to url is null

atomic fractal
#

Could you please share the PaymentIntent ID? pi_xxx

turbid spire
#

pi_3MgnWgR9sfcnxwPB01M2oDXn

atomic fractal
#

This URL is designed to be used by Stripe.js.

#

I understand you invested a lot in your Xamarin application and it's not easy to rebuild it now.
However, there're some facts that I'd like to stress:

  • You should never use your secret key on the frontend sk_xxx, otherwise your whole Stripe account can be compromised.
  • stripe-dotnet is not designed to be used on the frontend, even if your frontend shares the programming language with the backend. That's why there's separate stripe-node and Stripe.js. It's the wrong tool for the job and it's likely a waste of time to try to make it work.
#

One solution I see is to use Stripe Checkout, and redirect the user outside of your app for payment: https://stripe.com/docs/payments/checkout/how-checkout-works

You can generate links on your backend, and then redirect the users away from your own frontend. You can use return_url to return them to your app.

turbid spire
#

but is this yours?

noble herald
#

It is yep

turbid spire
#

how can you say we can't use it?

noble herald
#

Nobody has said not to use it, but how you're using it is wrong

turbid spire
#

I don't understand why my way is wrong,

I use this method:

var createOptions = new PaymentIntentCreateOptions
{
Amount = (long)Amount,
Currency = App.Currency,
Description = Description,
Customer = App.StripeClientId,
ApplicationFeeAmount = ApplicationFeeAmount,
PaymentMethod = PaymentMethodId,
Confirm = true,
CaptureMethod = "manual",
ReceiptEmail = ReceiptEmail,
PaymentMethodOptions = new PaymentIntentPaymentMethodOptionsOptions()
{
Card = new PaymentIntentPaymentMethodOptionsCardOptions()
{
RequestThreeDSecure = "automatic"
}
}
};

var paymentIntentService = new PaymentIntentService();
                  var paymentIntentServiceRes = paymentIntentService.Create(createOptions, requestOptions);

if (paymentIntentServiceRes.Status == "requires_capture")
{
... we confirm payments from our servers
}

noble herald
turbid spire
#

are our servers (.net)
who confirm the payment and have the keys

noble herald
#

The confirm/auth flow requires input from your customer (who is making the payment). Those actions cannot be completed server-side, you need a client-side element as outlined on the doc above

turbid spire
#

it is our server that then confirms the payment, the customer only makes the request, the private keys are not provided to the mobiles

noble herald
#

In this instance that isn't enough. Additional action is required for the payment to be completed – the bank/issuer has requested authentication from your user. They need to complete those steps in your front-end application using Stripe.js. Once completed, the status field of the Payment Intent will transition from requires_action to requires_capture.

turbid spire
#

the problem is that after requires_action, the RedirectToUrl is null

#

should I maybe make the PaymentIntentService request with some option to have RequestToUrl ?

noble herald
turbid spire
#

not being able to use Stripe.js, I would like to replace it manually, but not having RedirectToUrl, I can't, this is the problem

#

in newAction I find "use_stripe_sdk" NotRedirectToUrl

noble herald
#

The link above explains how to get a redirect_to_url

turbid spire
#

i'm trying with fake stripe papers

4000000000003220

but after the
paymentIntentService.Create(createOptions, requestOptions)

I receive
paymentIntentServiceRes.Status = "requires_action"

It's inside
paymentIntentServiceRes.NewAction.Type = "use_stripe_sdk"
paymentIntentServiceRes.RedirectToUrl = null

noble herald
#

Can you share a pi_xxx ID?

#

The sounds like a payment following the exact flow I described above

turbid spire
#

pi_3MgoHsR9sfcnxwPB1GuAvYCe

noble herald
#

Did you read the doc I sent?

turbid spire
#

the return_url (from what I understand) is something else, used to redirect the customer at the end of the payment...

the RedirectToUrl (which I don't receive) is the page where to confirm the 3d secure,

noble herald
#

From the doc I shared:

To redirect your customer to the 3DS authentication page, pass a return_url to the PaymentIntent when confirming on the server or on the client. You can also set return_url when creating the PaymentIntent.

After confirmation, if a PaymentIntent has a requires_action status, inspect the PaymentIntent’s next_action. If it contains redirect_to_url, that means 3DS is required.

#

Please try what I suggested

turbid spire
#

🥇

#

❤️

#

finally!, only that was missing...

I can only tell you "thanks for your patience"