2 回答

TA贡献1799条经验 获得超6个赞
经过多次组合和对stripe API的深入分析,找到了我一直在寻找的答案。
产品创建:
$pacoteSMS = [
'name' => $name,
'type' => 'good',
'active' => 'true',
'description' => $description,
"attributes" => [
"name"
],
];
SKU创建:
$sku = [
'product' => $stripe_product_id,
"attributes" => [
"name" => $name,
],
"price" => $price,
"currency" => "eur",
"inventory" => [
"type" => "infinite",
],
"active" => "true",
];

TA贡献1895条经验 获得超7个赞
该name
值attributes
位于 SKU 对象上的 内。您可以attributes[name]
在创建或更新 SKU 时进行设置。例如:
'attributes' => ['name' => 'the name'],
- 2 回答
- 0 关注
- 121 浏览
添加回答
举报