add swiftpayments from old source

This commit is contained in:
2024-09-01 17:06:49 +05:00
parent 9d65fa72b6
commit a5978835d0
27 changed files with 1822 additions and 141 deletions

View File

@@ -8,6 +8,32 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Stevebauman\Location\Facades\Location;
/**
* Application locales
*
* @return array<string, string>
*/
function appLocales(): array
{
return is_array(config('app.locales')) ? config('app.locales') : [];
}
/**
* Modules directory path
*/
function modules_path(string $path = ''): string
{
return app_path('Modules/'.$path);
}
/**
* Check if module exists
*/
function module_exists(string $module): bool
{
return is_dir(modules_path(ucfirst($module)));
}
/**
* Check if a client IP is in our Server subnet
*