public class PayUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private static org.slf4j.Logger |
log |
private static PrivateKey |
PRIVATE_KEY |
| 限定符 | 构造器和说明 |
|---|---|
private |
PayUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
decryptOrder(String body)
解密订单信息
|
static org.apache.http.impl.client.CloseableHttpClient |
httpClient()
初始化 clientBuilder和证书管理器
|
static <T> T |
post(String url,
Object params,
Class<T> clazz)
微信post 请求
|
static PrivateKey |
privateKeyInstance() |
static boolean |
signVerify(javax.servlet.http.HttpServletRequest request,
String body)
验证签名
|
private static com.wechat.pay.contrib.apache.httpclient.auth.Verifier |
verifier(WechatValue wechat)
获取证书验证器
|
private static volatile PrivateKey PRIVATE_KEY
private static final org.slf4j.Logger log
public static PrivateKey privateKeyInstance()
public static org.apache.http.impl.client.CloseableHttpClient httpClient()
public static boolean signVerify(javax.servlet.http.HttpServletRequest request,
String body)
throws com.wechat.pay.contrib.apache.httpclient.exception.ValidationException,
com.wechat.pay.contrib.apache.httpclient.exception.ParseException
request - 序列号body - 请求体com.wechat.pay.contrib.apache.httpclient.exception.ValidationExceptioncom.wechat.pay.contrib.apache.httpclient.exception.ParseExceptionprivate static com.wechat.pay.contrib.apache.httpclient.auth.Verifier verifier(WechatValue wechat)
wechat - 请求参数public static <T> T post(String url, Object params, Class<T> clazz)
T - 返回类型url - 请求地址params - 参数clazz - 返回类型Copyright © 2024. All rights reserved.