EntryThirdRespDto 为 null 的情况
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user