25 lines
791 B
PHP
25 lines
791 B
PHP
<?php
|
|
|
|
namespace Modules\Core\Payment\Enums;
|
|
|
|
/**
|
|
* The normalized outcome of a single gateway operation (pay, authorize,
|
|
* capture, void, refund) — never the gateway's own raw status string
|
|
* (Stripe's "succeeded", Nexi's "EXECUTED", Mastercard's own codes), so a
|
|
* caller never needs gateway-specific knowledge to know what happened.
|
|
*/
|
|
enum PaymentResultStatus
|
|
{
|
|
case Succeeded;
|
|
case Failed;
|
|
|
|
/**
|
|
* The gateway hasn't resolved this operation yet and won't in the same
|
|
* call — e.g. Stripe's requires_action, a redirect the shopper hasn't
|
|
* completed. A driver returning this from initiate()/handleCallback()
|
|
* has not yet dispatched a terminal event; something else (a later
|
|
* callback) is expected to resolve it.
|
|
*/
|
|
case Pending;
|
|
}
|