You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
You can specify additional options to generate the ClientToken by passing in arguments prefixed with the server__ name. For example to pass the client_id option when generating the ClientToken you specify the following:
<:braintreeserver__customer_id='123'>
You can also pass in options to the loading of the Javascript library by prefixing it with client__ as follows:
<:braintreeclient__form='alternative_form_name'>
Processing payment
To process the payment you should add an e-submit listener to the surrounding form. This form will be called twice, once before the card has been tokenised and once after. If you need the payment nonce generated by Braintree simply check for it's existence.
...
defprocess_paymentifpage._payment_method_nonce# so something with page._payment_method_nonceelsereturnfalse#stop the form from submittingendend
...
Example
This sample implementation of this component showcases how to process a payment after receiving the token.
Todos
Add a Volt Task that wraps around most of the Braintree API so you dont need to write your own runners.