8

Is it possible to hide paypal button from braintree dropin UI ? I am thinking to have custom paypal button for paypal (based on client demand and design) and would like to use interface provided by braintree dropin for credit card payment processing.I am using PHP and javascript.

Thanks.

pratik-acharya
  • 418
  • 5
  • 13

5 Answers5

11

I work at Braintree. If you have more detailed questions, please get in touch with our support team.

In the current major version of the drop-in, showing the PayPal button is a configurable option.

In previous versions, f you're using Braintree for your PayPal integration, and you're using the drop-in UI, the PayPal button will show up. If you don't want the PayPal button to show up because you don't want to use PayPal through your Braintree integration, and you haven't yet updated to the current version, email support@braintreepayments.com and they'll disable it for you.

agf
  • 171,228
  • 44
  • 289
  • 238
  • 1
    @M.B You'll have to disable PayPal in your Braintree account or not use the drop-in UI if you want to hide the PayPal button. – agf Feb 20 '15 at 18:26
  • If there's a chance that a user already has a PayPal payment method then you'll also need to go through and remove them, because there's no way (that I have found) to filter the payment methods shown. – jrg Feb 25 '15 at 12:00
  • @agf *"You'll have to disable PayPal"* that doesn't seem to be possible with the current BrainTree interface. From the "Accept PayPal" button under "Settings"->"Processing", the interface doesn't seems to allow any disabling. How do I disable PayPal in my Braintree account? – Drew Dormann Mar 10 '15 at 12:56
  • @DrewDormann If you email support@braintreepayments.com they'll disable it for you. I've edited my answer to reflect that. – agf Mar 10 '15 at 16:54
  • @agf I want to display Drop-in UI in my own layout not want to open new activity. What should I do to handle Drop-in UI from my code? Thank You.! – anddev May 19 '15 at 06:47
  • @anddev I don't understand your question. I suggest you [reach out to our support team](https://support.braintreepayments.com/). – agf May 19 '15 at 18:24
  • @anddev You cannot use Drop-in UI of braintree to open the payment UI in same activity. You need to choose the Custom implementation for the Braintree UI and then you will be able to achieve it under same activity. – iDevAmit Nov 09 '16 at 03:19
  • @agf do we need to still send an email to braintree support team for hiding paypal button ? I want to use only credit card option. – Hiren May 16 '17 at 06:44
  • @Hiren If you use the latest major version of Drop-in, the PayPal option is configurable and can be omitted. Check it out here: https://github.com/braintree/braintree-web-drop-in – BladeBarringer May 16 '17 at 14:56
3

Apparently this is possible since in v2.15.0 they added a headless option.

Example code: https://gist.github.com/danielwu426/70eac6b34ab7491610f0

jackocnr
  • 17,068
  • 10
  • 54
  • 63
1

If you remove below from Braintree's Javascript code (from braintree.dropin.create function) It will remove PayPal button from Drop-in UI.

paypal: {
        flow: 'vault'
      }
Vatsal Shah
  • 1,334
  • 18
  • 21
1

You can use disablePayPal() method in latest version of BrainTree.

DropInRequest dropInRequest = new DropInRequest().clientToken(token).amount(amount);
dropInRequest.collectDeviceData(true);
dropInRequest.vaultManager(true);
dropInRequest.disablePayPal();    <-- this will disable Paypal Button
startActivityForResult(dropInRequest.getIntent(_context), CARD_REQUEST_CODE);
Lucifer
  • 29,392
  • 25
  • 90
  • 143
0

Whatever clienttoken is being provided in the braintree , just provide some invalid or null value to it , it will then show

Manish Kumar
  • 119
  • 1
  • 5