package com.jeequan.jeepay.core.model.params.sandpay;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * 杉德 通用配置信息
 *
 * @author xiaoyu
 *
 * @date 2021/12/22 17:20
 */
@Data
public class SandpayConfig {

    public static String REQ_URL = "https://cashier.sandpay.com.cn/gateway/api";
    public static String ORDER_PAY = "/order/pay";
    public static String ORDER_QUERY = "/order/query";
    public static String ORDER_REFUND = "/order/refund";
    /** 成功状态 **/
    public static String SUCCESS = "000000";
    public static String WAITING = "030020";
    public static String NOTIFY_SUCCESS = "1";

    //接口名称
    public static String ORDERPAY = "sandpay.trade.pay";					//统一下单
    public static String ORDERPAY_BARPAY = "sandpay.trade.barpay";			//条码下单
    public static String ORDERQUERY = "sandpay.trade.query";				//订单查询
    public static String ORDERREFUND = "sandpay.trade.refund";				//退货
    public static String CLEARFILEDOWNLOAD = "sandpay.trade.download";		//对账单下载

    //产品编码
    /** 支付宝扫码 **/
    public static String PRODUCTID_ALIPAY_QR = "00000006";
    /** 支付宝生活号 **/
    public static String PRODUCTID_ALIPAY_JSAPI = "00002022";
    /** 支付宝小程序 **/
    public static String PRODUCTID_ALIPAY_LITE = "00002023";
    /** 支付宝app **/
    public static String PRODUCTID_ALIPAY_JSAPI_APP = "02020004";
    /** 微信小程序 **/
    public static String PRODUCTID_WXPAY_LITE = "02010006";
    /** 微信公众号 **/
    public static String PRODUCTID_WXPAY_JSAPI = "02010002";


    public static final Map<String, String> WAY_CODE_MAP = new HashMap<>();
    static {
        WAY_CODE_MAP.put("ALI_QR", PRODUCTID_ALIPAY_QR);
        WAY_CODE_MAP.put("ALI_BAR", PRODUCTID_ALIPAY_QR);
        WAY_CODE_MAP.put("ALI_JSAPI", PRODUCTID_ALIPAY_JSAPI);
        WAY_CODE_MAP.put("ALI_APP", PRODUCTID_ALIPAY_JSAPI_APP);
        WAY_CODE_MAP.put("WX_JSAPI", PRODUCTID_ALIPAY_JSAPI_APP);
        WAY_CODE_MAP.put("WX_LITE", PRODUCTID_ALIPAY_JSAPI_APP);
        WAY_CODE_MAP.put("SAND_H5", "02010006");
    }

}
