package com.bohuikeji.frame.module.admin.entity.vo;

/**
 * Project Name: com.weixin.pay.api
 * File Name: WXPayConfig
 * Date: 2018-11-30 21:59
 * Copyright (c) 2018, 3141621744@qq.com All Rights Reserved.
 *
 * @author Tobin
 */
public class WXPayVo {

    /**
     * 公众号APPid
     * @return
     */
    public static String getGzhAppid(){
        return "wx622a1adff1efa32a";
    }


    /**
     * 客户端小程序小程序AppID
     * 获取 App ID
     * @return App ID
     */
    public static String getAppID() {
        return "wxcf3a1f3166d803a9";
    }
    /**
     * 骑手端小程序小程序AppID
     * 获取 App ID
     * @return App ID
     */
    public static String getCusMpID() {
        return "wxe374dfebb23539be";
    }

    /**
     * 客户端App的appId
     * v3版本
     * @return
     */
    public static String getCustAppID() { return "wxcf990538adccb931"; }

    /**
     * 骑手端App的appId
     * v3版本
     * @return
     */
    public static String getCourAppID() { return "wx1305f153eaf8bf23"; }

    /**
     * 获取 Mch ID  (安装证书的商户ID)
     *
     * @return Mch ID
     */
    public static String getMchID() {
        return "1555319231";
    }

    /**
     * 获取 API 密钥
     * @return API密钥
     */
    public static String getKey() {
        //return "I5EZ5jAYudbmOfe9ouOiSGMcBpWuieET";
        return "bb03f68922307171da460f6320f8f9f4";
    }
    /**
     *微信支付异步通知地址
     * @return
     */
    public static String getPayNotifyUrl() { return "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; }

    /**
     *微信退款异步通知地址
     * @return
     */
    public static String getRefundNotifyUrl() { return "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; }


    public static String getNotifyUrl() { return "http://tcjs.frp.bhynm.net/delivery/wxCoupon/sendCallbacks"; }

    /**
     * 微信证书
     * @return
     */
    public static String getCert() {
        String separator = System.getProperty("file.separator");
        return WXPayVo.getClassPath() + separator + "static" + separator + "cert" + separator +  "apiclient_cert.p12";
    }

    /**
     * 获取系统路径
     * @return
     */
    public static String getClassPath() {
        String path = Thread.currentThread().getContextClassLoader().getResource("").toString();
        String temp = path.replaceFirst("file:/", "");
        String separator = System.getProperty("file.separator");
        String resultPath = temp.replaceAll("/", separator + separator);
        return resultPath;
    }

}
