ember-braintree-components
This addon includes Braintree's Drop-In Payment UI and Auth Connect button as Ember components.
Installation
# From within your ember-cli project
ember install ember-braintree-components
Usage
Drop-In UI
// 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 server -
onReady
- action fired when the UI is ready -
onSubmit
- action fired when the form is submitted (called with payment nonce) -
onError
- action fired when an error occurred -
options
- a hash containing additional options
See the documentation for more information on these options.
Braintree Auth Connect button
Options
-
connectUrl
(required) - the url generated by your server -
onError
- action fired when an error occurred -
options
- a hash containing additional options
See the documentation for more information on these options.