Merge pull request #4548 from beganovich/v5-multidb-find-and-set-db-by-company-key

(v5) PaymentWebhookRequest: Set DB from company key
This commit is contained in:
Benjamin Beganović 2020-12-22 09:26:07 +01:00 committed by GitHub
commit 746a6689ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}