mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 06:34:34 -04:00
Fixes for Stripe Verify
This commit is contained in:
parent
b044be4db4
commit
2382281b00
@ -14,6 +14,7 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
use App\Jobs\Util\ImportStripeCustomers;
|
use App\Jobs\Util\ImportStripeCustomers;
|
||||||
use App\Jobs\Util\StripeUpdatePaymentMethods;
|
use App\Jobs\Util\StripeUpdatePaymentMethods;
|
||||||
|
use App\Models\Client;
|
||||||
use App\Models\CompanyGateway;
|
use App\Models\CompanyGateway;
|
||||||
|
|
||||||
class StripeController extends BaseController
|
class StripeController extends BaseController
|
||||||
|
@ -22,6 +22,7 @@ use App\Models\Currency;
|
|||||||
use App\Models\GatewayType;
|
use App\Models\GatewayType;
|
||||||
use App\PaymentDrivers\StripePaymentDriver;
|
use App\PaymentDrivers\StripePaymentDriver;
|
||||||
use App\PaymentDrivers\Stripe\UpdatePaymentMethods;
|
use App\PaymentDrivers\Stripe\UpdatePaymentMethods;
|
||||||
|
use App\Utils\Traits\GeneratesCounter;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use Stripe\Customer;
|
use Stripe\Customer;
|
||||||
use Stripe\PaymentMethod;
|
use Stripe\PaymentMethod;
|
||||||
@ -29,6 +30,7 @@ use Stripe\PaymentMethod;
|
|||||||
class ImportCustomers
|
class ImportCustomers
|
||||||
{
|
{
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
|
use GeneratesCounter;
|
||||||
|
|
||||||
/** @var StripePaymentDriver */
|
/** @var StripePaymentDriver */
|
||||||
public $stripe;
|
public $stripe;
|
||||||
@ -123,6 +125,10 @@ class ImportCustomers
|
|||||||
|
|
||||||
$client->name = property_exists($customer, 'name') ? $customer->name : $customer->email;
|
$client->name = property_exists($customer, 'name') ? $customer->name : $customer->email;
|
||||||
|
|
||||||
|
if (!isset($client->number) || empty($client->number)) {
|
||||||
|
$client->number = $this->getNextClientNumber($client);
|
||||||
|
}
|
||||||
|
|
||||||
$client->save();
|
$client->save();
|
||||||
|
|
||||||
$contact = ClientContactFactory::create($client->company_id, $client->user_id);
|
$contact = ClientContactFactory::create($client->company_id, $client->user_id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user