public interface OrderPaymentService
| Modifier and Type | Method and Description |
|---|---|
OrderPayment |
create() |
org.broadleafcommerce.profile.core.domain.CustomerPayment |
createCustomerPaymentFromPaymentTransaction(PaymentTransaction transaction)
Create a
CustomerPayment token for the passed in Customer
given a PaymentTransaction. |
PaymentLog |
createLog() |
OrderPayment |
createOrderPaymentFromCustomerPayment(Order order,
org.broadleafcommerce.profile.core.domain.CustomerPayment customerPayment,
Money amount)
Create an
OrderPayment with a single
PaymentTransactionType.UNCONFIRMED
PaymentTransaction initialized with the
passed in amount and order. |
PaymentTransaction |
createTransaction() |
void |
delete(OrderPayment payment)
Deletes a payment from the system.
|
void |
populateCustomerPaymentToken(org.broadleafcommerce.profile.core.domain.CustomerPayment customerPayment,
PaymentTransaction transaction)
Will attempt to populate the
CustomerPayment.setPaymentToken(String)
by looking at the PaymentTransaction.getAdditionalFields()
for key PaymentAdditionalFieldType.TOKEN. |
OrderPayment |
readPaymentById(Long paymentId) |
List<OrderPayment> |
readPaymentsForOrder(Order order) |
PaymentTransaction |
readTransactionById(Long transactionId) |
OrderPayment |
save(OrderPayment payment) |
PaymentLog |
save(PaymentLog log) |
PaymentTransaction |
save(PaymentTransaction transaction) |
OrderPayment save(OrderPayment payment)
PaymentTransaction save(PaymentTransaction transaction)
PaymentLog save(PaymentLog log)
OrderPayment readPaymentById(Long paymentId)
List<OrderPayment> readPaymentsForOrder(Order order)
OrderPayment create()
void delete(OrderPayment payment)
OrderPayment#getArchived()}PaymentTransaction createTransaction()
PaymentTransaction readTransactionById(Long transactionId)
PaymentLog createLog()
OrderPayment createOrderPaymentFromCustomerPayment(Order order, org.broadleafcommerce.profile.core.domain.CustomerPayment customerPayment, Money amount)
Create an OrderPayment with a single
PaymentTransactionType.UNCONFIRMED
PaymentTransaction initialized with the
passed in amount and order.
Used typically during the payment flow of checkout, where a customer intends to pay for their order with a saved payment token.
order - customerPayment - amount - org.broadleafcommerce.profile.core.domain.CustomerPayment createCustomerPaymentFromPaymentTransaction(PaymentTransaction transaction)
Create a CustomerPayment token for the passed in Customer
given a PaymentTransaction. This assumes that the
token and any additional request attributes needed to do another transaction for this specific gateway
has already been persisted to the PaymentTransaction.getAdditionalFields() map.
Specifically, the PaymentAdditionalFieldType.TOKEN has been set.
Used typically during the complete checkout flow when a token needs to be saved from a "confirmed" transaction
transaction - void populateCustomerPaymentToken(org.broadleafcommerce.profile.core.domain.CustomerPayment customerPayment,
PaymentTransaction transaction)
Will attempt to populate the CustomerPayment.setPaymentToken(String)
by looking at the PaymentTransaction.getAdditionalFields()
for key PaymentAdditionalFieldType.TOKEN.
Usually used during a checkout flow when there is a direct response from the gateway (e.g. transparent redirect).
customerPayment - transaction - org.broadleafcommerce.core.checkout.service.workflow.ValidateAndConfirmPaymentActivity}Copyright © 2022. All rights reserved.