|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mikeblanton.paypal.util.PayPalAPIUtil
The PayPalAPIUtil class provides helper functions for PayPal API calls.
Constructor Summary | |
PayPalAPIUtil()
|
Method Summary | |
protected int |
getApiTimeout()
Retrieves the Timeout based on the given criteria in the given order: Configuration File Parameter api.timeout .
System Property paypaltools.api.timeout .
|
protected java.net.URL |
getApiUrl()
Retrieves the Endpoint URL based on the given criteria in the given order: Configuration File Parameter api.url .
System Property paypaltools.api.url .
|
PayPalAPIInterface |
getPayPalInterface()
Retrieves the PayPal API Interface class using the default endpoint URL and default timeout. |
PayPalAPIInterface |
getPayPalInterface(int _timeout)
Retrieves the PayPal API Interface class using the default endpoint URL and specified timeout. |
PayPalAPIInterface |
getPayPalInterface(java.net.URL _url)
Retrieves the PayPal API Interface class using the specified URL and the default timeout. |
PayPalAPIInterface |
getPayPalInterface(java.net.URL _url,
int _timeout)
Retrieves the PayPal API Interface class using the specified endpoint URL and the specified timeout. |
GetTransactionDetailsResponseType |
getTransactionDetails(GetTransactionDetailsRequestType _request)
Performs a PayPal GetTransactionDetails API call using the passed GetTransactionDetailsRequestType instance. |
GetTransactionDetailsResponseType |
getTransactionDetails(java.lang.String _txnId)
Performs a PayPal GetTransactionDetails API call using the passed Transaction ID. |
GetTransactionDetailsResponseType |
getTransactionDetails(TransactionId _txnId)
Performs a PayPal GetTransactionDetails API call using the passed TransactionId instance. |
void |
processResponse(AbstractResponseType _response)
Processes the AbstractResponseType instance, logging all errors and warnings as appropriate. |
RefundTransactionResponseType |
refundTransaction(RefundTransactionRequestType _request)
Performs a PayPal Refund via API using the passed RefundTransactionRequest instance. |
RefundTransactionResponseType |
refundTransaction(java.lang.String _txnId,
java.lang.String _amount,
java.lang.String _currency,
java.lang.String _memo,
java.lang.String _type)
Performs a PayPal Refund via API using the passed data. |
RefundTransactionResponseType |
refundTransaction(TransactionId _txnId,
BasicAmountType _amount,
java.lang.String _memo,
RefundPurposeTypeCodeType _type)
Performs a PayPal Refund via API using the passed data. |
TransactionSearchResponseType |
transactionSearch(BasicAmountType _amount,
java.lang.String _auctionItemNumber,
CurrencyCodeType _currencyCode,
java.util.Calendar _endDate,
java.lang.String _invoiceId,
EmailAddressType _emailAddress,
PersonNameType _payerName,
java.lang.String _receiptId,
EmailAddressType _receiver,
java.util.Calendar _startDate,
PaymentTransactionStatusCodeType _status,
PaymentTransactionClassCodeType _transactionClass,
TransactionId _txnId)
Performs a PayPal TransactionSearch API call using the specified criteria. |
TransactionSearchResponseType |
transactionSearch(TransactionSearchRequestType _request)
Performs a PayPal TransactionSearch API call using the criteria specified in the passed TransactionSearchRequestType instance. |
void |
validateRequest(AbstractRequestType _request)
Validates the passed AbstractRequestType, ensuring it has the required fields set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PayPalAPIUtil()
Method Detail |
public PayPalAPIInterface getPayPalInterface() throws javax.xml.rpc.ServiceException
javax.xml.rpc.ServiceException
- public PayPalAPIInterface getPayPalInterface(java.net.URL _url) throws javax.xml.rpc.ServiceException
_url
- javax.xml.rpc.ServiceException
- public PayPalAPIInterface getPayPalInterface(int _timeout) throws javax.xml.rpc.ServiceException
_timeout
- javax.xml.rpc.ServiceException
- public PayPalAPIInterface getPayPalInterface(java.net.URL _url, int _timeout) throws javax.xml.rpc.ServiceException
_url
- _timeout
- javax.xml.rpc.ServiceException
- protected java.net.URL getApiUrl()
api.url
.paypaltools.api.url
.protected int getApiTimeout()
api.timeout
.paypaltools.api.timeout
.public void validateRequest(AbstractRequestType _request)
_request
- public void processResponse(AbstractResponseType _response)
_response
- public RefundTransactionResponseType refundTransaction(RefundTransactionRequestType _request) throws java.rmi.RemoteException, javax.xml.rpc.ServiceException
_request
- java.rmi.RemoteException
- javax.xml.rpc.ServiceException
- RefundTransactionResponseType
,
RefundTransactionRequestType
public RefundTransactionResponseType refundTransaction(TransactionId _txnId, BasicAmountType _amount, java.lang.String _memo, RefundPurposeTypeCodeType _type) throws java.rmi.RemoteException, javax.xml.rpc.ServiceException
_txnId
- _amount
- _memo
- _type
- java.rmi.RemoteException
- javax.xml.rpc.ServiceException
- public RefundTransactionResponseType refundTransaction(java.lang.String _txnId, java.lang.String _amount, java.lang.String _currency, java.lang.String _memo, java.lang.String _type) throws java.rmi.RemoteException, javax.xml.rpc.ServiceException
_txnId
- _amount
- _currency
- _memo
- _type
- java.rmi.RemoteException
- javax.xml.rpc.ServiceException
- public GetTransactionDetailsResponseType getTransactionDetails(GetTransactionDetailsRequestType _request) throws java.rmi.RemoteException, javax.xml.rpc.ServiceException
_request
- java.rmi.RemoteException
- javax.xml.rpc.ServiceException
- public GetTransactionDetailsResponseType getTransactionDetails(TransactionId _txnId) throws java.rmi.RemoteException, javax.xml.rpc.ServiceException
_txnId
- java.rmi.RemoteException
- javax.xml.rpc.ServiceException
- public GetTransactionDetailsResponseType getTransactionDetails(java.lang.String _txnId) throws java.rmi.RemoteException, javax.xml.rpc.ServiceException
_txnId
- java.rmi.RemoteException
- javax.xml.rpc.ServiceException
- public TransactionSearchResponseType transactionSearch(TransactionSearchRequestType _request) throws java.rmi.RemoteException, javax.xml.rpc.ServiceException
_request
- java.rmi.RemoteException
- javax.xml.rpc.ServiceException
- public TransactionSearchResponseType transactionSearch(BasicAmountType _amount, java.lang.String _auctionItemNumber, CurrencyCodeType _currencyCode, java.util.Calendar _endDate, java.lang.String _invoiceId, EmailAddressType _emailAddress, PersonNameType _payerName, java.lang.String _receiptId, EmailAddressType _receiver, java.util.Calendar _startDate, PaymentTransactionStatusCodeType _status, PaymentTransactionClassCodeType _transactionClass, TransactionId _txnId) throws java.rmi.RemoteException, javax.xml.rpc.ServiceException
_amount
- _auctionItemNumber
- _currencyCode
- _endDate
- _invoiceId
- _emailAddress
- _payerName
- _receiptId
- _receiver
- _startDate
- _status
- _transactionClass
- _txnId
- java.rmi.RemoteException
- javax.xml.rpc.ServiceException
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |