bbusdriver
bbusdriver

Reputation: 1627

Hide PayPal button using checkout.js

I'm using PayPal's checkout.js and in the view I'm showing both PayPal button and small buttons of credit cards. But in case I want to show only credit card buttons and hide PayPal button, how can I achieve this?

html:

  <div id="paypal-button" class="m-t-20"></div>

js:

paypal.Button.render({
    env: '@Model.Env',
    locale: '@Model.CurrentCulture',
    style: {
        size: 'medium',
        height: 48,
        color: 'silver',
        shape: 'rect',
        label: 'checkout',
        tagline: 'true',
        fundingicons: 'true',
        layout: 'horizontal'
    },       

Upvotes: 0

Views: 1008

Answers (1)

kakunka
kakunka

Reputation: 26

If you disable the funding source, the button will not show.See the Paypal page.

I expect the code you want looks like this:

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

Upvotes: 1

Related Questions