Closed merrillii closed 11 years ago
That is an odd one indeed. My recommendation is to use the native package system instead of meteorite by creating a packages
directory in the root of the app and dumping this repo into it.
Otherwise, send me a stack trace and I'll do my best to find the problem.
Thanks for the reply - I'll give that a try!
Best, Dennis
On Tue, Oct 1, 2013 at 1:46 AM, Tyler Johnson notifications@github.comwrote:
That is an odd one indeed. My recommendation is to use the native package system instead of meteorite by creating a packages directory in the root of the app and dumping this repo into it.
Otherwise, send me a stack trace and I'll do my best to find the problem.
— Reply to this email directly or view it on GitHubhttps://github.com/appleifreak/stripe-meteor/issues/8#issuecomment-25426829 .
Oh I also forgot to mention. Name the folder stripe
(or stripe-meteor
, doesn't matter) and call meteor add stripe
so Meteor knows to add the package.
Thanks Tyler, I just tried that but got the same issue. Would really love to get this working. Here's what I did:
meteor create test cd test mkdir packages git clone https://github.com/appleifreak/stripe-meteor.git stripe meteor add stripe added this code to test.js in server section: var Stripe = StripeAPI('YOUR_SECRET_API_KEY'); meteor
Seems pretty straight forward but I still get an error. Here's what the stack trace spits out:
=> Meteor server restarted W202301-01:59:28.664(-4)? (STDERR) /home/merrillii/test/test2/.meteor/local/build/programs/server/boot.js:184 W202301-01:59:28.664(-4)? (STDERR) }).run(); W202301-01:59:28.665(-4)? (STDERR) ^ W202301-01:59:28.666(-4)? (STDERR) ReferenceError: StripeAPI is not defined W202301-01:59:28.667(-4)? (STDERR) at app/test2.js:18:14 W202301-01:59:28.667(-4)? (STDERR) at mains (/home/merrillii/test/test2/.meteor/local/build/programs/server/boot.js:157:61) W202301-01:59:28.667(-4)? (STDERR) at Array.forEach (native) W202301-01:59:28.667(-4)? (STDERR) at Function..each..forEach (/home/merrillii/.meteor/tools/3cba50c44a/lib/node_modules/underscore/underscore.js:79:11) W202301-01:59:28.671(-4)? (STDERR) at /home/merrillii/test/test2/.meteor/local/build/programs/server/boot.js:157:5 => Exited with code: 1 => Your application is crashing. Waiting for file change.
Any ideas would be greatly appreciated!
Best, Dennis
On Tue, Oct 1, 2013 at 1:53 AM, Tyler Johnson notifications@github.comwrote:
Oh I also forgot to mention. Name the folder stripe (or stripe-meteor, doesn't matter) and call meteor add stripe so Meteor knows to add the package.
— Reply to this email directly or view it on GitHubhttps://github.com/appleifreak/stripe-meteor/issues/8#issuecomment-25426983 .
So turns out that it was a bug! I think Meteor changed a bunch of stuff in the new package system and variables defined in the global context no longer apply to application global context. Anyway, my latest push adds a this
in front of StripeAPI
so it should be working. Thanks for the heads up!
Oh yeah - I remember reading about that in the changelist. Great catch and THANK YOU for the awesome package.
Best, Dennis
On Tue, Oct 1, 2013 at 2:13 AM, Tyler Johnson notifications@github.comwrote:
So turns out that it was a bug! I think Meteor changed a bunch of stuff in the new package system and variables defined in the global context no longer apply to application global context. Anyway, my latest push adds a this in front of StripeAPI so it should be working. Thanks for the heads up!
— Reply to this email directly or view it on GitHubhttps://github.com/appleifreak/stripe-meteor/issues/8#issuecomment-25427579 .
Hello -
Thanks for putting this package together. I've been trying to use this within meteorite on the server side but continue to get this error when I call StripeAPI:
Exception while invoking method 'processStripePayment' ReferenceError: StripeAPI is not defined
I can clearly see the stripe_server.js file in the build directory.
I have a suspicion that meteorite is not installing the npm package correctly because if I call Npm.require('stripe') in my app code it says it cannot find that package. Have you run across this problem before? Any advice?