This is the top-level module exported by the Braintree JavaScript SDK. In a browser environment, this will be the global braintree object. In a CommonJS environment, it will be the default export of the braintree-web package.
Examples
CommonJS
var braintree = require('braintree-web');
braintree.client.create(...);
In the browser
<script href="https://js.braintreegateway.com/web/VERSION/js/client.min.js"></script>
<script>
window.braintree.client.create(...);
</script>
AMD
// main.js
require.config({
paths: {
braintreeClient: "https://js.braintreegateway.com/web/VERSION/js/client.min.js"
}
});
require(["braintreeClient"], function (braintreeClient) {
braintreeClient.create(...);
});
Members
(static) client
- Source:
- See:
(static) dataCollector
- Source:
- See:
(static) hostedFields
- Source:
- See:
(static) paypal
- Source:
- See:
(static) VERSION
Properties:
| Name | Type | Description |
|---|---|---|
VERSION |
string | the current version of the SDK |