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

Fixes for stripe authorize card

This commit is contained in:
David Bomba 2021-05-12 07:30:22 +10:00
parent 6ca3ec9c58
commit b1d250e999

View File

@ -297,6 +297,7 @@ class StripePaymentDriver extends BaseDriver
if ($client_gateway_token && $client_gateway_token->gateway_customer_reference) { if ($client_gateway_token && $client_gateway_token->gateway_customer_reference) {
$customer = Customer::retrieve($client_gateway_token->gateway_customer_reference); $customer = Customer::retrieve($client_gateway_token->gateway_customer_reference);
} else { } else {
$meta = [];
$data['name'] = $this->client->present()->name(); $data['name'] = $this->client->present()->name();
$data['phone'] = $this->client->present()->phone(); $data['phone'] = $this->client->present()->phone();
@ -304,7 +305,10 @@ class StripePaymentDriver extends BaseDriver
$data['email'] = $this->client->present()->email(); $data['email'] = $this->client->present()->email();
} }
$customer = Customer::create($data); if($this->stripe->stripe_connect)
$meta['account_id'] = $this->company_gateway->getConfigField('account_id');
$customer = Customer::create($data, $meta);
} }
if (!$customer) { if (!$customer) {