Class GatewayRequest

  • public class GatewayRequest
    extends java.lang.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
    • Field Detail


        public static final java.lang.String REQUEST_URL_REFUND_TEST
        See Also:
        Constant Field Values

        public static final java.lang.String REQUEST_URL_REFUND
        See Also:
        Constant Field Values

        public static final java.lang.String REQUEST_URL_BEAGLE_TEST
        See Also:
        Constant Field Values

        public static final java.lang.String REQUEST_URL_BEAGLE
        See Also:
        Constant Field Values

        public static final java.lang.String REQUEST_URL_CVN_TEST
        See Also:
        Constant Field Values

        public static final java.lang.String REQUEST_URL_RT_TEST
        See Also:
        Constant Field Values

        public static final int REQUEST_METHOD_CVN
        Constant value to be used with the CVN payment method
        See Also:
        Constant Field Values

        public static final int REQUEST_METHOD_BEAGLE
        Constant value to be used with the Beagle (GeoIP) payment method
        See Also:
        Constant Field Values

        public static final int REQUEST_METHOD_REFUND
        Constant value to be used with the Refund method
        See Also:
        Constant Field Values
    • Constructor Detail

      • 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.
        method - Logical combination of the REQUEST_METHOD_CVN and REQUEST_METHOD_BEAGLE constants.
    • Method Detail

      • getRequestMethod

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

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

        public java.lang.String getCustomerID()
      • setCustomerID

        public void setCustomerID​(java.lang.String value)
      • getRefundPassword

        public java.lang.String getRefundPassword()
      • setRefundPassword

        public void setRefundPassword​(java.lang.String value)
      • getTotalAmount

        public java.math.BigDecimal getTotalAmount()
      • setTotalAmount

        public void setTotalAmount​(java.math.BigDecimal value)
      • getCardHoldersName

        public java.lang.String getCardHoldersName()
      • setCardHoldersName

        public void setCardHoldersName​(java.lang.String value)
      • getCardNumber

        public java.lang.String getCardNumber()
      • setCardNumber

        public void setCardNumber​(java.lang.String value)
      • getCardExpiryMonth

        public java.lang.String getCardExpiryMonth()
      • setCardExpiryMonth

        public void setCardExpiryMonth​(java.lang.String value)
      • getCardExpiryYear

        public java.lang.String getCardExpiryYear()
      • setCardExpiryYear

        public void setCardExpiryYear​(java.lang.String value)
      • getTrxnNumber

        public java.lang.String getTrxnNumber()
      • setTrxnNumber

        public void setTrxnNumber​(java.lang.String value)
      • getCustomerFirstName

        public java.lang.String getCustomerFirstName()
      • setCustomerFirstName

        public void setCustomerFirstName​(java.lang.String value)
      • getCustomerLastName

        public java.lang.String getCustomerLastName()
      • setCustomerLastName

        public void setCustomerLastName​(java.lang.String value)
      • getCustomerEmailAddress

        public java.lang.String getCustomerEmailAddress()
      • setCustomerEmailAddress

        public void setCustomerEmailAddress​(java.lang.String value)
      • getCustomerAddress

        public java.lang.String getCustomerAddress()
      • setCustomerAddress

        public void setCustomerAddress​(java.lang.String value)
      • getCustomerPostcode

        public java.lang.String getCustomerPostcode()
      • setCustomerPostcode

        public void setCustomerPostcode​(java.lang.String value)
      • getCustomerInvoiceRef

        public java.lang.String getCustomerInvoiceRef()
      • setCustomerInvoiceRef

        public void setCustomerInvoiceRef​(java.lang.String value)
      • getCustomerInvoiceDescription

        public java.lang.String getCustomerInvoiceDescription()
      • setCustomerInvoiceDescription

        public void setCustomerInvoiceDescription​(java.lang.String value)
      • getCVN

        public java.lang.String getCVN()
      • setCVN

        public void setCVN​(java.lang.String value)
      • getOption1

        public java.lang.String getOption1()
      • setOption1

        public void setOption1​(java.lang.String value)
      • getOption2

        public java.lang.String getOption2()
      • setOption2

        public void setOption2​(java.lang.String value)
      • getOption3

        public java.lang.String getOption3()
      • setOption3

        public void setOption3​(java.lang.String value)
      • getCustomerIPAddress

        public java.lang.String getCustomerIPAddress()
      • setCustomerIPAddress

        public void setCustomerIPAddress​(java.lang.String value)
      • getCustomerBillingCountry

        public java.lang.String getCustomerBillingCountry()
      • setCustomerBillingCountry

        public void setCustomerBillingCountry​(java.lang.String value)
      • isTestMode

        public boolean isTestMode()
      • setTestMode

        public void setTestMode​(boolean b)
      • toXml

        public java.lang.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.
        The GatewayRequest object as an xml string.