There's plenty of instruction on forums about clicking a button to run a script, but not so much about running a script to click a button.
How do you use a single script to post data from a form and then run a PayPal script, passing along the values that PayPal provides with its buttons to open the appropriate payment processing page?
I have a registration form for an event. My processing script contains a confirmation for the user, which displays PayPal's button for the user to click to proceed to payment. How do I take the user directly on to PayPal without a second click?
Here's the PP button code:
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="GHDB7HUPTKJBG">
X <input type="image" src="images/Purchase_btn.gif" border="0" name="submit" >
X <img alt="" border="0" src="pixel.gif" width="1" height="1">
</form>
(I assume I can eliminate the lines I marked with an "X".)
As i understand it, I need to send the pairs "cmd / _s-xclick" and "hosted_button_id / GHDB7HUPTKJGB" to the PayPal script, and I don't have a clue how.