Package-level declarations

Types

Link copied to clipboard
@Summary(value = "Confirm a payment")
data class ConfirmPayment(val transactionId: String)

Records that the gateway approved the payment, under its transactionId. The gateway saga sends it, and only it: the command is internal, so the public port serves no route of it, and a client cannot confirm a payment the gateway never charged.

Link copied to clipboard
@Summary(value = "Fail a payment")
data class FailPayment(val reason: String)

Records that the gateway declined the payment, for reason. The gateway saga sends it, and only it: internal too.

Link copied to clipboard
@Summary(value = "The gateway declined a payment")
data class PaymentFailed(val reason: String)
Link copied to clipboard
@Summary(value = "A payment was refunded")
data class PaymentRefunded(val reason: String)
Link copied to clipboard
@Summary(value = "A payment was requested")
data class PaymentRequested(val orderId: String, val amount: BigDecimal)
Link copied to clipboard

Where a payment is: requested, then succeeded or failed; a succeeded one may be refunded.

Link copied to clipboard
@Summary(value = "The gateway approved a payment")
data class PaymentSucceeded(val transactionId: String)
Link copied to clipboard
@Summary(value = "Refund a payment")
data class RefundPayment(val reason: String)

Refunds a confirmed payment, for reason. The order-payment saga sends it when the ordering context refuses the payment: the order was cancelled meanwhile, when its grace period passed, say.

Link copied to clipboard
@Summary(value = "Request a payment")
data class RequestPayment(val orderId: String, val amount: BigDecimal)

Requests the payment of amount for the order orderId. The order-payment saga sends it once the ordering context confirms the order's stock.