Catch response code when submiting the form
-
Hi,
I’m trying to send user email If transaction was successful. I found in front_page.js where the “Success” dialog appears and where .braintree-payment-form.submit(); but I’m having difficulties with finding the “file(/s?)” (or code) which is/are listening to server response. Is there a way I can catch successful transaction before “success” dialog fires/ shows up ? I’m sending some form data to separate .php where data gets sorted and where email is send… but I have the wrong timing; email gets send either before transaction is send, or in second chance, the form already clears up- before my code in “success dialog” gets executed.
Where can I put my code
if (transaction.success == true) { // send my form data before it gets cleared }?? I Hope I explained it well ??
- The topic ‘Catch response code when submiting the form’ is closed to new replies.