【问题标题】:Add custom fields to Stripe Invoice PHP将自定义字段添加到 Stripe Invoice PHP
【发布时间】:2022-10-14 23:14:05
【问题描述】:
\Stripe\Invoice::update($invoice_id, [
'custom_fields' => [
[
'name' => 'Company',
'value' => 'Apple'
]
]
]);

我在 custom_fields 上遇到了错误。我没有在 Stripe 文档中找到如何使用 custom_fields 的示例,但在 JSON 中应该是 custom_fields: [{name:'Company',value:'Apple'}] 但现在是 custom_fields: {0:{name:'Company',value:'Apple'}}

【问题讨论】:

    标签: php stripe-payments


    【解决方案1】:

    Stripe API Documentation

    看起来它会像这样工作:

    StripeInvoice::update($invoice_id, 
      ['custom_fields' => ['name' => 'Company', 'value' => 'Apple']]
    );
    

    【讨论】:

      猜你喜欢
      • 2017-08-04
      • 1970-01-01
      • 2014-04-06
      • 2018-05-23
      • 2015-08-16
      • 1970-01-01
      • 2022-01-25
      • 2019-01-01
      • 1970-01-01
      相关资源
      最近更新 更多