Skip to content

Instantly share code, notes, and snippets.

@georgesunil81
Created February 21, 2017 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save georgesunil81/5d2a4b4dd448c865ea8fa9369269dfe1 to your computer and use it in GitHub Desktop.
Save georgesunil81/5d2a4b4dd448c865ea8fa9369269dfe1 to your computer and use it in GitHub Desktop.
The below package.json works with braintree-web 3.2.0
======================================================
{
"name": "myapp",
"version": "1.0.0",
"description": "Testing braintree-web",
"main": "main",
"scripts": {
},
"repository": {
},
"author": "George S",
"license": "ISC",
"dependencies": {
"braintree-web": "3.2.0",
"can": "^2.3.24",
"font-awesome": "^4.5.0",
"jquery": "^2.2.4",
"steal": "^0.16.35",
"steal-cache-bust": "^0.2.1",
"steal-tools": "^0.16.6",
},
"devDependencies": {
},
"system": {
"npmAlgorithm": "flat",
"configDependencies": [
"cache-bust"
],
"directories": {
"lib": "app"
},
"meta": {
"braintreeClient": {
"format": "global",
"deps": [
"jquery"
]
},
"braintreeHostedFields": {
"format": "global",
"deps": [
"jquery"
]
}
},
"paths": {
"braintreeClient": "node_modules/braintree-web/client.js",
"braintreeHostedFields": "node_modules/braintree-web/hosted-fields.js"
}
}
}
Here is how I am currently using the modules "braintreeClient" and "braintreeHostedFields" -
define([
'jquery',
'can',
'braintreeClient',
'braintreeHostedFields',
], function($, can) {
return Base.extend({
defaults: {
title: 'Payment Information',
cancelText:'Cancel',
okText:'Continue',
size: 'modal-md'
}
},{
init: function(el, options) {
...
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment