Reputation: 1972
I would like to create a drop-down list for payment methods.
For example:
<ul>
<li id="paypal">paypal</li>
<li id="credit_card">credit card</li>
</ul>
On select credit card, it loads all fields needed for credit card payment. But now I am having trouble setting up a paypal button. I don't really want a blue button. Can I have the user click id="paypal" and launch paypal?
braintree.setup(token,"custom",{
paypal:{
container:"paypal",
amount: 10.00,
currency: 'USD'
}
})
Can I make it completely custom looking? I want the paypal button just look like an item in the list with my CSS.
Upvotes: 1
Views: 2091
Reputation: 181
Braintree employee here. As of 2.15.0, we introduced a "headless" option that allows a custom PayPal button.
This work is live at these JS urls:
https://js.braintreegateway.com/js/braintree-2.15.2.js
https://js.braintreegateway.com/js/braintree-2.15.2.min.js
We created a small gist that provides sample code. This version is not yet hotlinked but our docs will be updated when it is.
Upvotes: 6