You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
payment/app/Model/Refund.php

28 lines
682 B
PHTML

1 year ago
<?php
declare(strict_types=1);
namespace App\Model;
1 year ago
class Refund extends Model
1 year ago
{
1 year ago
public const STATUS_PREPARE = 'PREPARE';
public const STATUS_INIT = 'INIT';
public const STATUS_PROCESS = 'PROCESS';
public const STATUS_SUCCESS = 'SUCCESS';
public const STATUS_FAILED = 'FAILED';
1 year ago
1 year ago
protected $table = 'refunds';
1 year ago
public static $shortStatusAndStatusMap = [
'I' => self::STATUS_INIT,
'P' => self::STATUS_PROCESS,
'S' => self::STATUS_SUCCESS,
'F' => self::STATUS_FAILED,
];
public static function getStatusByShortStatus($shortStatus)
{
return self::$shortStatusAndStatusMap[$shortStatus] ?: null;
}
1 year ago
}