'微信支付', self::ALI_PAY => '支付宝支付', self::BALANCE_PAY => '余额支付', self::OFFLINE_PAY => '线下支付', ]; if (true === $type) { return $data; } return $data[$type] ?? '-'; } //支付状态 public static function getPayStatus($type) { $data = [ PayEnum::UNPAID => '待支付', PayEnum::ISPAID => '已支付', PayEnum::REFUNDED => '已退款', PayEnum::REFUSED_REFUND => '拒绝退款', ]; if ($type === true) { return $data; } return $data[$type] ?? '未知'; } }