mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🆕 #1789 微信支付电商收付通增加下载账单的接口
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
package com.github.binarywang.wxpay.v3.auth;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.github.binarywang.wxpay.v3.Validator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
public class WxPayValidator implements Validator {
|
||||
private Verifier verifier;
|
||||
@@ -20,6 +21,9 @@ public class WxPayValidator implements Validator {
|
||||
|
||||
@Override
|
||||
public final boolean validate(CloseableHttpResponse response) throws IOException {
|
||||
if (!ContentType.APPLICATION_JSON.getMimeType().equals(ContentType.parse(String.valueOf(response.getFirstHeader("Content-Type").getValue())).getMimeType())) {
|
||||
return true;
|
||||
}
|
||||
Header serialNo = response.getFirstHeader("Wechatpay-Serial");
|
||||
Header sign = response.getFirstHeader("Wechatpay-Signature");
|
||||
Header timestamp = response.getFirstHeader("Wechatpay-TimeStamp");
|
||||
|
||||
Reference in New Issue
Block a user