Reputation: 417
I'm creating a meteor web app that will sell one of our customer's products. I've decided to try and use Stripe to handle the payments (in particular Stripe Connect), and to charge an 'application fee' for each sale.
My questions:
Do I still need to use mrgalaxy:stripe
or kadira:stripe-connect
in order to use the Node API for Stripe? I am getting incredibly confused with the documentation of these packages, which I now believe are outdated.
If not, exactly how should I install and import Stripe for my app?
What do I need to do differently on client and on server to import Stripe?
What I have tried:
In my app directory:
meteor npm install --save stripe
.
In my client side javascript code:
import stripe from "stripe"
var stripe = require("stripe"("sk_******************")
Meteor.startup(function() {
stripe.setPublishableKey("sk_******************");
});
I believe the first are meant to do the same thing, but neither works! Chrome debugger gives me :
Uncaught TypeError: require("http").createServer is not a function
which is running in node_modules/stripe/lib/stripe.js
I am epically confused right now and would give my right index finger for clear instruction on what exactly to write in my javascript file, so I can go from where I am now to creating my first charge
object.
Thanks in advance!
Upvotes: 3
Views: 506