0

So, the paypal create button website allows to use just one currency at a time. I would like to allow the donators to donate in whatever currency they would like to donate into. How do I do this? I found on the internet I should put this html line inside the form

<input type="hidden" name="currency_code" value="GBP">

But this does not work, any help?

This is the html I have at the moment

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="PYU4WP4DSWQXN">
<input type="image" src="http://lolo.works/Support%20Button/Support%20Button.png" border="0" name="submit" alt= "Support button" class="paypalbutton">
<input type="hidden" name="currency_code" value="GBP">
</form>
Lorenzo Massa
  • 39
  • 2
  • 14

2 Answers2

1

I am adding one sample donation button with multi currency for your reference and you may replace your own paypal account in the business parameter:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="YOUR EMAIL ADDRESS">
<label for="currency_code">Select the currency:</label>
<select name="currency_code" id="currency_code">
<option value="USD">USD</option><option value="EUR">EUR</option>
</select><br/><input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
PP_MTS_hzhu
  • 950
  • 6
  • 6
  • When I put my business name and address it show this page with these words: "We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com." I also have a merchant account ID, I'd like to use that instead of my email. – Lorenzo Massa Aug 03 '16 at 16:40
  • I now have the saved buttons. The " – Lorenzo Massa Aug 03 '16 at 16:57
0

Using registered buttons improves security and having one button per currency will avoid you loosing money in currency exchange rates.

Here's how I'm integrating several registred PayPal buttons into a multi-currency dropdown list.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
  <input type="hidden" name="cmd" value="_s-xclick" />
  <select name="hosted_button_id" 
onclick="if (this.selectedIndex==0){if (confirm('Do you want being redirected to PayPal to proceed to the payment?')){this.form.submit()}}" 
onchange="if (confirm('Do you want being redirected to PayPal to proceed to the payment?')){this.form.submit()};">
    <option value="G***********4" >79&nbsp;EUR</option>
    <option value="8***********4" >89&nbsp;CHF</option>
    <option value="F***********N" >93&nbsp;USD</option>
    <option value="X***********4" >69&nbsp;GBP</option>
  </select>
</form>

The onchange detects changes in the drop list.

The first element in the list, is selected by default, so there is no "change" for it. For this reason, the onclick event processor was added and also call PayPal if a click occured on the first element in the dropdown list.

Before redirecting to PayPal, a confirmation is asked through a dialog box.

OuzoPower
  • 230
  • 2
  • 11
  • Possible code improvements: 1. If the user selects some currency in the list, cancels the redirection and selects again the first option in the list. One should avoid the onchange event to occur additionally to the onclick event. 2. Reducing redundancy through more elegant code. The onclick could trigger the onchange instead of calling the same methods. – OuzoPower Jan 01 '18 at 18:09
  • One issue is that clicks on the dropdown arrow are also catched by the onclick processor and should not. Unfortunately, onclick works only when put in the – OuzoPower Jan 01 '18 at 18:14