com.softslate.commerce.businessobjects.payment
Class PayPalExpressProcessor
java.lang.Object
com.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
com.softslate.commerce.businessobjects.payment.BasePaymentProcessor
com.softslate.commerce.businessobjects.payment.PayPalExpressProcessor
- All Implemented Interfaces:
- BusinessObject, BusinessProcessor, IPayPalExpressPaymentProcessor, PaymentProcessor
- Direct Known Subclasses:
- PayPalDirectProcessor
public class PayPalExpressProcessor
- extends BasePaymentProcessor
- implements IPayPalExpressPaymentProcessor
Processes a payment in the store for a given user's cart through PayPal
Express Checkout. The three API calls required by PayPal Express integration
are handled in the processSetExpressCheckout(java.util.Map)
,
processGetExpressCheckoutDetails(java.util.Map)
, and
processDoExpressCheckoutPayment(java.util.Map)
methods.
- Author:
- David Tobey
Field Summary |
(package private) static org.apache.commons.logging.Log |
log
|
Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor |
formatDateTime, formatPrice, getAppComponents, getAppSettings, getAttributeIDs, getBusinessObjectFactory, getDaoFactory, getProductIDs, getSettings, getUser, initialize, loadMatchingSkus, parseDateTime, parseResponseData, prepareRequestData, sendHTTPPost, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setSettings, setUser, utils |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
static org.apache.commons.logging.Log log
PayPalExpressProcessor
public PayPalExpressProcessor()
createPaypalProfile
public com.paypal.sdk.profiles.APIProfile createPaypalProfile()
throws java.lang.Exception
- Throws:
java.lang.Exception
processSetExpressCheckout
public java.util.Map processSetExpressCheckout(java.util.Map parameters)
throws java.lang.Exception
- Specified by:
processSetExpressCheckout
in interface IPayPalExpressPaymentProcessor
- Throws:
java.lang.Exception
prepareResponseFromSetExpressCheckoutResponseType
protected java.util.Map prepareResponseFromSetExpressCheckoutResponseType(com.paypal.soap.api.AbstractResponseType ppresponse)
processGetExpressCheckoutDetails
public java.util.Map processGetExpressCheckoutDetails(java.util.Map parameters)
throws java.lang.Exception
- Specified by:
processGetExpressCheckoutDetails
in interface IPayPalExpressPaymentProcessor
- Throws:
java.lang.Exception
processDoExpressCheckoutPayment
public java.util.Map processDoExpressCheckoutPayment(java.util.Map parameters)
throws java.lang.Exception
- Specified by:
processDoExpressCheckoutPayment
in interface IPayPalExpressPaymentProcessor
- Throws:
java.lang.Exception
process
public java.util.Map process(java.util.Map parameters)
throws java.lang.Exception
- Description copied from class:
BasePaymentProcessor
- Subclasses must override this method to execute processing. Called by
BasePaymentProcessor.processPayment(Map)
.
- Specified by:
process
in class BasePaymentProcessor
- Parameters:
parameters
- A Map
containing the values of the user's
submitted payment information.
- Returns:
- A
Map
containing a least one key named
"resultCode", which contains a String parsable into an int,
representing the results of the processing. 0 for the resultCode
indicates success. Optionally, the Map
may include
additional keys, such as "resultMessage", a string describing the
results of the processing.
- Throws:
java.lang.Exception
processSuccessfulTransaction
public void processSuccessfulTransaction(java.util.Map parameters)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright ? SoftSlate, LLC 2003?2005