sails-service-payment icon indicating copy to clipboard operation
sails-service-payment copied to clipboard

Include the PayPal SDK & BrainTree PayPal as a payment service

Open mikedevita opened this issue 8 years ago • 4 comments
trafficstars

https://github.com/paypal/PayPal-node-SDK

I'll try to work on a PR for this, but just documenting the issue for now.

mikedevita avatar Apr 25 '17 18:04 mikedevita

Just noticed BrainTree supports PayPal too (i've been using Stripe and a custom service for PayPal), so may be better to include that in the service instead of just doing CCs via BrainTree.

Before I get started on the PR which would you prefer @ghaiklor?

Should ...

  • BrainTree be updated to include the other payment types (like PayPal)
  • should we include the node SDK straight from PayPal instead
  • implement both

mikedevita avatar Apr 25 '17 19:04 mikedevita

@mikedevita imo, it should be done as a separate payment gate, 2nd option.

ghaiklor avatar Apr 26 '17 08:04 ghaiklor

okay cool i'll get started on adding a paypal option.

@ghaiklor hmm development seems to be borked for me whats all required to get started on this on my macbook? i'm on node 6.10.2 and running npm test or npm run test results in the following..

image

my global packages installed are:

├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected]

image


nbm-debug.log

0 info it worked if it ends with ok 1 verbose cli [ '/Users/mike/.nvm/versions/node/v6.10.2/bin/node', 1 verbose cli '/Users/mike/.nvm/versions/node/v6.10.2/bin/npm', 1 verbose cli 'run', 1 verbose cli 'test' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'pretest', 'test', 'posttest' ] 5 info lifecycle [email protected]~pretest: [email protected] 6 silly lifecycle [email protected]~pretest: no script for pretest, continuing 7 info lifecycle [email protected]~test: [email protected] 8 verbose lifecycle [email protected]~test: unsafe-perm in lifecycle true 9 verbose lifecycle [email protected]~test: PATH: /Users/mike/.nvm/versions/node/v6.10.2/lib/node_modules/npm/bin/node-gyp-bin:/Users/mike/Web/sails-service-payment/node_modules/.bin:/Users/mike/.nvm/versions/node/v6.10.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 10 verbose lifecycle [email protected]~test: CWD: /Users/mike/Web/sails-service-payment 11 silly lifecycle [email protected]~test: Args: [ '-c', 'babel-node ./node_modules/.bin/isparta cover _mocha' ] 12 silly lifecycle [email protected]~test: Returned: code: 1 signal: null 13 info lifecycle [email protected]~test: Failed to exec test script 14 verbose stack Error: [email protected] test: babel-node ./node_modules/.bin/isparta cover _mocha 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (/Users/mike/.nvm/versions/node/v6.10.2/lib/node_modules/npm/lib/utils/lifecycle.js:255:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess. (/Users/mike/.nvm/versions/node/v6.10.2/lib/node_modules/npm/lib/utils/spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:886:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 15 verbose pkgid [email protected] 16 verbose cwd /Users/mike/Web/sails-service-payment 17 error Darwin 16.5.0 18 error argv "/Users/mike/.nvm/versions/node/v6.10.2/bin/node" "/Users/mike/.nvm/versions/node/v6.10.2/bin/npm" "run" "test" 19 error node v6.10.2 20 error npm v3.10.10 21 error code ELIFECYCLE 22 error [email protected] test: babel-node ./node_modules/.bin/isparta cover _mocha 22 error Exit status 1 23 error Failed at the [email protected] test script 'babel-node ./node_modules/.bin/isparta cover _mocha'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the sails-service-payment package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error babel-node ./node_modules/.bin/isparta cover _mocha 23 error You can get information on how to open an issue for this project with: 23 error npm bugs sails-service-payment 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls sails-service-payment 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

mikedevita avatar Apr 26 '17 13:04 mikedevita

@mikedevita that was a long time ago, something could broke with dependencies updates. Try to run tests just with the mocha and then add other tools step by step for figuring out where is the problem.

ghaiklor avatar Apr 26 '17 19:04 ghaiklor