public abstract class AbstractAlipayClient extends Object implements AlipayClient
Constructor and Description |
---|
AbstractAlipayClient(String serverUrl,
String appId,
String format,
String charset,
String signType)
Instantiates a new Abstract alipay client.
|
AbstractAlipayClient(String serverUrl,
String appId,
String format,
String charset,
String signType,
String encryptType)
Instantiates a new Abstract alipay client.
|
AbstractAlipayClient(String serverUrl,
String appId,
String format,
String charset,
String signType,
String proxyHost,
int proxyPort)
Instantiates a new Abstract alipay client.
|
Modifier and Type | Method and Description |
---|---|
<T extends AlipayResponse> |
execute(AlipayRequest<T> request)
Execute t.
|
<T extends AlipayResponse> |
execute(AlipayRequest<T> request,
String accessToken)
Execute t.
|
<T extends AlipayResponse> |
execute(AlipayRequest<T> request,
String accessToken,
String appAuthToken)
Execute t.
|
abstract Decryptor |
getDecryptor()
Gets decryptor.
|
abstract Encryptor |
getEncryptor()
Gets encryptor.
|
abstract SignChecker |
getSignChecker()
Gets sign checker.
|
abstract Signer |
getSigner()
Gets signer.
|
<T extends AlipayResponse> |
pageExecute(AlipayRequest<T> request)
Page execute t.
|
<T extends AlipayResponse> |
pageExecute(AlipayRequest<T> request,
String httpMethod)
Page execute t.
|
<TR extends AlipayResponse,T extends AlipayRequest<TR>> |
parseAppSyncResult(Map<String,String> result,
Class<T> requsetClazz)
移动客户端同步结果返回解析的参考工具方法
|
<T extends AlipayResponse> |
sdkExecute(AlipayRequest<T> request)
SDK客户端调用生成sdk字符串
|
public AbstractAlipayClient(String serverUrl, String appId, String format, String charset, String signType)
serverUrl
- the server urlappId
- the app idformat
- the formatcharset
- the charsetsignType
- the sign typepublic AbstractAlipayClient(String serverUrl, String appId, String format, String charset, String signType, String proxyHost, int proxyPort)
serverUrl
- the server urlappId
- the app idformat
- the formatcharset
- the charsetsignType
- the sign typeproxyHost
- the proxy hostproxyPort
- the proxy portpublic AbstractAlipayClient(String serverUrl, String appId, String format, String charset, String signType, String encryptType)
serverUrl
- the server urlappId
- the app idformat
- the formatcharset
- the charsetsignType
- the sign typeencryptType
- the encrypt typepublic <T extends AlipayResponse> T execute(AlipayRequest<T> request) throws AlipayApiException
AlipayClient
execute
in interface AlipayClient
T
- the type parameterrequest
- the requestAlipayApiException
- the alipay api exceptionpublic <T extends AlipayResponse> T execute(AlipayRequest<T> request, String accessToken) throws AlipayApiException
AlipayClient
execute
in interface AlipayClient
T
- the type parameterrequest
- the requestaccessToken
- the auth tokenAlipayApiException
- the alipay api exceptionpublic <T extends AlipayResponse> T execute(AlipayRequest<T> request, String accessToken, String appAuthToken) throws AlipayApiException
AlipayClient
execute
in interface AlipayClient
T
- the type parameterrequest
- the requestaccessToken
- the access tokenappAuthToken
- the app auth tokenAlipayApiException
- the alipay api exceptionpublic <T extends AlipayResponse> T pageExecute(AlipayRequest<T> request) throws AlipayApiException
AlipayClient
pageExecute
in interface AlipayClient
T
- the type parameterrequest
- the requestAlipayApiException
- the alipay api exceptionpublic <T extends AlipayResponse> T pageExecute(AlipayRequest<T> request, String httpMethod) throws AlipayApiException
AlipayClient
pageExecute
in interface AlipayClient
T
- the type parameterrequest
- the requesthttpMethod
- the methodAlipayApiException
- the alipay api exceptionpublic <T extends AlipayResponse> T sdkExecute(AlipayRequest<T> request) throws AlipayApiException
AlipayClient
sdkExecute
in interface AlipayClient
T
- the type parameterrequest
- the requestAlipayApiException
- the alipay api exceptionpublic <TR extends AlipayResponse,T extends AlipayRequest<TR>> TR parseAppSyncResult(Map<String,String> result, Class<T> requsetClazz) throws AlipayApiException
AlipayClient
parseAppSyncResult
in interface AlipayClient
TR
- the type parameterT
- the type parameterresult
- 移动客户端SDK同步返回的结果map,一般包含resultStatus,result和memo三个keyrequsetClazz
- 接口请求request类,如App支付传入 AlipayTradeAppPayRequest.classAlipayApiException
- the alipay api exceptionpublic abstract Signer getSigner()
public abstract SignChecker getSignChecker()
public abstract Encryptor getEncryptor()
public abstract Decryptor getDecryptor()
Copyright © 2018. All rights reserved.