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

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-21 19:47:10 +00:00
co-authored by Cursor
parent 837c249634
commit 1bcbdbfdb1
6 changed files with 119 additions and 37 deletions
+6 -5
View File
@@ -39,12 +39,13 @@ 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, self::PROVIDER_HUBTEL => $public !== '' && $secret !== '',
default => false,
};
}
}