0

We have generated our app using Generator-Gulp-Angular. We want to implement Braintree payments Dropin form using Braintree-web v2.5.1 and Angularjs 1.5.

We are trying to implement it based on example in https://github.com/braintreedev/sample-braintree-dropin-angularjs-node, which is a basic Dropin implementation.

We have defined 'braintree' as constant in Global Constants.

When we do -- Gulp serve, below is the error printed in terminal.

[23:38:54] Using gulpfile ~/Downloads/MyProject/gulpfile.js
[23:38:54] Starting 'scripts'...
[23:38:56] Starting 'styles'...
[23:39:01] gulp-inject 10 files into index.scss.
[23:39:02] Finished 'styles' after 6.22 s
[23:39:04] 
/Users/MyUser/Downloads/MyProject/src/app/components/payments/dropin.controller.js
  **57:9  error  "braintree" is not defined  no-undef**

✖ 1 problems (1 errors, 0 warnings)

We are getting the client token, but the Braintree.setup is not loading the Dropin container.

Any help is appreciated very much.

rangma
  • 77
  • 1
  • 7
  • In the example you've linked, notice that the braintree JS asset is being served via bower in this script tag:https://github.com/braintreedev/sample-braintree-dropin-angularjs-node/blob/master/angular-app/index.html#L47 Are you providing the Braintree JS SDK in a similar fashion? If done correctly, this should automatically create the global braintree object. – Brian K Mar 06 '17 at 20:22
  • Yes. Brian. We have included it in index.html. This occurs only when we use Braintree with Generator-Gulp-Angular. If we try to to run the example in the above link independently, it runs correctly though. – rangma Mar 07 '17 at 04:09

0 Answers0