title: Extra variables in POST for Paypal IPN / button?
body: <p>I've come across countless tutorials but all differ in some way so I'm not really sure which route I should follow.</p>
  
  <p>I have an old website that needs payments to be integrated: currently, a user would fill in a form and click submit - this will post to another page that handles the updating of the database and emails the user that everything is valid.</p>
  
  <p>However, I have to change it so that when the user fills in the form and clicks submit, they would have to pay via paypal - the amount to pay is the base_price * the amount of user fields filled in (i.e. count(array_filter($_POST["users"])); ).</p>
  
  <p>Currently, when the user submits the form, I do the validation then post to "payment.php" page. Which is just a page displaying the values from _POST showing the user details and how much it will cost. Then I have a simple non-hosted Paypal Button for "Buy Now" (I think the hosted version will work just fine too if I just add quantity in the form but I figured I'd try the non-hosted, un-secure version for the moment).</p>
  
  <p>Clicking on that button takes the user to Paypal where they can fill in their details.</p>
  
  <p>What I don't understand is IPN and how I can integrate it. The original form POSTs about 10 input values, can I add those in my POST to Paypal so that after payment, the database would be updated with those values? Or would I need to update the database prior to posting to Paypal and then just add a column "verified" that I update once the user has paid?</p>
  
  <p>I've set "rm" value="2" to use POST.</p>