package cn.newfeifan.mall.module.pay.enums.fuyouorder;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 富友支付订单的类型枚举
 */

@Getter
@AllArgsConstructor
public enum FuYouPayOrderTypeEnum {

    JSAPI("JSAPI","公众号线下支付"),
    APP("APP","app支付(暂不可用)"),
    FWC("FWC","支付宝服务窗"),
    LETPAY("LETPAY","小程序"),
    WXBXJS("WXBXJS","(微信公众号保险类)"),
    WXBXLET("WXBXLET","(微信小程序保险类)"),
    WXBXAPP("WXBXAPP","(微信APP保险类)"),
    ALBXJS("ALBXJS","(支付宝服务窗保险类)"),
    APPLEPAY("APPLEPAY","相机扫码)"),
    UNIONPAY("UNIONPAY","(云闪付扫码)"),
    BESTPAY("BESTPAY","(翼支付js)"),
    ;


    private final String code;

    private final String describe;

    public static String getCode(String code){
        for (FuYouPayOrderTypeEnum type : FuYouPayOrderTypeEnum.values()) {
            if(type.getCode().equals(code)){
                return type.getCode();
            }
        }
        return null;
    }
}
