This addon includes Braintree's Drop-In Payment UI and Auth Connect button as Ember components.
# From within your ember-cli project
ember install ember-braintree-components
// controller/component.js
actions: {
submit(response) {
// Do something with the nonce
return this.get('ajax').post('[YOUR URL]', {
data: {
paymentNonce: response.nonce
}
});
}
}
token
(required) - the token generated by your serveronReady
- action fired when the UI is readyonSubmit
- action fired when the form is submitted (called with payment nonce)onError
- action fired when an error occurredoptions
- a hash containing additional options
See the documentation for more information on these options.
connectUrl
(required) - the url generated by your serveronError
- action fired when an error occurredoptions
- a hash containing additional options
See the documentation for more information on these options.