Closed JoshuaBedford closed 7 years ago
@JoshuaBedford The issue here is that you should set each field in the legal_entity
hash directly instead of "overwriting" the whole object.
Your code should look like this:
$acct->legal_entity->type = 'individual';
$acct->legal_entity->first_name = $first_name;
$acct->legal_entity->last_name = $last_name;
$acct->legal_entity->ssn_last_4 = $ssn_last4;
$acct->tos_Acceptance->date = time();
$acct->save();
you set the fields you want to set. You don't need to copy anything that is already set. You also should only set non empty values.
@remi-stripe Thanks! Knew i was having a bad moment there. Seems pretty obvious doesn't it? Thanks for the prompt response. I'll try that out.
Howdy. I'm currently developing a PHP application using Laravel and Stripe Connect.
I can successfully create a customer, but when i go to UPDATE the customer (following this documentation) it says there are empty values that I never specified (see error below):
You passed an empty string for 'legal_entity[personal_address]'. We assume empty values are an attempt to unset a parameter; however 'legal_entity[personal_address]' cannot be unset. You should remove 'legal_entity[personal_address]' from your request or supply a non-empty value.
In the documentation, it says that is an optional field, but retrieving the account generates an object with it as an empty value, which it won't accept to save the updated information.
For reference, here is my code.
I'm sure this is all due to some sort of misunderstanding on my part, but I see no reason why this should not work. Your help is much appreciated.
P.S. I am on PHP 7.1.6 and Stripe 5.2.