Reset (un)captured order - Smart Button (Re-posting in correct board)

jnasoy
New Community Member

Hi everyone,

I am implementing a smart button and I am showing a modal confirmation before I capture the order. The modal has 2 buttons, "Cancel" and "Confirm". When the user clicks "Confirm" button, that is the time I capture the order and when the user clicks "Cancel", the modal will close and no capture will happen. The issue is the captured order gets doubled when the user canceled the transaction and click the PayPal button again and confirm the transaction this time. Is there a way to reset or destroy the created order when the user clicks the "Cancel" button?

 

Attached is the sample code block

Annotation 2019-07-09 191502.jpg

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.