mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for braintree
This commit is contained in:
parent
0b37f42db8
commit
8ba5e12778
@ -110,17 +110,17 @@ class BraintreePaymentDriver extends BaseDriver
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->gateway->customer()->create([
|
$result = $this->gateway->customer()->create([
|
||||||
'firstName' => $this->client->present()->name,
|
'firstName' => $this->client->present()->name(),
|
||||||
'email' => $this->client->present()->email,
|
'email' => $this->client->present()->email(),
|
||||||
'phone' => $this->client->present()->phone,
|
'phone' => $this->client->present()->phone(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($result->success) {
|
if ($result->success) {
|
||||||
$address = $this->gateway->address()->create([
|
$address = $this->gateway->address()->create([
|
||||||
'customerId' => $result->customer->id,
|
'customerId' => $result->customer->id,
|
||||||
'firstName' => $this->client->present()->name,
|
'firstName' => $this->client->present()->name(),
|
||||||
'streetAddress' => $this->client->address1,
|
'streetAddress' => $this->client->address1 ?: '',
|
||||||
'postalCode' => $this->client->postal_code,
|
'postalCode' => $this->client->postal_code ?: '',
|
||||||
'countryCodeAlpha2' => $this->client->country ? $this->client->country->iso_3166_2 : '',
|
'countryCodeAlpha2' => $this->client->country ? $this->client->country->iso_3166_2 : '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user