diff --git a/app/Listeners/HandleUserLoggedIn.php b/app/Listeners/HandleUserLoggedIn.php index 73053ef106..78afb39c68 100644 --- a/app/Listeners/HandleUserLoggedIn.php +++ b/app/Listeners/HandleUserLoggedIn.php @@ -6,6 +6,7 @@ use App\Events\UserLoggedIn; use App\Events\UserSignedUp; use App\Libraries\HistoryUtils; use App\Ninja\Repositories\AccountRepository; +use Utils; use Auth; use Carbon; use Session; @@ -65,5 +66,10 @@ class HandleUserLoggedIn } elseif ($account->isLogoTooLarge()) { Session::flash('warning', trans('texts.logo_too_large', ['size' => $account->getLogoSize() . 'KB'])); } + + // check custom gateway id is correct + if (! Utils::isNinja() && Gateway::find(GATEWAY_CUSTOM)->name !== 'Custom') { + Session::flash('error', trans('texts.error_incorrect_gateway_ids')); + } } } diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 8f85ddf371..c0a481bbd5 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2447,6 +2447,7 @@ $LANG = array( 'credit_number' => 'Credit Number', 'create_credit_note' => 'Create Credit Note', 'menu' => 'Menu', + 'error_incorrect_gateway_ids' => 'Error: The gateways table has incorrect ids.', );