public interface OrderPaymentService
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, 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 - 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(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 © 2020. All rights reserved.