Aidan1569 Posted March 28, 2020 Share Posted March 28, 2020 I have a contact form with a file upload button, when you click on “submit” you are redirected on Paypal everything works fine but, I would like to send the contact form only when visitors have paid on Paypal. I’ve searched on google but I have not found a way to do this. Can anyone help? Cheers, Aidan. Quote Link to comment Share on other sites More sharing options...
gw1500se Posted March 28, 2020 Share Posted March 28, 2020 Do you not know how to send and email or do you not know how to tell when the paypal API returns successful payment? Quote Link to comment Share on other sites More sharing options...
Aidan1569 Posted March 28, 2020 Author Share Posted March 28, 2020 I only want the email to be sent after they have paid. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted March 28, 2020 Share Posted March 28, 2020 Since you're not showing us any code, let's play a guessing game. How do you know when they have paid on Paypal? Are you waiting for a message from PP telling you such? Or is there some connection you are making with code you have written that will give you back a response? This is fun! Quote Link to comment Share on other sites More sharing options...
gizmola Posted March 28, 2020 Share Posted March 28, 2020 You will need to store the details of the order in an order table, perhaps with status. When an order is completed at paypal it will callback to one or more "webhook" url's you've onfigured, which are script(s) you would right to do processing on your server. Read through this section at Paypal: https://developer.paypal.com/docs/api-basics/ The script would need to parse the data the webhook script gets from paypal (ideally you should choose to use json format) and send the email you require, looking up the order in your order table. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.