I’m posting this here in the hope there are some Braintree/PayPal engineers looking at StackOverflow for support issues. I have submitted a support ticket through their new form twice, but have had no reply.
We have noticed very recently that the “PayPal Credit” button has appeared on our payment page without any code changes by us to turn this on.
How we would disable this?
Also, is it default behaviour to display this on sandbox accounts only? This does not seem to be affecting our production environment (yet).
We are using v4 of the JavaScript SDK:
braintreeClient: "https://js.braintreegateway.com/web/3.87.0/js/client.min",
hosted_fields: "https://js.braintreegateway.com/web/3.87.0/js/hosted-fields.min",
checkoutJs: "https://www.paypalobjects.com/api/checkout.min",
paypalCheckout: "https://js.braintreegateway.com/web/3.87.0/js/paypal-checkout.min"
I have tried passing through offerCredit: false
, but this has had no effect:
// Set up PayPal with the checkout.js library
paypal.Button.render({
env: '{{ braintree_env }}', // 'sandbox' or 'production'
style: {
label: 'paypal',
size: 'responsive', // small | medium | large | responsive
shape: 'rect', // pill | rect
color: 'white', // gold | blue | silver | black
tagline: false,
width: 500,
height: 55
},
payment: function () {
return paypalCheckoutInstance.createPayment({
flow: 'vault', // required to allow us to charge the account in future without re-authentication
offerCredit: false
});
},