Class GatewayTransactionResponse

  • All Implemented Interfaces:
    Serializable

    public class GatewayTransactionResponse
    extends Object
    implements Serializable
    A DTO that contains information needed to save transaction data from a payment gateway.
    Author:
    mariestandeven
    See Also:
    Serialized Form
    • Constructor Detail

      • GatewayTransactionResponse

        public GatewayTransactionResponse()
    • Method Detail

      • customer

        public GatewayCustomer<GatewayTransactionResponse> customer()
        You should only call this once, as it will create a new customer if called more than once. Use the getter if you need to append more information later.
      • billTo

        public Address<GatewayTransactionResponse> billTo()
        You should only call this once, as it will create a new customer if called more than once. Use the getter if you need to append more information later.
      • shipTo

        public Address<GatewayTransactionResponse> shipTo()
        You should only call this once, as it will create a new customer if called more than once. Use the getter if you need to append more information later.
      • getCurrency

        @Nullable
        public javax.money.CurrencyUnit getCurrency()
        The currency gathered from the getAmount()
        Returns:
        The currency gathered from the transaction response's amount
      • getTransactionType

        public TransactionType getTransactionType()
        The TransactionType that this transaction is associated with
        Returns:
        the TransactionType that this transaction is associated with
      • getTransactionReferenceId

        public String getTransactionReferenceId()
        The transaction reference that is passed to the payment gateway. This reference can be used to link the request to the gateway's record of the transaction in the case that the calling application does not receive a response from the gateway.
        Returns:
        The transaction reference that is passed to the payment gateway.
      • getPaymentId

        public String getPaymentId()
        The Payment ID that this transaction is associated with
        Returns:
        the Payment ID that this transaction is associated with
      • getPaymentType

        public String getPaymentType()
        The PaymentType that this transaction is associated with
        Returns:
        the payment type that this transaction is associated with
      • getPaymentOwnerType

        public String getPaymentOwnerType()
        The type of the owning entity that this transaction is associated with
        Returns:
        the owner type that this transaction is associated with
      • getPaymentOwnerId

        public String getPaymentOwnerId()
        The ID of the owning entity that this transaction is associated with
        Returns:
        the owner ID that this transaction is associated with
      • getAmount

        public javax.money.MonetaryAmount getAmount()
        The transaction amount that was processed by the gateway
        Returns:
        the transaction amount
      • getApplicationId

        public String getApplicationId()
        The application id
      • getTenantId

        public String getTenantId()
        The tenant id
      • getCustomer

        public GatewayCustomer<GatewayTransactionResponse> getCustomer()
        Any customer information that relates to this transaction
        Returns:
        any customer information that relates to this transaction
      • getShipTo

        public Address<GatewayTransactionResponse> getShipTo()
        If shipping information is captured on the gateway, the shipping address associated with this transaction will be put here
        Returns:
        the customer's shipping address
      • getRawTransactionResults

        public Map<String,​Object> getRawTransactionResults()
        The raw transaction response from the gateway; contains additional properties from the gateway to be processed and saved to the payment.
        Returns:
        the raw transaction response from the gateway
      • setTransactionType

        public void setTransactionType​(TransactionType transactionType)
        The TransactionType that this transaction is associated with
      • setTransactionReferenceId

        public void setTransactionReferenceId​(String transactionReferenceId)
        The transaction reference that is passed to the payment gateway. This reference can be used to link the request to the gateway's record of the transaction in the case that the calling application does not receive a response from the gateway.
        Parameters:
        transactionReferenceId - The transaction reference that is passed to the payment gateway.
      • setPaymentId

        public void setPaymentId​(String paymentId)
        The Payment ID that this transaction is associated with
      • setPaymentType

        public void setPaymentType​(String paymentType)
        The PaymentType that this transaction is associated with
      • setPaymentOwnerType

        public void setPaymentOwnerType​(String paymentOwnerType)
        The type of the owning entity that this transaction is associated with
      • setPaymentOwnerId

        public void setPaymentOwnerId​(String paymentOwnerId)
        The ID of the owning entity that this transaction is associated with
      • setAmount

        public void setAmount​(javax.money.MonetaryAmount amount)
        The transaction amount that was processed by the gateway
      • setApplicationId

        public void setApplicationId​(String applicationId)
        The application id
      • setTenantId

        public void setTenantId​(String tenantId)
        The tenant id
      • setShipTo

        public void setShipTo​(Address<GatewayTransactionResponse> shipTo)
        If shipping information is captured on the gateway, the shipping address associated with this transaction will be put here
      • setRawTransactionResults

        public void setRawTransactionResults​(Map<String,​Object> rawTransactionResults)
        The raw transaction response from the gateway; contains additional properties from the gateway to be processed and saved to the payment.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object