So I’m making a check out cart on my website. I’m using PayPal as the payment system but before I transfer the customers to PayPal I get their details. To do that I POST from index.php to index.php, run my code to retrieve the POSTed info and store it in a database and now wish to redirect the customer to PayPal.
Unfortunately you have to POST all the cart data to PayPal:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
The only way I see around this is to post to index.php, collect the user data, then have a button show up saying click here to pay via PayPal. That’s one extra step that I want to avoid.
Any way to POST to index.php, collect the data, then post the PayPal info to the PayPal website? Or any other ideas?
Thanks
you would need 2 forms on your page, one form that posts back to index.php and a second form that posts to paypal
after the first form posts back to index.php, echo javascript in the body tag to submit the paypal form when it loads