当前位置:网站首页>Wechat enterprise payment to change access, open quickly

Wechat enterprise payment to change access, open quickly

2022-07-05 12:45:00 QQ541645121

Enterprises pay to change is the ability of wechat to pay for opening up , Official documents :https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_1

Signature algorithm involved , The document is not detailed , This part of our online code should help you :

 public static String getSign(Map<String, String> params, String paternerKey) throws UnsupportedEncodingException {
        return EnDecryptUtil.MD5(createSign(params, false) + "&key=" + paternerKey).toUpperCase();
    }

    /**
     *  Construct signature 
     *
     * @param params
     * @param encode
     * @return
     * @throws UnsupportedEncodingException
     */
    public static String createSign(Map<String, String> params, boolean encode) throws UnsupportedEncodingException {
        Set<String> keysSet = params.keySet();
        Object[] keys = keysSet.toArray();
        Arrays.sort(keys);
        StringBuffer temp = new StringBuffer();
        boolean first = true;
        for (Object key : keys) {
            if (key == null || StringUtil.isEmpty(params.get(key))) //  If the parameter is empty, it will not participate in the signature 
                continue;
            if (first) {
                first = false;
            } else {
                temp.append("&");
            }
            temp.append(key).append("=");
            Object value = params.get(key);
            String valueStr = "";
            if (null != value) {
                valueStr = value.toString();
            }
            if (encode) {
                temp.append(URLEncoder.encode(valueStr, "UTF-8"));
            } else {
                temp.append(valueStr);
            }
        }
        return temp.toString();
    }

You can see , Core application conditions :

  1、 The merchant number has entered 90 And as of today, push back 30 Day merchant number keeps continuous transactions .

  2、 Login to WeChat payment merchant platform - Product center , Open enterprise payment to change .

Many people are stuck in this link , that , We can achieve through breakthroughs “ Exemption 90 Heaven settled in 、30 Daily continuous trading flow ” The limitation of , To achieve rapid project launch .

 

原网站

版权声明
本文为[QQ541645121]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140524550970.html