IOS端公众号app相关,更改401错误码message,更改getAccessToken方法,银盛部分相关,四要素新增错误码
This commit is contained in:
@@ -96,6 +96,17 @@ public class ParameterConfig {
|
||||
*/
|
||||
@Value("${parameter.APPSECRET}")
|
||||
public String APPSECRET;
|
||||
|
||||
/**
|
||||
* IOS公众号ID
|
||||
*/
|
||||
@Value("${parameter.APPID_IOS}")
|
||||
public String APPID_IOS;
|
||||
/**
|
||||
* IOS公众号密钥
|
||||
*/
|
||||
@Value("${parameter.APP_SECRET_IOS}")
|
||||
public String APP_SECRET_IOS;
|
||||
/**
|
||||
* 商户号
|
||||
*/
|
||||
@@ -276,6 +287,8 @@ public class ParameterConfig {
|
||||
ParametersUtil.APPLETS_APPID = APPLETS_APPID;
|
||||
ParametersUtil.APPLETS_SECRET = APPLETS_SECRET;
|
||||
ParametersUtil.APPSECRET = APPSECRET;
|
||||
ParametersUtil.APPID_IOS = APPID_IOS;
|
||||
ParametersUtil.APP_SECRET_IOS = APP_SECRET_IOS;
|
||||
ParametersUtil.PID = PID;
|
||||
ParametersUtil.KEY = KEY;
|
||||
ParametersUtil.wechatCallback = wechatCallback;
|
||||
|
||||
@@ -37,9 +37,9 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
public class MobV2PushUtilIOS {
|
||||
|
||||
public static final String appKey = "lLZ0nPNJZ29CcEgkzxTkj7";
|
||||
public static final String appId = "uygciF2fKU8KYGAuLghjQ7";
|
||||
public static final String masterSecret = "T2xS8yXA6SAVg1Ns8wYdZ";
|
||||
public static final String appKey = "QwyHsKpc0I9BQMk9Xysx74";
|
||||
public static final String appId = "yuBG87yWEt6SXrwBSSvjy1 ";
|
||||
public static final String masterSecret = "QwyHsKpc0I9BQMk9Xysx74";
|
||||
|
||||
public String getToken() throws IOException, NoSuchAlgorithmException {
|
||||
|
||||
|
||||
@@ -53,6 +53,15 @@ public class ParametersUtil {
|
||||
* AppSecret
|
||||
*/
|
||||
public static String APPSECRET;
|
||||
/**
|
||||
* IOS公众号ID
|
||||
*/
|
||||
public static String APPID_IOS;
|
||||
/**
|
||||
* IOS公众号密钥
|
||||
*/
|
||||
public static String APP_SECRET_IOS;
|
||||
|
||||
/**
|
||||
*商户号
|
||||
*/
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
package cn.pluss.platform.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
public class WechatSignUtil {
|
||||
|
||||
|
||||
@@ -95,4 +89,30 @@ public class WechatSignUtil {
|
||||
signParam.append("&key=").append(payKey);
|
||||
return signParam.toString();
|
||||
}
|
||||
/**
|
||||
* 加密模式
|
||||
* @return
|
||||
*/
|
||||
public static String createNonceStr() {
|
||||
return UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
* @return
|
||||
*/
|
||||
public static String createTimestamp() {
|
||||
return Long.toString(System.currentTimeMillis() / 1000);
|
||||
}
|
||||
public static String byteToHex(final byte[] hash) {
|
||||
Formatter formatter = new Formatter();
|
||||
for (byte b : hash)
|
||||
{
|
||||
formatter.format("%02x", b);
|
||||
}
|
||||
String result = formatter.toString();
|
||||
formatter.close();
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user