Broadleaf Microservices
  • v1.0.0-latest-prod

Payment Method Validation Workflow Activity


The following documentation is only relevant prior to version 1.7.0-GA. For payment interactions in 1.7.0-GA and later releases, see Payment Transaction Components (Since 1.7.0-GA) and Checkout Payment Architecture.

Activity that validates that the cart contains payments with amounts sufficient for its total price. Additionally, this activity validates that the PaymentGatewayType is specified by each payment to ensure they can be authorized and captured.

Default Implementation Details

By default, this activity uses CartPaymentStatusService to determine the current status of each Payment in the cart. It then validates:

  1. That the cart has at least 1 active payment

  2. That the payment amounts are all 0 or greater (not null)

  3. That the sum of them matches the cart’s total

  4. That the payment gateway type is present and supported

  5. And that the sum of all successful authorization, successful capture, unconfirmed, and pending PaymentTransactions match the cart’s total

If any of these fail, then a CheckoutWorkflowActivityException is throw with failureType INVALID_PAYMENT_CONFIG, which is then handled by CheckoutWorkflowActivity and can be referenced by the checkout initiator in the CheckoutResponse.