Probleme bei der Integration von Stripe mit Parse

Code to make Token

- (IBAction)save:(id)sender
{
STPCard *card = [[STPCard alloc] init];
card.number = self.paymentView.card.number;
card.expMonth = self.paymentView.card.expMonth;
card.expYear = self.paymentView.card.expYear;
card.cvc = self.paymentView.card.cvc;
[[STPAPIClient sharedClient] createTokenWithCard:card
                                      completion:^(STPToken *token, NSError *error) {
                                          if (error) {
                                              NSLog(@"%@",error);
                                          } else {
                                              NSString *myVal = [NSString stringWithFormat:@"%@",token];
                                              NSLog(@"%@",token);
                                              [PFCloud callFunctionInBackground:@"chargeMoney"
                                                                 withParameters:@{@"token":myVal}
                                                                          block:^(NSString *result, NSError *error) {
                                                                              if (!error) {
                                                                                  NSLog(@"from Cloud Code: %@",result);
                                                                              }
                                                                          }];

                                          };
                                      }];


}

Code to Charge

Parse.Cloud.define("chargeMoney", function(request, response) {
  response.success(request.params.token);
var stripe = require('stripe');
stripe.initialize('sk_test_ldqwdqwdqwdqwdwqdqwd ');

var stripeToken = request.params.token;

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

});

Error Ich bekomme

  [Error]: TypeError: Cannot call method 'create' of undefined
   at main.js:11:31 (Code: 141, Version: 1.7.1)

Was ist das Problem mit meinem Code. Ich habe nichts geändert, was ich gemäß der Dokumentation tue. Bitte schlagen Sie nur vor, was das Problem in meinem Code ist.

Antworten auf die Frage(4)

Ihre Antwort auf die Frage