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

280
Visualizações
Paypal pay button not shown

Sometimes the paypal pay button is not shown to our customers. So far just DE customers. I am using Javascript SDK. It looks like because the button.isEligible() function is not true and executed. What can I do to show the button or show a payment alternative?

Currently the customer can decide with radio buttons which payment method he wants. Then he is directed to: Paypal, SEPA or credit card.

<script>
        // Loop over each funding source/payment method
        var FUNDING_SOURCES = [
            paypal.FUNDING.<?php echo strtoupper($paymentmethod); ?>
        ];

        FUNDING_SOURCES.forEach(function(fundingSource) {
            // Initialize the buttons
            var button = paypal.Buttons({
                fundingSource: fundingSource,
                createOrder: function (data, actions) {
    ...
    onApprove: function (data, actions) {
        return actions.order.capture().then(function (orderData) {
    ...
    // Check if the button is eligible
            if (button.isEligible()) {
                // Render the standalone button for that funding source
                button.render('#paypal-button-container');
            }
        });

As I am showing just one button I probably have to use "button.isEligible()", correct? As this is working for most customers can it be it depends on the customer?

Can I add an else statement like:

if (button.isEligible()) {           
   button.render('#paypal-button-container');
} else {
    "please try again later or use a different payment method"
}
about 4 years ago · Juan Pablo Isaza
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