public final class WechatPaySigner extends Object
| Modifier and Type | Field and Description |
|---|---|
private static AlternativeJdkIdGenerator |
ID_GENERATOR |
private static String |
TOKEN_PATTERN |
| Modifier | Constructor and Description |
|---|---|
private |
WechatPaySigner() |
| Modifier and Type | Method and Description |
|---|---|
private static String |
buildSignMessage(String... components)
请求时设置签名 组件
|
static String |
sign(AppMerchant appMerchant,
String... orderedComponents)
Sign string.
|
static String |
sign(AppMerchant appMerchant,
URI uri,
String httpMethod,
String body)
Sign string.
|
static boolean |
verify(okhttp3.Headers responseHeaders,
String body,
TenpayKey tenpayKey)
Verify boolean.
|
private static final String TOKEN_PATTERN
private static final AlternativeJdkIdGenerator ID_GENERATOR
public static String sign(AppMerchant appMerchant, URI uri, String httpMethod, String body)
appMerchant - the app merchanturi - the urihttpMethod - the http methodbody - the bodypublic static String sign(AppMerchant appMerchant, String... orderedComponents)
appMerchant - the app merchantorderedComponents - the ordered componentspublic static boolean verify(okhttp3.Headers responseHeaders,
String body,
TenpayKey tenpayKey)
responseHeaders - the response headersbody - the bodytenpayKey - the tenpay keyCopyright © 2023. All rights reserved.