2015-11-09 60 views
1

我正試圖使用​​條紋雲代碼模塊對條紋卡充電。條紋雲代碼模塊內部問題?

我的代碼以前的工作,但突然從貌似內stripe.js收到此錯誤

TypeError: Object [object Object] has no method 'isString' 
at request (stripe.js:49:25) 
at post (stripe.js:117:12) 
at Object.module.exports.Charges.create (stripe.js:157:16) 
at main.js:6:20 

這裏是我的代碼(減去我當然鍵):

var Stripe = require('stripe'); 
    Stripe.initialize('#################'); 
    Parse.Cloud.define("preOrder", function(request, response) { 
     var tok = String(request.params.token) 
     Stripe.Charges.create({ 
      amount: 100 * 40, 
      currency: "usd", 
      card: tok // the token id should be sent from the client 
     },{ 
      success: function(httpResponse) { 
       response.success("Purchase made!"); 
      }, 
      error: function(httpResponse) { 
       response.error("Uh oh, something went wrong"); 
     } 
     }); 
    }); 
+0

你試了多少?這篇文章建議恢復雲代碼爲1.5 http://stackoverflow.com/questions/32544979/parse-stripe-ios-main-js同樣適用於這一個http://stackoverflow.com/questions/32573109/error-when-建立充電與 - 解析-COM-條紋API – cYrixmorten

回答