如何通过api更新条带中的所有法人实体

时间:2018-03-20 12:38:09

标签: stripe-payments stripe-connect stripe.js

如何通过API更新条带中的所有法人实体? 提前致谢。运行此时,它会抛出错误,如无效参数

   \Stripe\Stripe::setApiKey("");
   $account = \Stripe\Account::retrieve("");
   $account->first_name = "555-867-5309";
   $account->save();

1 个答案:

答案 0 :(得分:2)

$acc_details = \Stripe\Account::retrieve('');
$acc_details->legal_entity['first_name'] = 'First Name';
$acc_details->legal_entity['last_name'] = 'Last Name';
$acc_details->legal_entity['dob']['day'] = '04';
$acc_details->legal_entity['dob']['month'] = '05';
$acc_details->legal_entity['dob']['year'] = '1980';
$acc_details->legal_entity['type'] = 'individual';//Either “individual” or “company”
$acc_details->legal_entity['address']['city'] = 'Abbotsford';
$acc_details->legal_entity['address']['country'] = 'CA';
$acc_details->legal_entity['address']['line1'] = '33415 Maclure Rd';
$acc_details->legal_entity['address']['line2'] = '33415 Maclure Rd';
$acc_details->legal_entity['address']['postal_code'] = 'V2S 7W2';
$acc_details->legal_entity['address']['state'] = 'BC';
$acc_details->legal_entity['personal_id_number'] = '056464654';