AlipayHK 新增指定订单查询接口

This commit is contained in:
2024-05-30 09:54:49 +08:00
parent 804dc9b1b4
commit 1aea8e93f2
8 changed files with 88 additions and 68 deletions

View File

@@ -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);

View File

@@ -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轮训间隔(单位:秒)