Interface PaymentManagement

All Known Implementing Classes:
PaymentApplicationService

public interface PaymentManagement
Module API for authorizing and retrieving payments associated with orders.
  • Method Summary

    Modifier and Type
    Method
    Description
    authorize(UUID orderId, Money amount)
    Authorizes the pending payment for an order when the submitted amount matches the order total.
    getPayment(UUID paymentId)
    Retrieves a payment by identifier.
  • Method Details

    • authorize

      PaymentSummary authorize(UUID orderId, Money amount)
      Authorizes the pending payment for an order when the submitted amount matches the order total.
      Parameters:
      orderId - order identifier
      amount - submitted payment amount
      Returns:
      authorized payment summary
      Throws:
      ResourceNotFoundException - when no payment exists for the order
      BusinessRuleViolationException - when the submitted amount does not match
    • getPayment

      PaymentSummary getPayment(UUID paymentId)
      Retrieves a payment by identifier.
      Parameters:
      paymentId - payment identifier
      Returns:
      payment summary
      Throws:
      ResourceNotFoundException - when the payment does not exist