#DV_Void

1 messages · Page 1 of 1 (latest)

split nestBOT
knotty wind
#

Hello

#

Generally to avoid duplicates you want to disable your event handler

daring cipher
#

Thanks for your response, can you please point me to the documentation to disable event handler?

knotty wind
#

There isn't really documentation on that. You as the Android dev should know how to handle disabling something in your view

#

You can do some basic google searches if you need

#

But this isn't something specific to Stripe

daring cipher
#

are you referring to disable the button to start the payment process, if yes, then I am already doing that, however, I still see that sometimes duplicate transactions within the same second

knotty wind
#

Yes that is what I am referring to. In that case you need to debug your code as there seems to be a bug that is causing duplicate payments.

#

You should ensure that only one payment is being created for each session.

#

For instance, if the customer retries after the first attempt are you using the same PaymentIntent?

#

Or do you create a new one each time?

daring cipher
#

No, if there is a retry then there would be new PaymentIntent

knotty wind
#

Okay well that could help with duplicate payments.

#

You can re-confirm the same PaymentIntent again

daring cipher
#

I don't think the retry is the issue I am facing, as retry would not happen within the same second, it is the same payment intent processed twice

knotty wind
#

Okay well then we are back to what I said before about there being a bug in your app or server code that is duplicating a request. Overall if you are disabling your "pay" button on press until you show the result of the payment attempt (and continuing to disable if that is succcessful) then there should not be a duplicate unless there was a bug

daring cipher
#

Ok, thanks, I'll have to do more debugging to see what is going on in that case

#

thanks for you help