@Service(value="blOrderPaymentService") public class OrderPaymentServiceImpl extends Object implements OrderPaymentService
Modifier and Type | Field and Description |
---|---|
protected AddressService |
addressService |
protected CustomerPaymentService |
customerPaymentService |
protected OrderPaymentDao |
paymentDao |
Constructor and Description |
---|
OrderPaymentServiceImpl() |
protected OrderPaymentDao paymentDao
protected CustomerPaymentService customerPaymentService
protected AddressService addressService
@Transactional(value="blTransactionManager") public OrderPayment save(OrderPayment payment)
save
in interface OrderPaymentService
@Transactional(value="blTransactionManager") public PaymentTransaction save(PaymentTransaction transaction)
save
in interface OrderPaymentService
public PaymentLog save(PaymentLog log)
save
in interface OrderPaymentService
public OrderPayment readPaymentById(Long paymentId)
readPaymentById
in interface OrderPaymentService
public List<OrderPayment> readPaymentsForOrder(Order order)
readPaymentsForOrder
in interface OrderPaymentService
public OrderPayment create()
create
in interface OrderPaymentService
@Transactional(value="blTransactionManager") public void delete(OrderPayment payment)
OrderPaymentService
delete
in interface OrderPaymentService
OrderPayment#getArchived()}
public PaymentLog createLog()
createLog
in interface OrderPaymentService
public PaymentTransaction createTransaction()
createTransaction
in interface OrderPaymentService
public PaymentTransaction readTransactionById(Long transactionId)
readTransactionById
in interface OrderPaymentService
@Transactional(value="blTransactionManager") public OrderPayment createOrderPaymentFromCustomerPayment(Order order, CustomerPayment customerPayment, Money amount)
OrderPaymentService
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.
createOrderPaymentFromCustomerPayment
in interface OrderPaymentService
@Transactional(value="blTransactionManager") public CustomerPayment createCustomerPaymentFromPaymentTransaction(PaymentTransaction transaction)
OrderPaymentService
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
createCustomerPaymentFromPaymentTransaction
in interface OrderPaymentService
public void populateCustomerPaymentToken(CustomerPayment customerPayment, PaymentTransaction transaction)
OrderPaymentService
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).
populateCustomerPaymentToken
in interface OrderPaymentService
org.broadleafcommerce.core.checkout.service.workflow.ValidateAndConfirmPaymentActivity}
Copyright © 2019. All rights reserved.