Class PaymentAccountProcessingRequest

java.lang.Object
com.broadleafcommerce.billing.job.domain.PaymentAccountProcessingRequest
All Implemented Interfaces:
Serializable

public class PaymentAccountProcessingRequest extends Object implements Serializable
This DTO stores the payment account, the payment transaction's processing status, and its result.

This DTO is stored on BillingProcessingRequest

See Also:
  • Constructor Details

  • Method Details

    • addTransactionAdditionalField

      public void addTransactionAdditionalField(@NonNull @NonNull String key, @NonNull @NonNull String value)
    • addTransactionAdditionalFields

      public void addTransactionAdditionalFields(@NonNull @NonNull Map<String,String> additionalFields)
    • getTransactionAdditionalField

      public String getTransactionAdditionalField(@NonNull @NonNull String key)
    • getRefundEventDetailEventPaymentId

      @Deprecated(since="1.0.0", forRemoval=true) public String getRefundEventDetailEventPaymentId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      the BillingEventPaymentId of the RefundEventDetail
    • setRefundEventDetailEventPaymentId

      @Deprecated(since="1.0.0", forRemoval=true) public void setRefundEventDetailEventPaymentId(String refundEventDetailEventPaymentId)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • convert

      public Object convert(org.modelmapper.spi.MappingContext<?,?> context)
    • getPaymentAccount

      public PaymentAccount getPaymentAccount()
      The PaymentAccount associated to this request
    • getPaymentProcessor

      public String getPaymentProcessor()
      Code for the payment processor used for the transaction. Ex: CYBERSOURCE, PAYPAL
    • getTransactionReferenceId

      public String getTransactionReferenceId()
      This unique value is used by the processor to rule out the duplicates
    • getTransactionType

      public PaymentAccountProcessingTransactionType getTransactionType()
      Transaction type of the transaction
      See Also:
    • getDateProcessed

      public Date getDateProcessed()
      The date and time this transaction was sent to the processor
    • getStatus

      The status of this account processing request.
    • getProcessingResult

      public PaymentAccountProcessingResultEnum getProcessingResult()
      The result of this payment processing request.
    • getRawResponse

      public String getRawResponse()
      The raw response from the payment processor
    • getFailureReason

      public String getFailureReason()
      Reason for the transaction failure
    • getFailureType

      public PaymentFailureTypeEnum getFailureType()
      Describes the severity of the failure. PaymentFailureTypeEnum.HARD_FAILURE describes a failure where the payment method can no longer be used (e.g. card stolen), whereas PaymentFailureTypeEnum.SOFT_FAILURE describes a failure where transactions with the payment method can be attempted in the future (e.g. insufficient funds)
    • getFailureCategory

      public String getFailureCategory()
      A simple categorization of the failure that was encountered while attempting the transaction. Note: This is meant to be an informative abstraction beyond the raw response codes provided by payment gateways. Possible values may include: GATEWAY_CREDENTIALS_ERROR, INVALID_PAYMENT_METHOD, PROCESSING_FAILURE, GATEWAY_ERROR, or NETWORK_ERROR.
    • getGatewayErrorCount

      public int getGatewayErrorCount()
      The number of times a gateway errors occurred while processing this account.
    • isEligibleForGatewayErrorRetries

      public boolean isEligibleForGatewayErrorRetries()
      Declares whether this request is eligible to retry executing the transaction in the case of a gateway error. Note: This should be primarily determined based on the payment gateway being used. Some gateways support the ability to resend transaction requests without the risk of duplicate transactions, but that can NOT be said for all gateways.
    • getTransactionAdditionalFields

      public Map<String,String> getTransactionAdditionalFields()
      Name/Value pairs of additional attributes. This is the place to pass through gateway-specific information
    • isResultHandled

      public boolean isResultHandled()
      Indicates that this account result has been handled by the payment result handler.
    • getBillingEventPaymentIdToRefund

      public String getBillingEventPaymentIdToRefund()
      BillingEventPaymentId of the RefundEventDetail
    • setPaymentAccount

      public void setPaymentAccount(PaymentAccount paymentAccount)
      The PaymentAccount associated to this request
    • setPaymentProcessor

      public void setPaymentProcessor(String paymentProcessor)
      Code for the payment processor used for the transaction. Ex: CYBERSOURCE, PAYPAL
    • setTransactionReferenceId

      public void setTransactionReferenceId(String transactionReferenceId)
      This unique value is used by the processor to rule out the duplicates
    • setTransactionType

      public void setTransactionType(PaymentAccountProcessingTransactionType transactionType)
      Transaction type of the transaction
      See Also:
    • setDateProcessed

      public void setDateProcessed(Date dateProcessed)
      The date and time this transaction was sent to the processor
    • setStatus

      public void setStatus(PaymentAccountProcessingStatusEnum status)
      The status of this account processing request.
    • setProcessingResult

      public void setProcessingResult(PaymentAccountProcessingResultEnum processingResult)
      The result of this payment processing request.
    • setRawResponse

      public void setRawResponse(String rawResponse)
      The raw response from the payment processor
    • setFailureReason

      public void setFailureReason(String failureReason)
      Reason for the transaction failure
    • setFailureType

      public void setFailureType(PaymentFailureTypeEnum failureType)
      Describes the severity of the failure. PaymentFailureTypeEnum.HARD_FAILURE describes a failure where the payment method can no longer be used (e.g. card stolen), whereas PaymentFailureTypeEnum.SOFT_FAILURE describes a failure where transactions with the payment method can be attempted in the future (e.g. insufficient funds)
    • setFailureCategory

      public void setFailureCategory(String failureCategory)
      A simple categorization of the failure that was encountered while attempting the transaction. Note: This is meant to be an informative abstraction beyond the raw response codes provided by payment gateways. Possible values may include: GATEWAY_CREDENTIALS_ERROR, INVALID_PAYMENT_METHOD, PROCESSING_FAILURE, GATEWAY_ERROR, or NETWORK_ERROR.
    • setGatewayErrorCount

      public void setGatewayErrorCount(int gatewayErrorCount)
      The number of times a gateway errors occurred while processing this account.
    • setEligibleForGatewayErrorRetries

      public void setEligibleForGatewayErrorRetries(boolean eligibleForGatewayErrorRetries)
      Declares whether this request is eligible to retry executing the transaction in the case of a gateway error. Note: This should be primarily determined based on the payment gateway being used. Some gateways support the ability to resend transaction requests without the risk of duplicate transactions, but that can NOT be said for all gateways.
    • setTransactionAdditionalFields

      public void setTransactionAdditionalFields(Map<String,String> transactionAdditionalFields)
      Name/Value pairs of additional attributes. This is the place to pass through gateway-specific information
    • setResultHandled

      public void setResultHandled(boolean resultHandled)
      Indicates that this account result has been handled by the payment result handler.
    • setBillingEventPaymentIdToRefund

      public void setBillingEventPaymentIdToRefund(String billingEventPaymentIdToRefund)
      BillingEventPaymentId of the RefundEventDetail
    • 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