Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>After further research, it turns out that hosted PayPal buttons won't accept the "amount" custom field. In order to make this function, a non-hosted button has to be used. The end result was generating a non-hosted button from PayPal, the result of which looks like this in the front end code (the JavaScript stays the same): </p> <pre><code>&lt;form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top"&gt; &lt;input type="hidden" name="cmd" value="_donations"&gt; &lt;input type="hidden" name="business" value="(Place you PayPal key here)"&gt; &lt;input type="hidden" name="lc" value="US"&gt; &lt;input type="hidden" name="item_name" value="Test Charity"&gt; &lt;input type="hidden" name="no_note" value="1"&gt; &lt;input type="hidden" name="no_shipping" value="2"&gt; &lt;input type="hidden" name="rm" value="1"&gt; &lt;input type="hidden" name="return" value="(Your success URL here)"&gt; &lt;input type="hidden" name="cancel_return" value="(Your cancel landing URL here)"&gt; &lt;input type="hidden" name="currency_code" value="USD"&gt; &lt;input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted"&gt; &lt;input id="donation-amount" type="hidden" name="amount" value=""&gt; &lt;input type="submit" class="general_button blue_button submit_button" id="submit" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" value="Donate!"&gt; &lt;img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"&gt; &lt;/form&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