ghaiklor / sails-service-payment

Service for Sails framework with Payment features [DEAD]
MIT License
15 stars 6 forks source link

Include the PayPal SDK & BrainTree PayPal as a payment service #185

Open mikedevita opened 7 years ago

mikedevita commented 7 years ago

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 commented 7 years ago

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 ...

ghaiklor commented 7 years ago

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

mikedevita commented 7 years ago

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:

├── babel-cli@6.24.1 ├── babel-node@6.5.3 ├── coveralls@2.13.0 ├── jest@19.0.2 ├── mocha@3.3.0 ├── nodemon@1.11.0 ├── npm@3.10.10 ├── sails@0.12.13 ├── yarn@0.22.0 └── yo@1.8.5

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 npm@3.10.10 3 info using node@v6.10.2 4 verbose run-script [ 'pretest', 'test', 'posttest' ] 5 info lifecycle sails-service-payment@0.0.0-semantic-release~pretest: sails-service-payment@0.0.0-semantic-release 6 silly lifecycle sails-service-payment@0.0.0-semantic-release~pretest: no script for pretest, continuing 7 info lifecycle sails-service-payment@0.0.0-semantic-release~test: sails-service-payment@0.0.0-semantic-release 8 verbose lifecycle sails-service-payment@0.0.0-semantic-release~test: unsafe-perm in lifecycle true 9 verbose lifecycle sails-service-payment@0.0.0-semantic-release~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 sails-service-payment@0.0.0-semantic-release~test: CWD: /Users/mike/Web/sails-service-payment 11 silly lifecycle sails-service-payment@0.0.0-semantic-release~test: Args: [ '-c', 'babel-node ./node_modules/.bin/isparta cover _mocha' ] 12 silly lifecycle sails-service-payment@0.0.0-semantic-release~test: Returned: code: 1 signal: null 13 info lifecycle sails-service-payment@0.0.0-semantic-release~test: Failed to exec test script 14 verbose stack Error: sails-service-payment@0.0.0-semantic-release 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 sails-service-payment@0.0.0-semantic-release 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 sails-service-payment@0.0.0-semantic-release test: babel-node ./node_modules/.bin/isparta cover _mocha 22 error Exit status 1 23 error Failed at the sails-service-payment@0.0.0-semantic-release 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 ]

ghaiklor commented 7 years ago

@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.