如何知道金额是否从卡中扣除

时间:2015-04-10 05:52:07

标签: ios objective-c parse-platform xcode6 stripe-payments

我正在使用stripe+parse付款。

我将令牌值传递给Parse Cloud Code并付款。

目前我使用的是test个密钥。

Parse.Cloud.define("hello", function(request, response) {

var stripe = require('stripe');
stripe.initialize('sk_test_lLGvnjknjknjknjknjknjkn51H3gG ');

var stripeToken = request.params.token;

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

  response.success(charge);

 });

当我调整此代码和 Charge变量时,我得到以下响应:

Cloud Code: {
"_rejected" = 0;
"_rejectedCallbacks" =     (
);
"_resolved" = 0;
"_resolvedCallbacks" =     (
);
}

我如何知道扣除的金额。

0 个答案:

没有答案