简体   繁体   English

条纹 API; 如何成功创建测试连接帐户?

[英]Stripe API; How to create test connect account successfully?

I'm using Stripe connect and I have trouble making connect account for just testing.我正在使用 Stripe connect,但我无法创建仅用于测试的连接帐户。 Basically some fake data is invalid so I cannot make any test connect account.基本上一些虚假数据是无效的,所以我无法创建任何测试连接帐户。 Is there an easy way or kind of fake info for creating test connect account?是否有一种简单的方法或一种虚假信息来创建测试连接帐户?

There are two ways to approach this.有两种方法可以解决这个问题。 First, when using Standard accounts, you don't need to enter any information in the account application form.首先,使用标准账户时,您无需在账户申请表中输入任何信息。 As long as you use your development client application id ca_XXXX then you would see a link at the top of the form during the OAuth flow that reads "Skip this account form".只要您使用您的开发客户端应用程序 ID ca_XXXX您就会在 OAuth 流程中的表单顶部看到一个链接,上面写着“跳过此帐户表单”。 This lets you bypass the activation form and connect the account to the platform.这使您可以绕过激活表单并将帐户连接到平台。

Otherwise, you can use Custom accounts to create test accounts via the API with fake/test information to test your integration.否则,您可以使用自定义帐户通过带有虚假/测试信息的 API 创建测试帐户来测试您的集成。

To test a Connect account you have to: 1. Create a Stripe Connect account (using some email_address_A ) 2. Then create a second, non-Connect account (using some email_address_B )要测试 Connect 帐户,您必须: 1. 创建一个 Stripe Connect 帐户(使用一些email_address_A ) 2. 然后创建第二个非 Connect 帐户(使用一些email_address_B

From the Stripe documentation :条纹文档

You can create any type of test account you need: Standard, Express, or Custom.您可以创建您需要的任何类型的测试帐户:标准、快速或自定义。 You can also create multiple test accounts, eg, representing multiple countries.您还可以创建多个测试帐户,例如代表多个国家。

You should not connect the platform account to itself, as that fails to reflect the real world use of Connect, and makes debugging challenging.您不应将平台帐户与其自身相关联,因为这无法反映 Connect 的实际使用情况,并使调试具有挑战性。

To test the OAuth flow for connecting another account, create a new Stripe account using another email address and then take that new account through the OAuth flow.要测试连接另一个帐户的 OAuth 流,请使用另一个电子邮件地址创建一个新的 Stripe 帐户,然后通过 OAuth 流使用该新帐户。 This works for both Standard and Express accounts.这适用于标准和快速帐户。

To test Express accounts without providing a real phone number, use 000 000 0000 as the phone number and 000-000 as the SMS code when prompted.要在不提供真实电话号码的情况下测试 Express 帐户,请在出现提示时使用000 000 0000作为电话号码和000-000作为 SMS 代码。

You can create Custom test accounts using the code on the Custom Accounts page.您可以使用自定义帐户页面上的代码创建自定义测试帐户。 The account does not need to be activated because it can't be used for live charges.该帐户不需要激活,因为它不能用于实时收费。

Using OAuth使用 OAuth

To easily test an OAuth integration, the development client_id allows you to:为了轻松测试 OAuth 集成,开发 client_id 允许您:

  • Set your redirect_uri to a non-HTTPS URL将您的 redirect_uri 设置为非 HTTPS 网址
  • Set your redirect_uri to localhost将您的 redirect_uri 设置为 localhost
  • Force-skip the account form instead of having to fill out an entire account application (Standard accounts only)强制跳过帐户表格,而不必填写整个帐户申请(仅限标准帐户)
  • Get test access tokens for connected users获取连接用户的测试访问令牌

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM