【问题标题】:Stripe business profile is not showing on request bodyStripe 业务资料未显示在请求正文上
【发布时间】:2019-10-10 20:48:38
【问题描述】:

我处于测试模式,我在前端使用 JavaScript 并在后端使用 PHP 成功创建了一个自定义连接帐户。

帐户创建成功,但由于某种原因,业务资料未显示在请求正文中(我在仪表板的条状日志中看到了这一点)。

我在提交表单之前看到一条警告消息: business_profile 不是可识别的参数

以下是我在测试时使用的 API 编码供您参考: https://stripe.com/docs/api/accounts/create?lang=php#create_account-business_profile

JavaScript

const accountResult = await stripe.createToken('account', {
    business_type: 'company',
    company: {...},
    business_profile: {
      mcc: "5812",
      support_email: "test@example.com",
      url: "https://example.com",
    },
    tos_shown_and_accepted: true,
});

PHP

// ...
$account = \Stripe\Account::create([
    "country" => "FR",
    "type" => "custom",
    "account_token" => $account_token,
]);
// ...

【问题讨论】:

    标签: javascript php stripe-payments


    【解决方案1】:

    stripe.createToken 不接受 business_profile 值,也不管理 Stripe\Account 对象 - 它创建 a Stripe\Token。您必须通过单独调用 Stripe API 来更新该信息。它执行的参数采用are documented here:

    姓名、地址线路1、地址线路2、地址城市、地址状态、地址压缩、地址国家、货币

    【讨论】:

      猜你喜欢
      • 2020-09-14
      • 2018-05-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-17
      • 2021-06-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多