如何用PHP更新条带的legal_entity.verification.document?
它是一个文件上传到条纹。
发布于 2016-06-20 07:55:04
legal_entity[verification][document]属性应该设置为文件上传的ID。
发布于 2017-05-08 10:05:39
您需要首先以多部分/表单数据格式将文件传递给您的服务器。获取路径并在Stripe FileUpload函数中添加路径。
您甚至可以通过将文件手动保存在服务器目录中并将文件路径传递给函数来测试文件上载。下面是样品。
$account = \Stripe\Account::retrieve('acct_xxxxxxxxxxx');
$uploadedFile = \Stripe\FileUpload::create(
array("purpose" => "identity_document",
"file" => fopen('file.png', 'r')
)
);您将使用文件id获得成功的上传响应,您需要在legal_entity.verification.document中传递的id如下:
$account->legal_entity->verification->document = $uploadedFile->id;
$account->save();https://stackoverflow.com/questions/37915148
复制相似问题