package com.fdkankan.pay.wx;

import com.fdkankan.pay.wx.sdk.WXPayConfig;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

public class WXPayDefaultConfig implements WXPayConfig {

    private byte[] certData;

    public WXPayDefaultConfig() throws Exception {
        /*String certPath = CONSTANTFILEPATH.WEIXINCERT;
        File file = new File(certPath);
        InputStream certStream = new FileInputStream(file);
        this.certData = new byte[(int) file.length()];
        certStream.read(this.certData);
        certStream.close();*/
    }

    public String getAppID() {
        return "wx779dbafb46bab697";
    }

    public String getMchID() {
        return "1627275258";
    }

    public String getKey() {
        return "4DAGE1684DAGE1684DAGE1684DAGE168";
    }

    public String getSecret() {
        return "306d0d03b372232e03dca1107525f4fc";
    }

    public String getCreateIP() {
        return "47.104.99.106";
    }

    public String getH5RedirectURL() {
        return "mobile.html#/check";
    }

    public String getNotifyURL() {
        return "api/order/pay/wechatPay/notify";
    }

    public String getOrderURL() {
        return "https://api.mch.weixin.qq.com/pay/unifiedorder";
    }

    public InputStream getCertStream() {
        return new ByteArrayInputStream(this.certData);
    }

    public int getHttpConnectTimeoutMs() {
        return 8000;
    }

    public int getHttpReadTimeoutMs() {
        return 10000;
    }
}
