44 lines
816 B
PHP
44 lines
816 B
PHP
<?php
|
|
|
|
namespace App\Enums\Order;
|
|
|
|
use Kwaadpepper\Enum\BaseEnumRoutable;
|
|
|
|
/**
|
|
* @method static self pending()
|
|
* Payment en attente
|
|
* @method static self failed()
|
|
* Payment à échoué
|
|
* @method static self payed()
|
|
* Le règlement à bien été validé
|
|
*/
|
|
final class PaymentStatus extends BaseEnumRoutable
|
|
{
|
|
/**
|
|
* Enum values
|
|
*
|
|
* @return array
|
|
*/
|
|
protected static function values(): array
|
|
{
|
|
return [
|
|
'pending' => 0,
|
|
'failed' => 1,
|
|
'payed' => 3
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Enum labels
|
|
*
|
|
* @return array
|
|
*/
|
|
protected static function labels(): array
|
|
{
|
|
return [
|
|
'pending' => __('En attente'),
|
|
'failed' => __('Échec'),
|
|
'payed' => __('Réglée')
|
|
];
|
|
}
|
|
}
|