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

Uncaught TypeError: Cannot read property 'setPublishableKey' of undefined #19

Closed kkoppenhaver closed 9 years ago

kkoppenhaver commented 10 years ago

Trying to figure out exactly why I'm getting this error. Here's what I have at the moment.

  1. Repo cloned into packages/stripe
  2. meteor list returns -- mrgalaxy:stripe 1.5.6 Stripe.js and Node-Stripe brought to Meteor.

When I tried to run 'meteor add stripe', I received 'stripe: no such package', so I added it the way it said on Atmosphere. (meteor add mrgalaxy:stripe). It looks like the JS file is loaded in the browser () when I inspect it, but I'm still getting this error, which leads me to believe I'm not including the package correctly. Any thoughts? If you need any additional debugging information from me, I'd be happy to provide it. Thanks for all your work.

adam-hanna commented 9 years ago

Are you using a capital "S" with Stripe.setPublishableKey?

EDIT - spelling

kkoppenhaver commented 9 years ago

Yes I was. The issue was that I wasn't running this on the serverside (an oversight on my part). Working now, thanks.

See: http://stackoverflow.com/questions/26042962/adding-stripe-to-meteor-cannot-read-property-setpublishablekey-of-undefined

tyler-johnson commented 9 years ago

I'm going to close this for now as it seems like it has been solved. Please let me know if you are still having trouble.