EntryThirdRespDto 为 null 的情况

This commit is contained in:
gong
2026-01-09 16:58:26 +08:00
parent e203d7275a
commit 8cbf20e751
3 changed files with 15 additions and 13 deletions

View File

@@ -132,10 +132,10 @@ public class AlipayIsvEntryManager {
respDto.setStatus(PayCst.EntryStatus.REJECTED);
respDto.setErrorMsg(object.getString(PayCst.ALIPAY_ERROR_MSG_KEY));
return respDto;
} catch (IOException e) {
log.error("上传图片出错", e);
} catch (Exception e) {
log.error("支付宝开启代商户签约创建应用事务异常2", e);
respDto.setStatus(PayCst.EntryStatus.REJECTED);
respDto.setErrorMsg("上传图片出错");
respDto.setErrorMsg(e.getMessage());
return respDto;
}
}

View File

@@ -336,11 +336,11 @@ public class WechatEntryManager {
public static void main(String[] args) throws IOException {
queryMerchantEntryStatus(null, "20220106000000000001");
// queryMerchantEntryStatus(null, "20220106000000000001");
// int offset = 0;
// Integer limit = 100;
// JSONObject resp = queryBankList(null, offset, limit);
int offset = 0;
Integer limit = 100;
JSONObject resp = queryBankList(null, offset, limit);
// queryBankBranchList(dto, "1000009561", "110000", offset, limit);
// queryBankBranchList(dto, "1000009561", "29", offset, limit);

View File

@@ -50,22 +50,24 @@ public class WechatReqUtils {
String authorization = String.format("WECHATPAY2-SHA256-RSA2048 mchid=\"%s\",nonce_str=\"%s\",signature=\"%s\",timestamp=\"%d\",serial_no=\"%s\"",
configDto.getMerchantId(), nonce, signature, timestamp, configDto.getSerialNumber());
HttpRequest request = switch (method) {
case "POST" -> HttpUtil.createPost(configDto.getDomain() + url)
.header("Authorization", authorization)
.header("Content-Type", "application/json")
.header("Wechatpay-Serial", configDto.getPublicKeyId())
.body(body);
.charset(StandardCharsets.UTF_8)
.contentType("application/json")
.body(body );
case "GET" -> HttpUtil.createGet(configDto.getDomain() + url)
.header("Authorization", authorization)
.header("Content-Type", "application/json")
.header("Wechatpay-Serial", configDto.getPublicKeyId());
.charset(StandardCharsets.UTF_8)
.contentType("application/json");
default -> throw new CzgException("不支持的请求方法");
};
log.info("微信支付请求url = {} \nauthorization: {}", url, authorization);
HttpResponse response = request.execute();
String s = response.body();
log.info("微信支付请求url = {}, method: {}, body: {}, resp: {}", url, method, body, s);
log.info("微信支付请求url = {}\n\tmethod: {}\n\tbody: {}\n\tresp: {}", url, method, body, s);
return s;
}