'recharge', 'name' => get_lang('dict_order.order_type_recharge') ]; } public static function getStatus($status = '') { $data = [ self::WAIT_PAY => [ 'name' => '待支付', 'status' => self::WAIT_PAY, 'is_refund' => 0, 'action' => [], 'member_action' => [ [ 'name' => '支付', 'class' => '', 'params' => '' ], ], ], self::FINISH => [ 'name' => '已完成', 'status' => self::FINISH, 'is_refund' => 0, 'action' => [], 'member_action' => [ ], ], self::CLOSE => [ 'name' => '已关闭', 'status' => self::CLOSE, 'is_refund' => 0, 'action' => [], 'member_action' => [ ], ] ]; if ($status == '') { return $data; } return $data[$status] ?? ''; } /** * 获取退款状态 * @param string $status * @return array|array[]|string */ public static function getRefundStatus(string $status = '') { $data = [ self::REFUNDING => [ 'name' => get_lang('dict_order_refund.refunding'), 'status' => self::REFUNDING ], self::REFUND_COMPLETED => [ 'name' => get_lang('dict_order_refund.refund_complete'), 'status' => self::REFUND_COMPLETED ], self::REFUND_FAIL => [ 'name' => get_lang('dict_order_refund.refund_fail'), 'status' => self::REFUND_FAIL ] ]; if ($status == '') { return $data; } return $data[$status] ?? ''; } }