public class DefaultPaymentSummaryService extends Object implements PaymentSummaryService
PaymentSummaryService
.Constructor and Description |
---|
DefaultPaymentSummaryService(com.broadleafcommerce.common.extension.TypeFactory typeFactory) |
Modifier and Type | Method and Description |
---|---|
protected com.broadleafcommerce.order.common.domain.PaymentSummary |
buildBasePaymentSummary(com.broadleafcommerce.order.common.domain.Payment payment) |
com.broadleafcommerce.order.common.domain.PaymentSummary |
buildPaymentSummary(@NonNull com.broadleafcommerce.order.common.domain.Payment payment)
Determines
PaymentSummary based on the Payment's
PaymentTransactions . |
protected javax.money.MonetaryAmount |
determineAuthorizedAmount(@NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary,
@NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
Determines the authorized amount of the payment transactions - "total authorized - total
reverse-authed".
|
protected javax.money.MonetaryAmount |
determineCapturedAmount(@NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary,
@NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
Determines the captured amount of the payment transactions - "total captured - total refunded
- total voided".
|
protected javax.money.MonetaryAmount |
determineDetachedCreditAmount(@NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary,
@NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
Determines the detached amount of the payment transactions.
|
protected javax.money.MonetaryAmount |
determineRefundedAmount(@NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary,
@NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
Determines the refunded amount of the payment transactions.
|
protected javax.money.MonetaryAmount |
determineSettledAmount(@NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary,
@NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
Determines the settled amount of the payment transactions.
|
protected javax.money.MonetaryAmount |
determineVoidedAmount(@NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary,
@NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
Determines the voided amount of the payment transactions.
|
protected List<com.broadleafcommerce.order.common.domain.PaymentTransaction> |
filterOutFailedAndReversedTransactions(@NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions) |
protected com.broadleafcommerce.common.extension.TypeFactory |
getTypeFactory() |
public DefaultPaymentSummaryService(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
public com.broadleafcommerce.order.common.domain.PaymentSummary buildPaymentSummary(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Payment payment)
PaymentSummaryService
PaymentSummary
based on the Payment's
PaymentTransactions
.buildPaymentSummary
in interface PaymentSummaryService
payment
- the payment to determine the summaryprotected List<com.broadleafcommerce.order.common.domain.PaymentTransaction> filterOutFailedAndReversedTransactions(@NonNull @NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
protected com.broadleafcommerce.order.common.domain.PaymentSummary buildBasePaymentSummary(com.broadleafcommerce.order.common.domain.Payment payment)
protected javax.money.MonetaryAmount determineAuthorizedAmount(@NonNull @NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary, @NonNull @NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
paymentSummary
- the PaymentSummary
for the paymenttransactions
- the payment transactionsprotected javax.money.MonetaryAmount determineCapturedAmount(@NonNull @NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary, @NonNull @NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
paymentSummary
- the PaymentSummary
for the paymenttransactions
- the payment transactionsprotected javax.money.MonetaryAmount determineDetachedCreditAmount(@NonNull @NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary, @NonNull @NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
paymentSummary
- the PaymentSummary
for the paymenttransactions
- the payment transactionsprotected javax.money.MonetaryAmount determineRefundedAmount(@NonNull @NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary, @NonNull @NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
paymentSummary
- the PaymentSummary
for the paymenttransactions
- the payment transactionsprotected javax.money.MonetaryAmount determineSettledAmount(@NonNull @NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary, @NonNull @NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
paymentSummary
- the PaymentSummary
for the paymenttransactions
- the payment transactionsprotected javax.money.MonetaryAmount determineVoidedAmount(@NonNull @NonNull com.broadleafcommerce.order.common.domain.PaymentSummary paymentSummary, @NonNull @NonNull List<com.broadleafcommerce.order.common.domain.PaymentTransaction> transactions)
paymentSummary
- the PaymentSummary
for the paymenttransactions
- the payment transactionsprotected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
Copyright © 2021. All rights reserved.