#dilkw-3ds

1 messages · Page 1 of 1 (latest)

grim birch
#

yes, or listen to the event created on your webhook endpoint

#

@mental bear I don't really understand what you're asking and what your code relates to? What's blocking you? which doc are you following?

mental bear
#

Therefore, I should judge whether I need to proceed to the next step according to what conditions, that is, capture.

#

LastPaymentError? or StripeIntent.Status?

#

Because in the onSuccess callback method, there may be a verification failure. If the verification fails, the back-end capture does not need to be notified, and if the verification succeeds, the back-end capture needs to be notified. Which condition should I use to determine whether I need to notify the backend to execute the capture? Or, no matter what, as long as the onSuccess method is called back, the backend should be notified to execute the capture?

grim birch
#

I'm sorry I don't follow you

#

Can you please share a bit more context than just the screenshot of code? What doc are you following? Which platform, which product, etc.

mental bear
#

What I am doing now is Android integration stripe. At present, our process is that the backend creates paymentIntent, app gets client_secret, app goes to confrimPaymentIntent through client_secret, and then executes 3ds. When 3ds is completed, it calls the onPaymentResult method, which is determined by the callback of onPaymentResult. Do you need to notify the backend to capture. This is our process, can you understand?

grim birch
#

Gotcha. So no you don't need to tell anything to your backend

#

by default we automatically capture the funds if the payment succeeds!

mental bear
#

Automatic capture? Is it possible to add any parameters when creating paymentIntent?

grim birch
#

I'm not sure what you're asking

mental bear
#

If we have some orders that need to be reviewed, is it okay to follow the process you said?

grim birch
#

yes, or you can switch to capture_method: 'manual' and manually capture when ready

#

I have to run but @odd schooner on my team can help further if you need!

odd schooner
#

👋

mental bear
#

👋

#

You can look at my chat history to see if there is a problem with the process I said?

odd schooner
#

Feel free to follow up and I would be happy to help

mental bear
#

If I need to notify the backend to capture, is it possible to do so?

#

Or is there no need to notify the backend to capture at all?

odd schooner
#

You already decided to follow this process, correct?

our current process is to create paymentIntent on the backend, app confrim, and then capture on the backend

mental bear
#

Is there such a process now, or do you have better suggestions?

odd schooner
#

It's totally fine as a process, and depends on the needs from your business. I just want to confirm you want to go down that specific usecase

mental bear
#

Okay, I want to continue using this process

odd schooner
#

Okie, that you would want to have some way for your backend to be notified to Capture, that's correct

mental bear
#

I currently notify the backend through the request interface

odd schooner
#

There are 2 ways (1) Rely on webhook at the backend solely, and (2) Inside your onSucceed judge the result and send a request to your backend to Capture

#

Yes so you are using (2). Both ways should work, I believe

mental bear
#

I'm in the onSuccess method, but I don't know which condition should be used to determine whether notification is required in the end, because I tested it and it will execute the onSuccess method when the 3ds verification code is incorrectly filled in.

odd schooner
#

I believe you would need to check the lastError to see the result. Let me find the code

#

But, actually let's use the easier way around (1) listen to payment_intent.amount_capturable_updated event

mental bear
#

Moreover, this situation occurred online. The card issuing bank does not support 3ds, but the payment can still be continued, but the order needs to be reviewed, but when we manually captured it in the stripe background, the final order status was inconsistent.

#

The reason we now guess is that the background capture is not notified.

#

If you set up an automatic capture, how will we get the payment result?

odd schooner
#

I believe if 3D Secure failed due to a processing error, you shouldn't receive the payment_intent.amount_capturable_updated, so isn't it expected?

mental bear
#

Because this is an online problem, there is currently no way to troubleshoot it.

#

Please keep in touch, I will sort out the whole process and send it to you

mental bear
#

StripeIntent.Status status = paymentIntentResult.getIntent().getStatus();
if (status == StripeIntent.Status.Succeeded) {
//Notify the backend capture
}

Is it appropriate to execute in the onSuccess method?

odd schooner
#

Like above statement, yes you could do that, but we commend to not doing it, instead listen on webhook on Backend

mental bear
#

Is there the following situation: When LastPaymentError is not empty, but the status of paymentIntent is requires_capture?

odd schooner
#

Hmm I don't think so

mental bear
#

But what I encountered is this

odd schooner
#

Cau you paste in the Payment Id?

#

or Request Id

#

Did you receive payment_intent.amount_capturable_updated on that case?

#

I think you should received it

mental bear
#

paymentMethod id or paymentIntent id ?

odd schooner
#

PaymentIntent Id

mental bear
#

pi_3JqBeKERyqAJHa2o0ei70bz1

#

Could you please help me look at the specific reason. When the review is completed and manually click on capture, the order status is not synchronized to our backend, but the stripe console has been updated.

prisma wigeon
#

are you sure that you've shared the correct PaymentIntent that shows the review being approved?

mental bear
#

Wait a moment, I will confirm the order

mental bear
#

Let me add the back-end process. When the back-end is notified by the app to go to cpature, the back-end first checks whether it needs a review. If it is needed, it will not capture, and it will capture if it is not needed. Instead, wait until the review is completed, manually click on capture, and then pass The webhook is used to update the order status of our database, but I found that the order status of our database is different from that seen by stripe DashBoard.

prisma wigeon
#

okay, can you share a PaymentIntent id as an example, and what specifically is different? What is the status in your DB and what is the status being shown in the Dashboard?

mental bear
#

We reject this order. The status seen on stripe Dashboard is cancerd, but our database is not updated. Normally, it will reject

#

pi_3Jr7HFERyqAJHa2o1gqn26Ie

prisma wigeon
#

@mental bear are you listening to and actioning upon payment_intent.canceled event?

#

when you cancel it via the review, a payment_intent.canceled will be generated

mental bear
#

You mean to listening to payment_intent.canceled event through webhook?

prisma wigeon
#

yes

mental bear
#

Now it’s not just that the status of the order that is rejected is not synchronized correctly, and the status of the approved order will also be incorrectly synchronized.

#

We looked at the overall data and found that this is the case if the issuing bank does not support it.

#

That’s why it will only appear in this case

prisma wigeon
#

to fulfil an order, wouldn't you only need to know if the final status of the PaymentIntent is successful?

mental bear
#

yes

prisma wigeon
#

the only status that would matter is whether the PaymentIntent is successful right? In both of the example PaymentIntent that you provided, neither of the PaymentIntents were successful.

Earlier you mentioned that the status of the order is not synchronized correctly - what do you expect the status of the order in your database to be?

mental bear
#

If the status of stripe dashbrao is canceled, the status of our database should be rejected

prisma wigeon
#

alright, is your server listening to this event payment_intent.canceled?

mental bear
#

I have confirmed with the back-end staff that I did this step

#

Now it’s not just that the synchronization rejected by the review is incorrect, but the review passed is incorrect.

#

If the status of stripe dashbrao is successful, the status of our database should be confirmed

#

But the state synchronization of this pen is correct pi_3Jqu9QERyqAJHa2o05N6BUJ6 , I hope you can help find out the reason.

prisma wigeon
#

@mental bear i just looked at your account setup, your webhook is not listening for the payment_intent.canceled event

#

these are the events which your webhook is listening for

mental bear
#

Why can this order be synchronized? pi_3Jqu9QERyqAJHa2o05N6BUJ6😇

prisma wigeon
#

unfortunately, i have no idea, you're going to have to trace through your code to see what events you're listening to such that the statuses of some orders are correct but some are not

mental bear
#

This is my online code:
PaymentIntent.Error error = paymentIntentResult.getIntent().getLastPaymentError();
if (error != null) {
//Notify the backend capture
}

There will be onSuccess callback, but the error is not empty?

prisma wigeon
#

sorry i don't understand what you mean - are you querying the PaymentIntent in your frontend after the user successfully confirms the PaymentIntent in the browser?

mental bear
#

in the browser?

#

Our app does not need to be confirmed by the browser

prisma wigeon
#

@mental bear what is the error?

mental bear
#

LastPaymentError for paymentIntent

prisma wigeon
#

yep, but what is the error message?

mental bear
#

I mean to judge whether the backend needs to be notified to capture according to LastPaymentError, I don’t care about the message

#

Do you think this is okay?

prisma wigeon
#

i guess my question would then be when exactly are you evaluating this section of code? Is it when you attempt to capture payment?