package com.jeequan.jeepay.thirdparty.channel.zftpay.model;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ReqMethod {

    APP(Const.GATE_WAY, "alipay.trade.app.pay", "alipay_trade_app_pay_response"),

    WAP(Const.GATE_WAY, "alipay.trade.wap.pay", "alipay_trade_wap_pay_response"),

    /**
     * 入网前预校验
     */
    AUDIT_PRE_CHECK(Const.GATE_WAY, "ant.merchant.expand.indirect.zft.consult", "ant_merchant_expand_indirect_zft_consult_response"),

    /**
     * 入网上传图片信息
     */
    AUDIT_IMG_UPLOAD(Const.GATE_WAY, "ant.merchant.expand.indirect.image.upload", "ant_merchant_expand_indirect_image_upload_response"),

    /**
     * 直付通二级商户创建
     */
    AUDIT_MERCH_CREATE(Const.GATE_WAY, "ant.merchant.expand.indirect.zft.create", "ant_merchant_expand_indirect_zft_create_response"),

    /**
     * 直付通二级商户免证件照创建
     */
    AUDIT_MERCH_SIMPLE_CREATE(Const.GATE_WAY, "ant.merchant.expand.indirect.zft.simplecreate", "ant_merchant_expand_indirect_zft_simplecreate_response"),

    /**
     * 商户入驻查询
     */
    AUDIT_RESULT_QUERY(Const.GATE_WAY, "ant.merchant.expand.indirect.zftorder.query", "ant_merchant_expand_indirect_zftorder_query_response"),

    /**
     * 通过通知
     */
    AUDIT_PASS_NOTICE(Const.GATE_WAY, "ant.merchant.expand.indirect.zft.passed", "ant_merchant_expand_indirect_zft_passed_response"),

    /**
     * 个人限额升级
     */
    MERCH_UPGRADE(Const.GATE_WAY, "ant.merchant.expand.indirect.zft.upgrade", "ant_merchant_expand_indirect_zft_upgrade_response"),

    /**
     * 商户作废
     */
    MERCH_DELETE(Const.GATE_WAY, "ant.merchant.expand.indirect.zft.delete", "ant_merchant_expand_indirect_zft_delete_response"),

    /**
     * 商户信息修改
     */
    MERCH_MODIFY(Const.GATE_WAY, "ant.merchant.expand.indirect.zft.modify", "ant_merchant_expand_indirect_zft_modify_response"),

    /**
     * 驳回通知
     */
    AUDIT_REJECT_NOTICE(Const.GATE_WAY, "ant.merchant.expand.indirect.zft.rejected", "ant_merchant_expand_indirect_zft_rejected_response"),

    COMFRIM(Const.GATE_WAY, "alipay.trade.settle.confirm", "alipay_trade_settle_confirm_response"),

    SETTLE(Const.GATE_WAY, "alipay.trade.order.settle", "alipay_trade_order_settle_response"),

    SETTLE_QUERY(Const.GATE_WAY, "alipay.trade.order.settle.query", "alipay_trade_order_settle_query_response"),

    ONSETTLE_QUERY(Const.GATE_WAY, "alipay.trade.order.onsettle.query", "alipay_trade_order_onsettle_query_response"),

    REFUND(Const.GATE_WAY, "alipay.trade.refund", "alipay_trade_refund_response"),

    REFUND_QUERY(Const.GATE_WAY, "alipay.trade.fastpay.refund.query", "alipay_trade_fastpay_refund_query_response"),

    BIND(Const.GATE_WAY, "alipay.trade.royalty.relation.bind", "alipay_trade_royalty_relation_bind_response"),

    UNBIND(Const.GATE_WAY, "alipay.trade.royalty.relation.unbind", "alipay_trade_royalty_relation_unbind_response"),

    TRADE_QUERY("https://openapi.alipay.com/gateway.do", "alipay.trade.query", "alipay_trade_query_response"),

    CERT_VERIFY_PRE_CONSULT("https://openapi.alipay.com/gateway.do", "alipay.user.certdoc.certverify.preconsult", "alipay_user_certdoc_certverify_preconsult_response"),

    CERT_VERIFY_CONSULT("https://openapi.alipay.com/gateway.do", "alipay.user.certdoc.certverify.consult", "alipay_user_certdoc_certverify_consult_response");

    private final String url;

    private final String method;

    private final String responseKey;

//    public static ReqMethod getVal(String type) {
//        ThirdPay.PayWay val = ThirdPay.PayWay.getVal(type);
//        if (val == null) {
//            return WAP;
//        }
//
//        switch (val) {
//            case APP -> {
//                return ReqMethod.APP;
//            }
//        }
//        return WAP;
//    }
}
