ldc-boutique-cnc/app/Enums/Order/PaymentStatus.php
2023-05-16 07:43:17 +02:00

56 lines
1.3 KiB
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é
* @method static self refundedPartial()
* Le règlement à été remboursé partiellement
* @method static self refunded()
* Le règlement à été remboursé complétement
* @method static self canceled()
* Le règlement à été annulé
*/
final class PaymentStatus extends BaseEnumRoutable
{
/**
* Enum values
*
* @return array
*/
protected static function values(): array
{
return [
'pending' => 0,
'failed' => 1,
'payed' => 3,
'refundedPartial' => 4,
'refunded' => 5,
'canceled' => 6
];
}
/**
* Enum labels
*
* @return array
*/
protected static function labels(): array
{
return [
'pending' => __('En attente'),
'failed' => __('Échec'),
'payed' => __('Réglée'),
'refundedPartial' => __('Remboursé partiellement'),
'refunded' => __('Remboursé complètement'),
'canceled' => __('Annulée'),
];
}
}