如何更新 stripe 的 legal_entity.verification.document?
How to update stripe's legal_entity.verification.document?
如何将条带的 legal_entity.verification.document 更新为 PHP?
是上传到stripe的文件吗
legal_entity[verification][document]
attribute should be set to a file upload 的 ID。
This part of the documentation explains how to upload a file using Stripe's API, and this part 说明如何将上传的文件附加到客户帐户。
您需要先将文件以multipart/form-data格式传递到您的服务器。获取路径并将路径添加到 Stripe FileUpload 函数中。
您甚至可以通过手动将文件保存在服务器目录中并将文件路径传递给函数来测试文件上传。
下面是示例。
$account = \Stripe\Account::retrieve('acct_xxxxxxxxxxx');
$uploadedFile = \Stripe\FileUpload::create(
array("purpose" => "identity_document",
"file" => fopen('file.png', 'r')
)
);
您将收到包含文件 ID 的成功上传响应,您需要将此 ID 传入 legal_entity.verification.document,例如:
$account->legal_entity->verification->document = $uploadedFile->id;
$account->save();
如何将条带的 legal_entity.verification.document 更新为 PHP?
是上传到stripe的文件吗
legal_entity[verification][document]
attribute should be set to a file upload 的 ID。
This part of the documentation explains how to upload a file using Stripe's API, and this part 说明如何将上传的文件附加到客户帐户。
您需要先将文件以multipart/form-data格式传递到您的服务器。获取路径并将路径添加到 Stripe FileUpload 函数中。
您甚至可以通过手动将文件保存在服务器目录中并将文件路径传递给函数来测试文件上传。 下面是示例。
$account = \Stripe\Account::retrieve('acct_xxxxxxxxxxx');
$uploadedFile = \Stripe\FileUpload::create(
array("purpose" => "identity_document",
"file" => fopen('file.png', 'r')
)
);
您将收到包含文件 ID 的成功上传响应,您需要将此 ID 传入 legal_entity.verification.document,例如:
$account->legal_entity->verification->document = $uploadedFile->id;
$account->save();