Read Paystack keys from platform admin settings.
Deploy Ladill Mini / deploy (push) Failing after 1m15s
Deploy Ladill Mini / deploy (push) Failing after 1m15s
Add a platform DB connection and PlatformSetting model so Mini uses the same admin-panel Paystack credentials as the monolith and other extracted apps. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -68,10 +68,17 @@ class PaystackService
|
||||
->asJson();
|
||||
}
|
||||
|
||||
protected function settingsConnection(): string
|
||||
{
|
||||
return (string) config('billing.platform_settings_connection', 'platform');
|
||||
}
|
||||
|
||||
protected function settingValue(string $key, mixed $fallback = null): mixed
|
||||
{
|
||||
try {
|
||||
if (!Schema::hasTable('platform_settings')) {
|
||||
$connection = $this->settingsConnection();
|
||||
|
||||
if (! Schema::connection($connection)->hasTable('platform_settings')) {
|
||||
return $fallback;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user