I have a website that sells competion tickets. A user may order up to 10 tickets at a time. I've written PHP to calculate the total spend and also store the customer details in a database. In order to complete the transaction I need to be able to allow the user to send my client a payment via paypal but i dont know where to start. I'm pretty sure this can be done using the POST method but i have no clue as to what parameters or hidden items i need to send to paypal or is it all controled via the url? Please help see www.winthishome.co.uk for further clarification
easiest is to use that "xclick" url paypal gives you on the site with button options... twist the parameters from PHP how you need them and send the user there via header("Location: ....");
you need to fill in all parameters given by paypal.. or what click media said, use the classes at phpclasses.org. that will fill in the required parameters
Thanks for all your input guys Eventually I obtained the following code from the paypal website, i can easily modify this to fit my requirments with php. <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="sharog@hotmail.com"> <input type="hidden" name="item_name" value="Competition Entry"> <input type="hidden" name="amount" value="10.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="lc" value="GB"> <input type="hidden" name="bn" value="PP-BuyNowBF"> <input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online."> <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1"> </form>