123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace app\common\Enum;
- class PayEnum
- {
-
- /**
- * 支付方式 枚举
- */
- const METHOD_ALIPAY = 'alipay';
- const METHOD_WECHAT = 'wechat';
- const METHOD_DOUYIN = 'douyin';
- const METHOD_BALANCE = 'balance';
- const METHOD_OFFLINE = 'offline';
- const METHOD_CASH = 'cash';
- const METHOD_BANK_CARD = 'bank_card';
-
- // 支付类型枚举
- const METHOD_TEXT_MAP = [
- // self::METHOD_WECHAT => '微信支付',
- // self::METHOD_ALIPAY => '支付宝',
- self::METHOD_DOUYIN => '抖音支付',
- // self::METHOD_BALANCE => '余额支付',
- // self::METHOD_OFFLINE => '线下支付',
- // self::METHOD_CASH => '现金支付',
- // self::METHOD_BANK_CARD => '银行卡支付',
- ];
- // 商户类型
- const MERCHANT_TYPE_NORMAL = 0;
- // 服务商商户
- const MERCHANT_TYPE_SERVICE = 1;
- const MERCHANT_TYPE_MAP = [
- self::MERCHANT_TYPE_NORMAL => '普通商户',
- self::MERCHANT_TYPE_SERVICE => '服务商商户',
- ];
- public static function getMerchantTypeList()
- {
- return self::MERCHANT_TYPE_MAP;
- }
- public static function getMerchantTypeText($type){
- return self::MERCHANT_TYPE_MAP[$type] ?? '未知';
- }
-
- public static function getPayMethodList()
- {
- return self::METHOD_TEXT_MAP;
- }
- public static function getPayMethodText($method)
- {
- return self::METHOD_TEXT_MAP[$method] ?? '未知';
- }
- }
|