From 940c5c77f3cb43dc631781dd23576d2fa1101964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 21 Dec 2020 12:19:48 +0100 Subject: [PATCH] find and setup db by company key in webhook request --- app/Http/Requests/Payments/PaymentWebhookRequest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Requests/Payments/PaymentWebhookRequest.php b/app/Http/Requests/Payments/PaymentWebhookRequest.php index 2ea39f713485..8f2b90e829db 100644 --- a/app/Http/Requests/Payments/PaymentWebhookRequest.php +++ b/app/Http/Requests/Payments/PaymentWebhookRequest.php @@ -13,6 +13,7 @@ namespace App\Http\Requests\Payments; use App\Http\Requests\Request; +use App\Libraries\MultiDB; use App\Models\Client; use App\Models\Company; use App\Models\CompanyGateway; @@ -26,6 +27,8 @@ class PaymentWebhookRequest extends Request public function authorize() { + MultiDB::findAndSetDbByCompanyKey($this->getCompany()->company_key); + return true; }