1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
 
namespace app\common\enum\order;
 
use MyCLabs\Enum\Enum;
 
/**
 * 订单支付方式枚举类
 */
class OrderPayTypeEnum extends Enum
{
    // 余额支付
    const BALANCE = 10;
 
    // 微信支付
    const WECHAT = 20;
 
    // 支付宝支付
    const ALIPAY = 30;
    // 连盟币支付
    const SUPPLY = 40;
    // 激活码支付
    const CTIVATIONCODE = 50;
 
    // 积分兑换(特殊场景使用 by lyzflash)
    const POINTS = 60;
 
 
    /**
     * 获取枚举数据
     */
    public static function data()
    {
        return [
            self::BALANCE => [
                'name' => '余额支付',
                'value' => self::BALANCE,
            ],
            self::WECHAT => [
                'name' => '微信支付',
                'value' => self::WECHAT,
            ],
            self::ALIPAY => [
                'name' => '支付宝支付',
                'value' => self::ALIPAY,
            ],
            self::SUPPLY => [
                'name' => '连盟币',
                'value' => self::SUPPLY,
            ],
            self::CTIVATIONCODE => [
                'name' => '激活码支付',
                'value' => self::CTIVATIONCODE,
            ],
            self::POINTS => [
                'name' => '积分兑换',
                'value' => self::POINTS,
            ],
        ];
    }
 
}