title: Paypal Sandbox to run a function after payment is completed
body: <p>I got a total value that the user has to pay after making all their selections. 
  I used jquery to update the input value and add it dynamically into the html.</p>
  
  <p>Once they click on 'pay now', a sandbox popup window opens where the user has to login into their paypal account and complete the payment.</p>
  
  <p>How can I check that the payment is completed in php? Right now I have a form on my website that when all filled out, after the payment is verified, it should be submitted automatically (or show a button to complete the submission).</p>