Class ExternalPaymentTransactionCallbackDTO

java.lang.Object
com.broadleafcommerce.cartoperation.domain.payment.ExternalPaymentTransactionCallbackDTO
All Implemented Interfaces:
Serializable

public class ExternalPaymentTransactionCallbackDTO extends Object implements Serializable
Object used to manage data throughout the processing of a callback from an external payment interaction. For example, the customer could have just completed 3DS verification which led to a redirect from the payment gateway's page to our CartOps app. This object helps to communicate the information obtained from this redirect to CartOps, determine the current state of the cart's payments, & communicate the result to the frontend app via a redirect from CartOps to the frontend app.
Author:
mariestandeven
See Also:
  • Constructor Details

    • ExternalPaymentTransactionCallbackDTO

      public ExternalPaymentTransactionCallbackDTO()
  • Method Details

    • getCartId

      public String getCartId()
    • getRequestParam

      public String getRequestParam(String paramName)
    • isValidRequest

      public boolean isValidRequest()
      Declares whether the request has been deemed valid.
    • getCart

      public com.broadleafcommerce.cart.client.domain.Cart getCart()
      The resolved cart related to the payment transactions
    • getCartPayments

      public List<PaymentSummary> getCartPayments()
      The cart's collection of PaymentSummaries
    • getGatewayType

      public String getGatewayType()
      The gateway type of this payment.
    • getRequestBody

      public Map<String,Object> getRequestBody()
      The request body of the payment gateway redirect, if any.
    • getRequestParams

      public Map<String,String> getRequestParams()
      The request params of the payment gateway redirect. Should contain the parameters that were passed on the callback URL and any that the gateway would add.
    • getPaymentResult

      public String getPaymentResult()
      The result of the payment interaction that was completed, causing the redirect to CartOps. Defaults to DefaultExternalPaymentInteractionResult.UNKNOWN.
      See Also:
    • getPaymentFinalizationStatus

      public String getPaymentFinalizationStatus()
      The state of the cart's payments following the external payment interaction. This can communicate that all payments are finalized, a transaction failed requiring another form of payment, or that external interaction (e.g. 3DS verification or HPP interaction) is required for another one of the cart's payments. Defaults to DefaultPaymentFinalizationStatus.UNKNOWN.
      See Also:
    • getRedirectAttributes

      public Map<String,Object> getRedirectAttributes()
      Attributes to be returned with the redirect from CartOps to the frontend
    • getAdditionalAttributes

      public Map<String,Object> getAdditionalAttributes()
      Miscellaneous attributes that can be used throughout the processing of a callback.
    • setValidRequest

      public void setValidRequest(boolean validRequest)
      Declares whether the request has been deemed valid.
    • setCartId

      public void setCartId(String cartId)
      The ID of the cart.
    • setCart

      public void setCart(com.broadleafcommerce.cart.client.domain.Cart cart)
      The resolved cart related to the payment transactions
    • setCartPayments

      public void setCartPayments(List<PaymentSummary> cartPayments)
      The cart's collection of PaymentSummaries
    • setGatewayType

      public void setGatewayType(String gatewayType)
      The gateway type of this payment.
    • setRequestBody

      public void setRequestBody(Map<String,Object> requestBody)
      The request body of the payment gateway redirect, if any.
    • setRequestParams

      public void setRequestParams(Map<String,String> requestParams)
      The request params of the payment gateway redirect. Should contain the parameters that were passed on the callback URL and any that the gateway would add.
    • setPaymentResult

      public void setPaymentResult(String paymentResult)
      The result of the payment interaction that was completed, causing the redirect to CartOps. Defaults to DefaultExternalPaymentInteractionResult.UNKNOWN.
      See Also:
    • setPaymentFinalizationStatus

      public void setPaymentFinalizationStatus(String paymentFinalizationStatus)
      The state of the cart's payments following the external payment interaction. This can communicate that all payments are finalized, a transaction failed requiring another form of payment, or that external interaction (e.g. 3DS verification or HPP interaction) is required for another one of the cart's payments. Defaults to DefaultPaymentFinalizationStatus.UNKNOWN.
      See Also:
    • setRedirectAttributes

      public void setRedirectAttributes(Map<String,Object> redirectAttributes)
      Attributes to be returned with the redirect from CartOps to the frontend
    • setAdditionalAttributes

      public void setAdditionalAttributes(Map<String,Object> additionalAttributes)
      Miscellaneous attributes that can be used throughout the processing of a callback.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object