purplelizzard
03-16-2008, 02:59 PM
I am working on a site where people can accumulate a balance in their account and then pay it all of at once using paypal. When the payment is complete, PayPal notifies a PHP script via IPN and it subtracts their payment from their balance (usually zeros it, but helps to prevent false zeros). Right now, I am passing the URL of the IPN script along with the users username and a unique ID string to PayPal through the form (these are generated with PHP and echoed out), but I do not want people to be able to get my IPN scripts location and the unique id because then they can simply write a php script to POST these values to my IPN script and clear their balance without paying for anything.
So, what I would like to do is have the user click a link to my PHP script that will then take all of the variables needed, POST them to PayPal like a normal form, without ever showing them to the user by printing them to the screen. I can do this with cURL or fopen, but they do not act like a normal HTML form, they do not send the user to the new page along with the posted data.
Is there a way for me to do this with PHP? Thanks in advance.
So, what I would like to do is have the user click a link to my PHP script that will then take all of the variables needed, POST them to PayPal like a normal form, without ever showing them to the user by printing them to the screen. I can do this with cURL or fopen, but they do not act like a normal HTML form, they do not send the user to the new page along with the posted data.
Is there a way for me to do this with PHP? Thanks in advance.