...
|
...
|
@@ -243,7 +243,13 @@ public abstract class AlipayServiceAbstract extends AbstractPayService { |
|
|
|
|
|
private String sendMApiRequestWithException(String orderCode, Map<String, String> paramMap) throws Exception {
|
|
|
logger.info("[{}] send openapi request: {}", orderCode, paramMap);
|
|
|
String response = httpClient.postFormData(AlipayConfig.MAPI_URL, paramMap);
|
|
|
StringBuilder paramStr = new StringBuilder();
|
|
|
for(Map.Entry<String, String> entry : paramMap.entrySet()) {
|
|
|
paramStr.append("&").append(entry.getKey()).append("=").append(URLEncoder.encode(entry.getValue(),AlipayConfig.input_charset));
|
|
|
}
|
|
|
String url = AlipayConfig.MAPI_URL +"?"+paramStr.substring(1);
|
|
|
logger.info("[{}] send openapi requestUrl is: {}", orderCode, url);
|
|
|
String response = httpClient.get(url);
|
|
|
logger.info("[{}] trade openapi resp: {}", orderCode, response);
|
|
|
return response;
|
|
|
}
|
...
|
...
|
|