cancel
Showing results for 
Search instead for 
Did you mean: 

how to only disable paypal button but enable paylater button?

Options
Davidwesa
Contributor
Posted on

I am trying to enable only paypal 'paylater' button and nothing else. I am using this code:

 

I also want to get (in case of payin3 option the breakdowns of total amount) amounts in an array so that I could perform some action on that.

<script src="https://www.paypal.com/sdk/js?client-id=xxxxxxxx&currency=GBP&components=buttons,messages&buyer-country=GB&enable-funding=paylater&disable-funding=card"></script>
<div data-pp-message data-pp-style-layout="text" data-pp-style-logo-type="inline" data-pp-style-text-color="black" data-pp-amount="170"></div>
<div id="paypal-button-container"></div>
paypal.Buttons({
  createOrder: function(data, actions) {
    return actions.order.create({
      purchase_units: [{
        amount: {
          value: '170'
        }
      }]
    });
  },
}).render('#paypal-button-container');
    

 

1 REPLY 1

how to only disable paypal button but enable paylater button?

Options
Chiranjeevi_L
PayPal Employee

Good day @Davidwesa,

 

Thank you for posting to the PayPal community.

 

Based on your specific configuration and a buyer's location and cookies, Checkout dynamically presents the appropriate funding sources to give your buyers more ways to pay.The buttons that display are decided automatically, based on a range of factors, including:

•    Buyer country
•    Device type
•    Funding sources the buyer has opted to see.

As a result, each buyer might see a unique combination of buttons. To prevent certaibuttons from displaying, see Disable Funding(https://developer.paypal.com/sdk/js/configuration/#disable-funding)

 

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.