public class WxPayCredentials extends Object implements Credentials
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
merchantId |
protected Signer |
signer |
protected String |
signUriStripPrefix
签名前从 URI Path 中移除的前缀(用于带路径前缀的反向代理场景)
例如配置为 "/api-weixin" 时,"/api-weixin/v3/pay/..."
|
| 构造器和说明 |
|---|
WxPayCredentials(String merchantId,
Signer signer) |
WxPayCredentials(String merchantId,
Signer signer,
String signUriStripPrefix) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
buildMessage(String nonce,
long timestamp,
org.apache.http.client.methods.HttpRequestWrapper request) |
protected String |
generateNonceStr() |
protected long |
generateTimestamp() |
String |
getMerchantId() |
String |
getSchema() |
String |
getToken(org.apache.http.client.methods.HttpRequestWrapper request) |
void |
setSignUriStripPrefix(String signUriStripPrefix) |
protected String merchantId
protected Signer signer
protected String signUriStripPrefix
public String getMerchantId()
public void setSignUriStripPrefix(String signUriStripPrefix)
protected long generateTimestamp()
protected String generateNonceStr()
public final String getSchema()
getSchema 在接口中 Credentialspublic final String getToken(org.apache.http.client.methods.HttpRequestWrapper request) throws IOException
getToken 在接口中 CredentialsIOExceptionprotected final String buildMessage(String nonce, long timestamp, org.apache.http.client.methods.HttpRequestWrapper request) throws IOException
IOExceptionCopyright © 2026. All rights reserved.