Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!