public interface PaymentTransactionService
PaymentResponse results on the PaymentTransaction| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.lang3.tuple.Triple<com.broadleafcommerce.cart.client.domain.Cart,com.broadleafcommerce.order.common.domain.Payment,com.broadleafcommerce.order.common.domain.PaymentTransaction> |
createPaymentTransaction(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.order.common.domain.Payment payment,
com.broadleafcommerce.paymentgateway.domain.enums.TransactionType transactionType,
javax.money.MonetaryAmount amount,
String requestId,
com.broadleafcommerce.order.common.domain.PaymentTransaction parentTransaction,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Creates a pending
PaymentTransaction & saves it to the provided cart payment. |
default org.apache.commons.lang3.tuple.Triple<com.broadleafcommerce.cart.client.domain.Cart,com.broadleafcommerce.order.common.domain.Payment,com.broadleafcommerce.order.common.domain.PaymentTransaction> |
createPaymentTransaction(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.order.common.domain.Payment payment,
com.broadleafcommerce.paymentgateway.domain.enums.TransactionType transactionType,
String requestId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Creates a pending
PaymentTransaction & saves it to the provided cart payment. |
default org.apache.commons.lang3.tuple.Triple<com.broadleafcommerce.cart.client.domain.Cart,com.broadleafcommerce.order.common.domain.Payment,com.broadleafcommerce.order.common.domain.PaymentTransaction> |
createPaymentTransaction(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.order.common.domain.Payment payment,
com.broadleafcommerce.paymentgateway.domain.enums.TransactionType transactionType,
String requestId,
com.broadleafcommerce.order.common.domain.PaymentTransaction parentTransaction,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Creates a pending
PaymentTransaction & saves it to the provided cart payment. |
com.broadleafcommerce.cart.client.domain.Cart |
recordTransactionResponse(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.order.common.domain.Payment payment,
com.broadleafcommerce.order.common.domain.PaymentTransaction transaction,
com.broadleafcommerce.paymentgateway.domain.PaymentResponse response,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Interprets the payment gateway's
PaymentResponse & records the results on the given
Payment & PaymentTransaction. |
default org.apache.commons.lang3.tuple.Triple<com.broadleafcommerce.cart.client.domain.Cart,com.broadleafcommerce.order.common.domain.Payment,com.broadleafcommerce.order.common.domain.PaymentTransaction> createPaymentTransaction(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.order.common.domain.Payment payment,
com.broadleafcommerce.paymentgateway.domain.enums.TransactionType transactionType,
String requestId,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
PaymentTransaction & saves it to the provided cart payment. This
transaction is meant to record our intention to send a request to the payment gateway & it
creates a PaymentTransaction.getTransactionReferenceId() which would also be passed
to the gateway so that they two can be linked.
Note: since an amount is not specified, the transaction amount will be pulled from
Payment.getAmount()cart - the owning cartpayment - The payment that should own this transactiontransactionType - The type of transaction that should be createdrequestId - the id representing the customer's request to confirm their paymentscontextInfo - Context information around sandbox and multitenant state.default org.apache.commons.lang3.tuple.Triple<com.broadleafcommerce.cart.client.domain.Cart,com.broadleafcommerce.order.common.domain.Payment,com.broadleafcommerce.order.common.domain.PaymentTransaction> createPaymentTransaction(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.order.common.domain.Payment payment,
com.broadleafcommerce.paymentgateway.domain.enums.TransactionType transactionType,
String requestId,
@Nullable
com.broadleafcommerce.order.common.domain.PaymentTransaction parentTransaction,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
PaymentTransaction & saves it to the provided cart payment. This
transaction is meant to record our intention to send a request to the payment gateway & it
creates a PaymentTransaction.getTransactionReferenceId() which would also be passed
to the gateway so that they two can be linked.
Note: since an amount is not specified, the transaction amount will be pulled from
Payment.getAmount()cart - the owning cartpayment - The payment that should own this transactiontransactionType - The type of transaction that should be createdrequestId - the id representing the customer's request to confirm their paymentsparentTransaction - A related transaction that this created transaction should link tocontextInfo - Context information around sandbox and multitenant state.org.apache.commons.lang3.tuple.Triple<com.broadleafcommerce.cart.client.domain.Cart,com.broadleafcommerce.order.common.domain.Payment,com.broadleafcommerce.order.common.domain.PaymentTransaction> createPaymentTransaction(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.order.common.domain.Payment payment,
com.broadleafcommerce.paymentgateway.domain.enums.TransactionType transactionType,
javax.money.MonetaryAmount amount,
String requestId,
@Nullable
com.broadleafcommerce.order.common.domain.PaymentTransaction parentTransaction,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
PaymentTransaction & saves it to the provided cart payment. This
transaction is meant to record our intention to send a request to the payment gateway & it
creates a PaymentTransaction.getTransactionReferenceId() which would also be passed
to the gateway so that they two can be linked.cart - the owning cartpayment - The payment that should own this transactiontransactionType - The type of transaction that should be createdamount - The monetary amount related to this transactionrequestId - the id representing the customer's request to confirm their paymentsparentTransaction - A related transaction that this created transaction should link tocontextInfo - Context information around sandbox and multitenant state.com.broadleafcommerce.cart.client.domain.Cart recordTransactionResponse(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.order.common.domain.Payment payment,
com.broadleafcommerce.order.common.domain.PaymentTransaction transaction,
com.broadleafcommerce.paymentgateway.domain.PaymentResponse response,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
PaymentResponse & records the results on the given
Payment & PaymentTransaction.
Note: if the transaction failed, then the payment should also be archived so that it can no
longer contribute to a successful checkoutcart - the owning cartpayment - the payment that we intended to authorizetransaction - the transaction that is to hold the results of the transactionresponse - the payment gateway's response to our authorization attemptcontextInfo - Context information around sandbox and multitenant state.com.broadleafcommerce.paymentgateway.service.exception.PaymentException - thrown if the response represents a failed authorizationCopyright © 2021. All rights reserved.