Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

119
Visualizações
How to accept payment in requested currency in PayPal through integration via Javascript?

Currently, I am able to accept payment only in one currency with this code

<script src="https://www.paypal.com/sdk/js?client-id=Your Client ID&currency=AUD"></script> -->   

If make USD over there like this..

<script src="https://www.paypal.com/sdk/js?client-id=Your Client ID&currency=USD"></script> -->   

I can accept the payment in USD on my website

if will do GBP

<script src="https://www.paypal.com/sdk/js?client-id=Your Client ID&currency=GBP"></script> -->   

I can accept the payment in GBP on my website

But when I add multiple currencies like this...

<script src="https://www.paypal.com/sdk/js?client-id=Your Client ID&currency=AUD,USD, AUD,NZD,GBP"></script> -->   

The button doesn't work

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The currency determines which buttons are eligible, so an SDK load is only usable with 1 currency at a time.

To support multiple currencies, you must reload the SDK on the page and re-render any buttons afterward (and createOrder, when called, must specify amounts in the single currency that matches).


A new alternative you can try is to load the SDK multiple times on the page using the data-namespace parameter, to specify a name other than the default paypal.

An example....

<h3>USD buttons...</h3>
<div id="paypal-button-container-1" />

<script src="https://www.paypal.com/sdk/js?client-id=test&currency=USD" data-namespace="paypalUSD"></script>
<script>
    paypalUSD.Buttons({
        //...
    }).render('#paypal-button-container-1');
</script>


<hr />


<h3>AUD buttons...</h3>
<div id="paypal-button-container-2" />

<script src="https://www.paypal.com/sdk/js?client-id=test&currency=AUD" data-namespace="paypalAUD"></script>
<script>
    paypalAUD.Buttons({
        //...
    }).render('#paypal-button-container-2');
</script>

</script>

In general, unless you have a specific business need to receive multiple currencies in your account, it's simpler to just use an international currency like USD or EUR and let PayPal show the conversion at payment time if the buyer is going to use a funding source in a differrent currency like GBP, NZD, etc

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda