17

The checkout area of my site includes an iframe that contains a PayPal button.

Recently, PayPal seems to have automatically added a "Credit" button to this iframe. I don't want two buttons, I just want to keep the old yellow PayPal button.

How do I get rid of it? Is there a setting somewhere to disable it?

I don't see anything in their FAQ about getting rid of it.

enter image description here

1

5 Answers 5

20

I know this is kind of an old question, but I just spent an hour trying to find the answer to this, so hopefully this helps someone someday.

If you're using the new integration method that starts paypal.Buttons instead of paypal.Button.render, you have to append disable-funding to the JS SDK.

<script src="https://paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&disable-funding=credit,card"></script>

card = Credit or debit cards

credit = PayPal Credit

sepa = SEPA-Lastschrift

Source: https://developer.paypal.com/docs/checkout/reference/customize-sdk/#disable-funding

1
  • This is what I was exactly looking for, thank you very much! Saved a lot of research time for me :D May 16, 2020 at 18:36
3

If your the webmaster and you have access to the PayPal account login where the PayPal button was created click on merchant tools and edit your saved PayPal buttons there is an option to remove the credit card area. https://www.paypal.com/buttons/

2

What I did was to put a div over the Paypal button, then disable the div when needed:

NORMAL PAYPAL BUTTON RENDERING:

  paypal.Button.render({

    // Set your environment
    env: 'production', // sandbox | production

    // Specify the style of the button
    style: {
        label: 'pay',   // paypal | checkout | pay
        size:  'small',    // small | medium | large | responsive
        shape: 'pill',     // pill | rect
        color: 'gold',      // gold | blue | silver | black
        tagline: 'true'
    },

    // PayPal Client IDs - replace with your own
    // Create a PayPal app: https://developer.paypal.com/developer/applications/create
    client: {
        sandbox:    'XXX',
        production: 'YYY'
    },

    payment: function(data, actions) {
        return actions.payment.create({
            payment: {
                transactions: [
                    {
                        amount: { total: totalAmount, currency: 'USD' }
                    }
                ]
            }
        });
    },

    onAuthorize: function(data, actions) {
        return actions.payment.execute().then(function() {
          window.alert('Payment Complete!');                                 
        });
    }

  }, '#paypal-button-container');

ADDITIONAL STUFF POST BUTTON RENDER:

  $("<div id='paypal-fake-cover' onclick='removeCover();' />").css({
    cursor:"pointer",
    position: "absolute",
    width: "100%",
    height: "100%",
    left: 0,
    top: 0,
    zIndex: 1000000,  // to be on the safe side
  }).appendTo($("#paypal-button-container").css("position", "relative"));

REMOVE COVER:

function removeCover(){
  $('#paypal-fake-cover').remove();
}
1

From the docs that Stephen Ostermiller linked above:

You can disable PayPal Credit in your paypal.Button.render function.

For example:

paypal.Button.render(
{
    funding:
    {
        disallowed: [ paypal.FUNDING.CREDIT ]
    },
});
0

If it has its own element ID or class you could hide it using CSS

e.g. #paypalCredit {display: none;}

1
  • 1
    As the op is using an iframe attempting to hide the button through their site's CSS won't have any effect. Nov 16, 2018 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.