Feat: Payment Restructuring to be fully event-driven
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Payment\Contracts;
|
||||
|
||||
/**
|
||||
* Every driver implements this, orthogonal to which payment operations
|
||||
* (SupportsPay, SupportsAuthorization, ...) it supports — whether a driver
|
||||
* can actually be used right now is a separate question from what it's
|
||||
* capable of when it can be. An offline driver has no external dependency
|
||||
* to be missing and always returns true; a gateway driver checks its own
|
||||
* credentials/API key.
|
||||
*/
|
||||
interface Configurable
|
||||
{
|
||||
/**
|
||||
* Independent of any admin-facing enabled/disabled toggle a caller
|
||||
* might also apply on top — this is only about whether the driver
|
||||
* itself is usable right now (e.g. Stripe with no API key configured
|
||||
* is never usable, regardless of any such toggle).
|
||||
*/
|
||||
public function isConfigured(): bool;
|
||||
}
|
||||
Reference in New Issue
Block a user