1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

Fixes for braintree

This commit is contained in:
David Bomba 2022-09-05 13:01:13 +10:00
parent 0b37f42db8
commit 8ba5e12778

View File

@ -110,17 +110,17 @@ class BraintreePaymentDriver extends BaseDriver
}
$result = $this->gateway->customer()->create([
'firstName' => $this->client->present()->name,
'email' => $this->client->present()->email,
'phone' => $this->client->present()->phone,
'firstName' => $this->client->present()->name(),
'email' => $this->client->present()->email(),
'phone' => $this->client->present()->phone(),
]);
if ($result->success) {
$address = $this->gateway->address()->create([
'customerId' => $result->customer->id,
'firstName' => $this->client->present()->name,
'streetAddress' => $this->client->address1,
'postalCode' => $this->client->postal_code,
'firstName' => $this->client->present()->name(),
'streetAddress' => $this->client->address1 ?: '',
'postalCode' => $this->client->postal_code ?: '',
'countryCodeAlpha2' => $this->client->country ? $this->client->country->iso_3166_2 : '',
]);