| 1 |
<?php |
| 2 |
|
| 3 |
namespace Booktics\Payment; |
| 4 |
|
| 5 |
/** |
| 6 |
* Class representing various payment statuses. |
| 7 |
* |
| 8 |
* This class defines constants for different stages of payment processing, |
| 9 |
* providing a structured way to handle payment state within the application. |
| 10 |
*/ |
| 11 |
final class Payment_Status { |
| 12 |
|
| 13 |
public const PENDING = 'pending'; |
| 14 |
public const PROCESSING = 'processing'; |
| 15 |
public const COMPLETED = 'fully_paid'; |
| 16 |
public const FAILED = 'not_paid'; |
| 17 |
public const CANCELLED = 'cancelled'; |
| 18 |
public const REFUNDED = 'refunded'; |
| 19 |
public const PARTIALLY_PAID = 'partially_paid'; |
| 20 |
|
| 21 |
/** |
| 22 |
* Get all payment statuses. |
| 23 |
* |
| 24 |
* @return array |
| 25 |
*/ |
| 26 |
public static function get_statuses(): array { |
| 27 |
$reflection = new \ReflectionClass( self::class ); |
| 28 |
|
| 29 |
return $reflection->getConstants(); |
| 30 |
} |
| 31 |
} |
| 32 |
|