条纹与Polymer Starter Kit Plus的集成

时间:2015-09-24 06:27:07

标签: google-app-engine polymer stripe-payments polymer-1.0 polymer-starter-kit

我一直在玩这种实现,但没有用。带聚合物入门套件的条纹非常棒!创建令牌很容易,我已经这样做了here

在Meteor中,我在Meteor.isServer内有这段代码:

var stripe = require("stripe")("sk_test_***********************");

// (Assuming you're using express - expressjs.com)
// Get the credit card details submitted by the form
var stripeToken = request.body.stripeToken;

var charge = stripe.charges.create({
  amount: 1000, // amount in cents, again
  currency: "usd",
  source: stripeToken,
  description: "Example charge"
}, function(err, charge) {
  if (err && err.type === 'StripeCardError') {
    // The card has been declined
  }
});

由于此问题仅与Polymer Starter Kit Plus有关,是否有特殊的地方可以使用服务器端脚本来为令牌收费?我部署到gae

0 个答案:

没有答案