Make POS payment routing plan-aware.
Deploy Ladill POS / deploy (push) Successful in 37s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-21 19:47:11 +00:00
co-authored by Cursor
parent ca08f303c0
commit 4dcc46e319
4 changed files with 136 additions and 27 deletions
+7 -5
View File
@@ -39,12 +39,14 @@ class PaymentGatewaySetting extends Model
return false;
}
$public = trim((string) $this->public_key);
$secret = trim((string) $this->secret_key);
return $secret !== '' && in_array($this->provider, [
self::PROVIDER_PAYSTACK,
self::PROVIDER_FLUTTERWAVE,
self::PROVIDER_HUBTEL,
], true);
return match ($this->provider) {
self::PROVIDER_PAYSTACK => str_starts_with($public, 'pk_') && str_starts_with($secret, 'sk_'),
self::PROVIDER_FLUTTERWAVE => $public !== '' && $secret !== '',
self::PROVIDER_HUBTEL => $public !== '' && $secret !== '',
default => false,
};
}
}