Created
October 28, 2019 21:24
-
-
Save braintreeps/9c398420a73c5a07d48a069b01b1d42f to your computer and use it in GitHub Desktop.
Deferred client blog post 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- include only the hosted fields script to the page --> | |
<script src="https://js.braintreegateway.com/web/3.53.0/js/hosted-fields.min.js"></script> | |
<script> | |
// pass the authorization directly into Hosted Fields | |
braintree.hostedFields.create({ | |
authorization: 'client_token_or_tokenization_key' | |
// the rest of the Hosted Fields configuration goes here | |
}, function (hostedFieldsErr, hostedFieldsInstance) { | |
// finish by adding event listeners to trigger tokenization requests on a button click | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment