Closed wbashir closed 11 years ago
Thanks!
Well, I still can't seem to get it to work after removing the "-". Is there a particular way I'm supposed to access the StripeAPI function? I'm getting this now:
W20130818-23:49:15.400(-7)? (STDERR) /Users/Air/Documents/Personal/Programming/Meteor/stripeTester/.meteor/local/build/programs/server/boot.js:184 W20130818-23:49:15.401(-7)? (STDERR) }).run(); W20130818-23:49:15.402(-7)? (STDERR) ^ W20130818-23:49:15.403(-7)? (STDERR) ReferenceError: StripeAPI is not defined W20130818-23:49:15.403(-7)? (STDERR) at app/stripeTester.js:12:15 W20130818-23:49:15.404(-7)? (STDERR) at app/stripeTester.js:30:3 W20130818-23:49:15.404(-7)? (STDERR) at mains (/Users/Air/Documents/Personal/Programming/Meteor/stripeTester/.meteor/local/build/programs/server/boot.js:153:10) W20130818-23:49:15.405(-7)? (STDERR) at Array.forEach (native) W20130818-23:49:15.406(-7)? (STDERR) at Function..each..forEach (/Users/Air/.meteor/tools/4010e5731d/lib/node_modules/underscore/underscore.js:79:11) W20130818-23:49:15.414(-7)? (STDERR) at /Users/Air/Documents/Personal/Programming/Meteor/stripeTester/.meteor/local/build/programs/server/boot.js:80:5
This is just a guess, but i think the export name might have to match what has been set on this [1] file. Try changing to api.export(StripeAPI)
and see if that ReferenceError goes away.
[1] https://github.com/appleifreak/stripe-meteor/blob/master/stripe_server.js
I tried and got nothing :/. I do however see that variable on the console as undefined by typing Package.stripe.STRIPEMETEOR (or in this case StripeAPI). I ended up using the npm package instead and getting the stripe api for node directly that way. It was also pretty cool for futures to be able to react to the response that stripe gives.
Updated to work with latest version of meteor