Class FirstDataProcessor

All Implemented Interfaces:
BusinessObject, BusinessProcessor, PaymentProcessor

public class FirstDataProcessor extends BasePaymentProcessor implements PaymentProcessor
Processes a payment in the store for a given user's cart. This implementation processes a request through the First Data Global Gateway.
Author:
David Tobey
See Also:
  • Field Details

    • log

      static org.apache.commons.logging.Log log
  • Constructor Details

    • FirstDataProcessor

      public FirstDataProcessor()
  • Method Details

    • process

      public Map process(Map parameters) throws 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:
      Exception
    • processTransaction

      public Map processTransaction(Map parameters) throws Exception
      Throws:
      Exception
    • initializeTransaction

      public lp.txn.JLinkPointTransaction initializeTransaction(Map parameters)
    • getOrderXML

      public String getOrderXML(Map parameters)
    • roundForMoney

      public Double roundForMoney(double value)
    • roundForMoney

      public Double roundForMoney(Double value)
    • escapeXML

      public String escapeXML(String text)
    • processResponse

      public Map processResponse(String responseData, Map parameters) throws Exception
      Throws:
      Exception
    • parseResponse

      public Map parseResponse(String responseData)
    • parseTag

      public String parseTag(String tag, String rsp)
    • processErrorResponse

      public Map processErrorResponse(Map parameters, Map responseMap) throws Exception
      Throws:
      Exception
    • processSuccessResponse

      public Map processSuccessResponse(Map parameters, Map responseMap) throws Exception
      Throws:
      Exception