Dileep Patel
Dileep Patel

Reputation: 1988

Braintree Integration only PayPal option not a credit card option

I am successfully integrate Braintree SDK using there gradle file in my project. I am integarte there default Drop in UI , Now I want to show only PayPal option not a credit card option. It is possible ? If possible then please suggest me.. Thanks in Advance.

Upvotes: 1

Views: 1938

Answers (2)

Arjun
Arjun

Reputation: 21

We can achieve this by hiding pay via card option using CSS, i don't know doing this thing is appropriate or not but it's work for me !

<style>
    .braintree-option__card{
       display: none !important;
    }
</style>

If you want only paypal visible with all borders, use:

<style>
    .braintree-option__card:not(.braintree-option__paypal) {
       display: none !important;
    }
    .braintree-option__paypal {
        border-width: 1px 1px 1px 1px !important;
        border-radius: 4px 4px 4px 4px !important;
    }
</style>

Upvotes: 2

Brian K
Brian K

Reputation: 199

Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.

Rendering only the PayPal button when using the Drop-In UI is not possible, as the Drop-In must render credit card fields at a minimum. However, you can follow the documentation on the custom PayPal UI in order to render only a PayPal button within your app.

Upvotes: 2

Related Questions