Interface PaymentManagement
- All Known Implementing Classes:
PaymentApplicationService
public interface PaymentManagement
Module API for authorizing and retrieving payments associated with orders.
-
Method Summary
Modifier and TypeMethodDescriptionAuthorizes 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
Authorizes the pending payment for an order when the submitted amount matches the order total.- Parameters:
orderId- order identifieramount- submitted payment amount- Returns:
- authorized payment summary
- Throws:
ResourceNotFoundException- when no payment exists for the orderBusinessRuleViolationException- when the submitted amount does not match
-
getPayment
Retrieves a payment by identifier.- Parameters:
paymentId- payment identifier- Returns:
- payment summary
- Throws:
ResourceNotFoundException- when the payment does not exist
-