如何在PHP中通过STRIPE API注册用户


how to register user in STRIPE through STRIPE API in PHP

我使用STRIPE支付网关的PHP应用程序。在这个系统中创建用户时,我还需要创建他们的STRIPE帐户,是否可以通过STRIPE API?

处理步骤如下-

1. User will register in our application and will fill up all the required details
2. Once the personal details are filled up, user needs to pay for the registration through STRIPE.
3. If user doesn't have STRIPE account then he/she would be redirected to the STRIPE payment gateway page registration page, where all the required details will be automatically filled up in that registration form.
4. User will submit that form and would be registered.
5 Once the registration is done, he /she will pay the required amount and would be back to the website.

请让我知道上述是否可以实现。

提前感谢。

Mohit

如果您的平台使用托管帐户,那么您应该通过API创建帐户,如文档中所述:

$account = 'Stripe'Account::create([
  "country" => "US",
  "managed" => true
]);

如果你的平台使用独立帐户,那么你应该理想地使用OAuth流让用户登录到他们现有的Stripe帐户或创建一个新帐户,并将该帐户连接到你的平台。

也可以通过API创建独立帐户,具有延迟帐户激活功能:

$account = 'Stripe'Account::create([
  "country" => "US",
  "managed" => false,
  "email" => "example@stripe.com"
]);

但是,如果用户已经使用您在email参数中提供的电子邮件地址注册了一个Stripe帐户,则此操作将失败。在这种情况下,您必须使用OAuth流将其帐户连接到您的平台。