Add optional owner gateway routing to Merchant.
Deploy Ladill Merchant / deploy (push) Successful in 44s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-21 19:47:13 +00:00
co-authored by Cursor
parent b737725be4
commit 5166cd8a64
9 changed files with 382 additions and 8 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class PaymentGatewaySetting extends Model
{
public const PROVIDER_PAYSTACK = 'paystack';
protected $fillable = ['owner_ref', 'provider', 'public_key', 'secret_key', 'is_active', 'metadata'];
protected function casts(): array
{
return [
'public_key' => 'encrypted',
'secret_key' => 'encrypted',
'is_active' => 'boolean',
'metadata' => 'array',
];
}
public function isConfigured(): bool
{
return $this->is_active
&& $this->provider === self::PROVIDER_PAYSTACK
&& str_starts_with(trim((string) $this->public_key), 'pk_')
&& str_starts_with(trim((string) $this->secret_key), 'sk_');
}
}