diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 8a59ad95f19c..90c8a57e5dc5 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -94,6 +94,8 @@ class Handler extends ExceptionHandler ]); }); + app('sentry')->captureException($exception); + } elseif (app()->bound('sentry') && $this->shouldReport($exception)) { app('sentry')->configureScope(function (Scope $scope): void { diff --git a/app/Http/Controllers/StripeConnectController.php b/app/Http/Controllers/StripeConnectController.php index 08458584af06..26456c0fce05 100644 --- a/app/Http/Controllers/StripeConnectController.php +++ b/app/Http/Controllers/StripeConnectController.php @@ -92,7 +92,7 @@ class StripeConnectController extends BaseController $company = Company::where('company_key', $request->getTokenContent()['company_key'])->first(); - $company_gateway = CompanyGatewayFactory::create($company->id, $company->id); + $company_gateway = CompanyGatewayFactory::create($company->id, $company->owner()->id); $fees_and_limits = new \stdClass; $fees_and_limits->{GatewayType::CREDIT_CARD} = new FeesAndLimits; $company_gateway->gateway_key = 'd14dd26a47cecc30fdd65700bfb67b34';