mjhea0 / node-stripe-charge Goto Github PK
View Code? Open in Web Editor NEWnode + stripe + express + bootstrap 4 (used for one time charges)
License: MIT License
node + stripe + express + bootstrap 4 (used for one time charges)
License: MIT License
I like your code structure and organization. However I don't understand the reason behind creating the bin
directory under server
and creating the www
file. Can you explain why? Thanks in advance!
I can see this is where we actually start listening (basically what it does) - I just don't know why it's organized this way.
when I started mongod, I got this error:
ERROR: dbpath (/data/db) does not exist.
Create this directory or give existing directory in --dbpath.
See http://dochub.mongodb.org/core/startingandstoppingmongo
What is the right way to start this? I can create a directory and specify that with the --dbpath
flag, but then I don't get the db seeded with the admin login.
I appreciate any help! :)
Everything appears to be working - I can create accounts and login and the products are listed. I updated the .env file with my Stripe test keys. However when I try to make a charge I keep getting this error:
No such token: tok_83IqDvlTYkipyY
Error: No such token: tok_83IqDvlTYkipyY
at Error._Error (/Users/Dan/Code/node-stripe-charge/node_modules/stripe/lib/Error.js:12:17)
at Error.Constructor (/Users/Dan/Code/node-stripe-charge/node_modules/stripe/lib/utils.js:105:13)
at Error.Constructor (/Users/Dan/Code/node-stripe-charge/node_modules/stripe/lib/utils.js:105:13)
at Function.StripeError.generate (/Users/Dan/Code/node-stripe-charge/node_modules/stripe/lib/Error.js:56:14)
at IncomingMessage.<anonymous> (/Users/Dan/Code/node-stripe-charge/node_modules/stripe/lib/StripeResource.js:138:39)
at emitNone (events.js:85:20)
at IncomingMessage.emit (events.js:179:7)
at endReadableNT (_stream_readable.js:913:12)
at _combinedTickCallback (node.js:377:13)
at process._tickCallback (node.js:401:11)
Help! Thanks!
The sales links on the admin page currently trigger searches for tokens used for charging the card. The thing is that I get zero hits for the successfully charged cards here.
Shouldn't we use the card fingerprint instead like https://dashboard.stripe.com/test/search?query=card_159lgqGBJQJCHzjsmPd4Hitn? That seams to work
the example did not work for me, with some error like 'the token 123xvxsdfsdf does not exist!'.
i had to dive into the code and find that regardless of the config file, you manually set the publishable key in client/js/main.js. when i changed it to my key, the thing started to work.
btw, i'm not sure what's going on there. upon submit, you call stripe ** from the client ** asking for a token, and canceling the submit. Only then when stripe calls you back, you embed the stripeToken in a hidden field, and initiate a submit.
Why not just do all this work from server side?
why not simply submit the information to the server, and in the server get the token, do the charge, etc.
is this possible or i'm missing something?
Thank you, great example!
Hi,
I cannot make transactions, because it seems there never is a token when contacting stripe. Look at charge.jade
and charge.js
Any ideas?
Seem to be getting this issue when starting the server:
> node ./server/bin/www
module.js:328
throw err;
^
Error: Cannot find module 'mongodb/node_modules/bson'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/KingScooty/Sites/Playground/node-stripe-charge/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js:8:16)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/Cellar/node/5.4.0/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.4.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node ./server/bin/www`
npm ERR! Exit status 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.