tyler-johnson / stripe-meteor

A Meteor package containing Stripe.js, Node-Stripe, and Stripe Checkout.
https://atmospherejs.com/mrgalaxy/stripe
150 stars 44 forks source link

Update package.js for meteor 0.6.5 compatibility #5

Closed wbashir closed 11 years ago

wbashir commented 11 years ago

Updated to work with latest version of meteor

tyler-johnson commented 11 years ago

Thanks!

Lepozepo commented 11 years ago

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

wbashir commented 11 years ago

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

Lepozepo commented 11 years ago

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.