Fixes for Stripe Connect

This commit is contained in:
David Bomba 2021-05-10 11:37:53 +10:00
parent 2def5e77fc
commit 685b5be11c

View File

@ -57,9 +57,17 @@ class StripeConnectController extends BaseController
} }
$account = Account::create($data); $stripe = new \Stripe\StripeClient(
config('ninja.ninja_stripe_key');
);
$link = Account::link($account->id, $token); $account = $stripe->accounts->create($data);
nlog($account);
$link = $stripe->accountLinks->create($account->id, $token);
nlog($link);
if(!$company_gateway) if(!$company_gateway)
$company_gateway = CompanyGatewayFactory::create($request->getCompany()->id, $request->getContact()->id); $company_gateway = CompanyGatewayFactory::create($request->getCompany()->id, $request->getContact()->id);