Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is how i automatically redirect to PayPal with all the form details;</p> <pre><code>&lt;form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal"&gt; &lt;input type="hidden" name="cmd" value="_xclick" /&gt; &lt;input type="hidden" name="cbt" value="Return to example" /&gt; &lt;input type="hidden" name="business" value="email" /&gt; &lt;input type="hidden" name="item_name" value="example Purchase" /&gt; &lt;input type="hidden" name="amount" value="9.99"&gt; &lt;input type="hidden" name="button_subtype" value="services" /&gt; &lt;input type="hidden" name="no_shipping" value="1"&gt; &lt;input type="hidden" name="return" value="URL" /&gt; &lt;input type="hidden" name="notify_url" value="URL"/&gt; &lt;input type="hidden" name="cancel_return" value="URL" /&gt; &lt;input type="hidden" name="currency_code" value="USD"/&gt; &lt;input type="hidden" name="image_url" value="" /&gt; &lt;input type="hidden" id="custom" name="custom" value="invoice_id to track"/&gt; &lt;input type="hidden" class="btn btn-primary" style="width:100%" alt="PayPal - The safer, easier way to pay online!"/&gt; &lt;/form&gt; </code></pre> <p>For multiple products, you can simply add more products to the form, example;</p> <pre><code>&lt;input type="hidden" name="item_name_1" value="Item #1"&gt; &lt;input type="hidden" name="amount_1" value="1.00"&gt; &lt;input type="hidden" name="item_name_2" value="Item #2"&gt; &lt;input type="hidden" name="amount_2" value="2.00"&gt; </code></pre> <p>However, using this method is not all great</p> <p>All the data would need to be generated with PHP and input into the page, you would also need to check the transaction when the IPN calls back to ensure its been paid. </p> <pre><code>&lt;script type="text/javascript"&gt; function myfunc () { var frm = document.getElementById("paypal"); frm.submit(); } window.onload = myfunc; &lt;/script&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload