Closed p4sh4 closed 8 years ago
+1
This fix is planned to go out with the next JS SDK release.
This feature has been added in version 2.24.0
The docs will be released shortly, but in the meantime, here's how you would configure it:
var clientToken = "client_token_from_server"; // this client token must have the customer id parameter configured
braintree.setup(clientToken, 'dropin', {
defaultFirst: true
});
@crookedneighbor How would I use defaultFirst for v3 drop-in? I don't see it mentioned in the docs: https://braintree.github.io/braintree-web-drop-in/docs/current/module-braintree-web-drop-in.html#.create
defaultFirst
is the only way payment methods are shown: https://github.com/braintree/braintree-web-drop-in/blob/39ca485487ea4107288e32b8a0b1fb368474d138/src/dropin-model.js#L286
@crookedneighbor
Is this true for https://js.braintreegateway.com/web/dropin/1.11.0/js/dropin.min.js as well? Because it isn't working on my end. The first payment method I see is not the default method. Furthermore, the default method is not checked.
As a side note, why are the dropin files versioned seperately from the whole client SDK? Does 1.11 of the dropin correlate to the most recent v3 Client SDK?
@crookedneighbor
Here is what I am doing to set the dropin up:
braintree.dropin.create({ authorization: client_token_server, container: '#dropin-container', venmo: {}, paypal: {flow: 'vault'}, paypalCredit: {flow: 'vault'}, }, function (createErr, instance) { [...] })
Is there something I'm missing in the setup?
Please open a new issue on Drop-in's repo and we'll dig into it: https://github.com/braintree/braintree-web-drop-in
Drop-in uses version 3 of braintree-web, but is itself it's own product. Which is why it has a separate repo and version.
@crookedneighbor
Here is what I am doing to set the dropin up:
braintree.dropin.create({ authorization: client_token_server, container: '#dropin-container', venmo: {}, paypal: {flow: 'vault'}, paypalCredit: {flow: 'vault'}, }, function (createErr, instance) { [...] }) Is there something I'm missing in the setup?
Did you manage to solve this?
I've been out of office. It's been added as a feature on master, but has not been released yet. Hoping to get a release out next week or so.
This has been identified as an issue and fixed in the Android SDK. Any updates on when it is going to be fixed in the JavaScript Drop-In UI?