Package cz.gopay.api.v3
Class AbstractGPConnector
- java.lang.Object
-
- cz.gopay.api.v3.AbstractGPConnector
-
- All Implemented Interfaces:
IGPConnector
public abstract class AbstractGPConnector extends Object implements IGPConnector
- Author:
- Zbynek Novak novak.zbynek@gmail.com, FrantiĊĦek Sichinger
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessTokenaccessTokenprotected StringapiUrlstatic intCONNECTION_POOL_SIZEstatic intCONNECTION_SERVICE_TOstatic intCONNECTION_SETUP_TOprotected static org.apache.log4j.Loggerloggerstatic StringVERSION
-
Constructor Summary
Constructors Constructor Description AbstractGPConnector(String apiUrl)AbstractGPConnector(String apiUrl, AccessToken token)
-
Method Summary
-
-
-
Field Detail
-
VERSION
public static final String VERSION
- See Also:
- Constant Field Values
-
logger
protected static final org.apache.log4j.Logger logger
-
CONNECTION_POOL_SIZE
public static int CONNECTION_POOL_SIZE
-
CONNECTION_SETUP_TO
public static int CONNECTION_SETUP_TO
-
CONNECTION_SERVICE_TO
public static int CONNECTION_SERVICE_TO
-
apiUrl
protected String apiUrl
-
accessToken
protected AccessToken accessToken
-
-
Constructor Detail
-
AbstractGPConnector
public AbstractGPConnector(String apiUrl)
-
AbstractGPConnector
public AbstractGPConnector(String apiUrl, AccessToken token)
-
-
Method Detail
-
createRESTClientProxy
protected abstract <T> T createRESTClientProxy(String apiUrl, Class<T> proxy)
-
getAppToken
public IGPConnector getAppToken(String clientId, String clientCredentials) throws GPClientException
- Specified by:
getAppTokenin interfaceIGPConnector- Throws:
GPClientException
-
getAppToken
public IGPConnector getAppToken(String clientId, String clientCredentials, String scope) throws GPClientException
- Specified by:
getAppTokenin interfaceIGPConnector- Throws:
GPClientException
-
createPayment
public Payment createPayment(BasePayment payment) throws GPClientException
- Specified by:
createPaymentin interfaceIGPConnector- Throws:
GPClientException
-
refundPayment
public PaymentResult refundPayment(Long id, Long amount) throws GPClientException
- Specified by:
refundPaymentin interfaceIGPConnector- Throws:
GPClientException
-
refundPayment
public PaymentResult refundPayment(Long id, RefundPayment refundPayment) throws GPClientException
- Specified by:
refundPaymentin interfaceIGPConnector- Throws:
GPClientException
-
createRecurrentPayment
public Payment createRecurrentPayment(Long id, NextPayment nextPayment) throws GPClientException
- Specified by:
createRecurrentPaymentin interfaceIGPConnector- Throws:
GPClientException
-
voidRecurrency
public PaymentResult voidRecurrency(Long id) throws GPClientException
- Specified by:
voidRecurrencyin interfaceIGPConnector- Throws:
GPClientException
-
capturePayment
public PaymentResult capturePayment(Long id) throws GPClientException
- Specified by:
capturePaymentin interfaceIGPConnector- Throws:
GPClientException
-
capturePayment
public PaymentResult capturePayment(Long id, CapturePayment capturePayment) throws GPClientException
- Specified by:
capturePaymentin interfaceIGPConnector- Throws:
GPClientException
-
voidAuthorization
public PaymentResult voidAuthorization(Long id) throws GPClientException
- Specified by:
voidAuthorizationin interfaceIGPConnector- Throws:
GPClientException
-
paymentStatus
public Payment paymentStatus(Long id) throws GPClientException
- Specified by:
paymentStatusin interfaceIGPConnector- Throws:
GPClientException
-
generatePaymentInstruments
public PaymentInstrumentRoot generatePaymentInstruments(Long goId, Currency currency) throws GPClientException
- Specified by:
generatePaymentInstrumentsin interfaceIGPConnector- Throws:
GPClientException
-
generateStatement
public byte[] generateStatement(AccountStatement accountStatement) throws GPClientException
- Specified by:
generateStatementin interfaceIGPConnector- Throws:
GPClientException
-
findEETREceiptsByFilter
public List<EETReceipt> findEETREceiptsByFilter(EETReceiptFilter filter) throws GPClientException
- Specified by:
findEETREceiptsByFilterin interfaceIGPConnector- Throws:
GPClientException
-
getEETReceiptByPaymentId
public List<EETReceipt> getEETReceiptByPaymentId(Long id) throws GPClientException
- Specified by:
getEETReceiptByPaymentIdin interfaceIGPConnector- Throws:
GPClientException
-
getApiUrl
public String getApiUrl()
- Specified by:
getApiUrlin interfaceIGPConnector
-
getAccessToken
public AccessToken getAccessToken()
- Specified by:
getAccessTokenin interfaceIGPConnector
-
setAccessToken
public void setAccessToken(AccessToken accessToken)
- Specified by:
setAccessTokenin interfaceIGPConnector
-
getImplementationName
protected abstract String getImplementationName()
-
getVersion
public String getVersion()
-
-