Tag: stripe connect

带有ID未find的条形标记

我正在尝试设置分条连接,但在创build收费时出现错误。 任何想法我做错了什么? 客户 Stripe.setPublishableKey([CUSTOMERS_PUBLISHABLE_KEY]); Stripe.card.createToken({ number: card.number, cvc: card.cvc, exp_month: card.exp.month, exp_year: card.exp.year }, stripeResponseHandler); 对此调用的响应如下所示: { "id": "tok_169ZyxF6SmAjeAPKC9YF7YAi", "livemode": false, "created": 1433330667, "used": false, "object": "token", "type": "card", "card": {…} }, "client_ip": "…" } 服务器 var stripe = require('stripe')(config.stripeSecretKey); stripe.charges.create({ amount: totalPrice, application_fee: appFee, currency: 'usd', source: paymentToken, // from above: tok_169ZyxF6SmAjeAPKC9YF7YAi destination: [CUSTOMERS_STRIPE_USERID] […]

如何为条带状态生成随机哈希

根据Stripe网站的build议: CSRF Protection To prevent CSRF attacks, use the state parameter, passing along a unique token as the value. We'll include the state you gave us when we redirect back. 我想在我的URL中包含一个state参数来保护我的应用程序。 我认为现在我已经清楚, state参数应该是唯一的,安全的,只是一系列的字符,将通知我的应用程序哪个用户只是由条纹连接授权。 我将把这个值存储在我的数据库中,当用户返回时,我会知道他们是谁,并能够将他们引导到正确的位置。 所以我的下一个问题。 我如何创build独特的令牌? 我有一个独立的令牌,从我的应用程序的一个单独的部分OAuth提供程序返回,但我没有保存在数据库中。 有没有build议的方式来创build我的节点服务器上的这种types的唯一令牌? 应该是md5还是sh1 ? 我应该把用户名和一个随机string,并将其保存在我的数据库,就像它是一个盐和散列? require('crypto').createHash('md5').update(STRING_TO_BE_HASH‌​ED + SALT).digest("hex") 我是否在意这个?

分条连接多个目标帐户ID

我们可以创build付款并通过NodeJS中的Stripe连接向application_fee收费, 如下所示 : // Get the credit card details submitted by the form var token = request.body.stripeToken; // Create the charge on Stripe's servers – this will charge the user's card stripe.charges.create( { amount: 1000, // amount in cents currency: "eur", source: token, description: "Example charge", application_fee: 123 // amount in cents }, {stripe_account: CONNECTED_STRIPE_ACCOUNT_ID}, […]

向Stripe提交付款申请时,“没有这样的标记”错误

我正在使用Stripe API设置付款,以允许用户在iPad上login到他们的Stripe账户,并接受任何人的付款。 要做到这一点,我使用条纹连接login并保存他们的帐户ID,然后我使用STPPaymentCardTextField获取信用卡详细信息,然后使用条纹iOS SDK我提交一张卡(与testing卡info – 4242 …)并通过createTokenWithCard取回令牌。 这成功返回一个令牌。 在这一点上,我需要提交该令牌以及目标帐户ID(在用户login后提供给应用程序)以及其他信息(货币,金额等)到我自己的服务器以向Stripe提交付款。 我已validation信息正在提交并转发到Stripe,但Stripe正在返回一个错误: { type: 'invalid_request_error', app[web.1]: message: 'No such token: tok_13vxes2eZkKYli2C9bHY1YfX', app[web.1]: param: 'source', app[web.1]: statusCode: 400, app[web.1]: requestId: 'req_7AIT8cEasnzEaq' }, app[web.1]: requestId: 'req_7AIT8cEasnzEaq', app[web.1]: statusCode: 400 } 如果我们直接提交信用卡信息,完全避免令牌,支付成功。 这个令牌有什么问题,我们不确定为什么会失败。 这里可能会出现什么问题? [[STPAPIClient sharedClient] createTokenWithCard:card completion:^(STPToken *token, NSError *error) { //submit tokenId and other info to 'charge' endpoint […]