Class GatewayRequest

java.lang.Object
org.apache.ofbiz.accounting.thirdparty.eway.GatewayRequest

public class GatewayRequest extends Object
A class representing a payment request. It holds the fields of the request, provides setters and getters to manipulate them. It also holds information about the type of the request: the request can be of Real-time, CVN, and Beagle type, or the combination of the latter two. You set the request type in the constructor of the object. Based on public domain sample code provided by eWay.com.au
  • Field Details

  • Constructor Details

    • GatewayRequest

      public GatewayRequest()
      Default constructor to be used with the Real-Time payment method. The same as calling GatewayRequest(0);
    • GatewayRequest

      public GatewayRequest(int method)
      Constructor to be used with the CVN and Beagle payment methods.
      Parameters:
      method - Logical combination of the REQUEST_METHOD_CVN and REQUEST_METHOD_BEAGLE constants.
  • Method Details

    • getRequestMethod

      public int getRequestMethod()
      Gets the request method given when constructing the object.
      Returns:
      the request method as a logical combination of the REQUEST_METHOD_CVN and REQUEST_METHOD_BEAGLE constants.
    • getUrl

      public String getUrl()
      Gets the URL for the configured request
    • getCustomerID

      public String getCustomerID()
      Gets customer id.
      Returns:
      the customer id
    • setCustomerID

      public void setCustomerID(String value)
      Sets customer id.
      Parameters:
      value - the value
    • getRefundPassword

      public String getRefundPassword()
      Gets refund password.
      Returns:
      the refund password
    • setRefundPassword

      public void setRefundPassword(String value)
      Sets refund password.
      Parameters:
      value - the value
    • getTotalAmount

      public BigDecimal getTotalAmount()
      Gets total amount.
      Returns:
      the total amount
    • setTotalAmount

      public void setTotalAmount(BigDecimal value)
      Sets total amount.
      Parameters:
      value - the value
    • getCardHoldersName

      public String getCardHoldersName()
      Gets card holders name.
      Returns:
      the card holders name
    • setCardHoldersName

      public void setCardHoldersName(String value)
      Sets card holders name.
      Parameters:
      value - the value
    • getCardNumber

      public String getCardNumber()
      Gets card number.
      Returns:
      the card number
    • setCardNumber

      public void setCardNumber(String value)
      Sets card number.
      Parameters:
      value - the value
    • getCardExpiryMonth

      public String getCardExpiryMonth()
      Gets card expiry month.
      Returns:
      the card expiry month
    • setCardExpiryMonth

      public void setCardExpiryMonth(String value)
      Sets card expiry month.
      Parameters:
      value - the value
    • getCardExpiryYear

      public String getCardExpiryYear()
      Gets card expiry year.
      Returns:
      the card expiry year
    • setCardExpiryYear

      public void setCardExpiryYear(String value)
      Sets card expiry year.
      Parameters:
      value - the value
    • getTrxnNumber

      public String getTrxnNumber()
      Gets trxn number.
      Returns:
      the trxn number
    • setTrxnNumber

      public void setTrxnNumber(String value)
      Sets trxn number.
      Parameters:
      value - the value
    • getCustomerFirstName

      public String getCustomerFirstName()
      Gets customer first name.
      Returns:
      the customer first name
    • setCustomerFirstName

      public void setCustomerFirstName(String value)
      Sets customer first name.
      Parameters:
      value - the value
    • getCustomerLastName

      public String getCustomerLastName()
      Gets customer last name.
      Returns:
      the customer last name
    • setCustomerLastName

      public void setCustomerLastName(String value)
      Sets customer last name.
      Parameters:
      value - the value
    • getCustomerEmailAddress

      public String getCustomerEmailAddress()
      Gets customer email address.
      Returns:
      the customer email address
    • setCustomerEmailAddress

      public void setCustomerEmailAddress(String value)
      Sets customer email address.
      Parameters:
      value - the value
    • getCustomerAddress

      public String getCustomerAddress()
      Gets customer address.
      Returns:
      the customer address
    • setCustomerAddress

      public void setCustomerAddress(String value)
      Sets customer address.
      Parameters:
      value - the value
    • getCustomerPostcode

      public String getCustomerPostcode()
      Gets customer postcode.
      Returns:
      the customer postcode
    • setCustomerPostcode

      public void setCustomerPostcode(String value)
      Sets customer postcode.
      Parameters:
      value - the value
    • getCustomerInvoiceRef

      public String getCustomerInvoiceRef()
      Gets customer invoice ref.
      Returns:
      the customer invoice ref
    • setCustomerInvoiceRef

      public void setCustomerInvoiceRef(String value)
      Sets customer invoice ref.
      Parameters:
      value - the value
    • getCustomerInvoiceDescription

      public String getCustomerInvoiceDescription()
      Gets customer invoice description.
      Returns:
      the customer invoice description
    • setCustomerInvoiceDescription

      public void setCustomerInvoiceDescription(String value)
      Sets customer invoice description.
      Parameters:
      value - the value
    • getCVN

      public String getCVN()
      Gets cvn.
      Returns:
      the cvn
    • setCVN

      public void setCVN(String value)
      Sets cvn.
      Parameters:
      value - the value
    • getOption1

      public String getOption1()
      Gets option 1.
      Returns:
      the option 1
    • setOption1

      public void setOption1(String value)
      Sets option 1.
      Parameters:
      value - the value
    • getOption2

      public String getOption2()
      Gets option 2.
      Returns:
      the option 2
    • setOption2

      public void setOption2(String value)
      Sets option 2.
      Parameters:
      value - the value
    • getOption3

      public String getOption3()
      Gets option 3.
      Returns:
      the option 3
    • setOption3

      public void setOption3(String value)
      Sets option 3.
      Parameters:
      value - the value
    • getCustomerIPAddress

      public String getCustomerIPAddress()
      Gets customer ip address.
      Returns:
      the customer ip address
    • setCustomerIPAddress

      public void setCustomerIPAddress(String value)
      Sets customer ip address.
      Parameters:
      value - the value
    • getCustomerBillingCountry

      public String getCustomerBillingCountry()
      Gets customer billing country.
      Returns:
      the customer billing country
    • setCustomerBillingCountry

      public void setCustomerBillingCountry(String value)
      Sets customer billing country.
      Parameters:
      value - the value
    • isTestMode

      public boolean isTestMode()
      Is test mode boolean.
      Returns:
      the boolean
    • setTestMode

      public void setTestMode(boolean b)
      Sets test mode.
      Parameters:
      b - the b
    • toXml

      public String toXml()
      Gives the xml representation of this object. This xml will be sent to the gateway. This method is public only for debugging purposes, you might wish to examine the xml content. The special fields of the CVN and Beagle requests are added only if the request belongs to the CVN or Beagle types, respectively.
      Returns:
      The GatewayRequest object as an xml string.