AlipayHK 新增指定订单查询接口
This commit is contained in:
@@ -11,4 +11,10 @@ public class CommonConstant {
|
||||
// 单位 秒 一天过期 in redis
|
||||
public static final Long GENERATE_RESULT_EXPIRE_TIME = 24 * 60 * 60L;
|
||||
|
||||
public static class Numbers{
|
||||
public static final Integer NUMBER_10 = 10;
|
||||
public static final Integer NUMBER_1000 = 1000;
|
||||
public static final Integer NUMBER_10080 = 10080;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,9 +7,11 @@ import lombok.Getter;
|
||||
@Getter
|
||||
public enum CreditsEventsEnum {
|
||||
|
||||
PRICE("price","6"),
|
||||
// PRICE("price","6"),
|
||||
PRICE("price","0.1"),
|
||||
|
||||
BUY_CREDITS("Buy Credits","600"),
|
||||
// BUY_CREDITS("Buy Credits","600"),
|
||||
BUY_CREDITS("Buy Credits","10"),
|
||||
|
||||
INIT("init", "500"),
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ public class AlipayHKEncryptionUtil {
|
||||
// Serialize message body
|
||||
Gson gson = new GsonBuilder().disableHtmlEscaping().create();
|
||||
String content = gson.toJson(requestMessage);
|
||||
log.info("alipay-hk request 加密前:{}", content);
|
||||
|
||||
// Secure random iv 获取随机种子
|
||||
SecureRandom secureRandom = new SecureRandom();
|
||||
@@ -153,7 +154,7 @@ public class AlipayHKEncryptionUtil {
|
||||
|
||||
// Encode to json
|
||||
String jsonEncoded = JSONObject.toJSONString(alipayHKRequestDTO);
|
||||
log.info(jsonEncoded);
|
||||
log.info("alipay-hk request 加密加签后:{}",jsonEncoded);
|
||||
|
||||
// String info = AlipayHKRequestUtil.createOrder(alipayHKRequestDTO);
|
||||
// log.info(info);
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class AlipayHKRequestUtil {
|
||||
|
||||
public String createOrder(AlipayHKRequestDTO alipayHKRequestDTO) throws IOException {
|
||||
public String requestAlipayHK(AlipayHKRequestDTO alipayHKRequestDTO) throws IOException {
|
||||
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||
.connectTimeout(30, TimeUnit.SECONDS)
|
||||
.pingInterval(5, TimeUnit.SECONDS)//websocket轮训间隔(单位:秒)
|
||||
|
||||
Reference in New Issue
Block a user