how to only disable paypal button but enable paylater button?

Davidwesa
Contributor
Contributor

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');
    

 

Login to Me Too
1 REPLY 1

MTS_Chiranjeevi
Moderator
Moderator

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.

Login to Me Too

Haven't Found your Answer?

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