Interface OrderPaymentService

All Known Implementing Classes:
OrderPaymentServiceImpl

public interface OrderPaymentService
  • Method Details

    • save

      OrderPayment save(OrderPayment payment)
    • save

    • readPaymentById

      OrderPayment readPaymentById(Long paymentId)
    • readPaymentsForOrder

      List<OrderPayment> readPaymentsForOrder(Order order)
    • create

      OrderPayment create()
    • delete

      void delete(OrderPayment payment)
      Deletes a payment from the system. Note that this is just a soft-delete and simply archives this entity
    • createTransaction

      PaymentTransaction createTransaction()
    • readTransactionById

      PaymentTransaction readTransactionById(Long transactionId)
    • createOrderPaymentFromCustomerPayment

      OrderPayment createOrderPaymentFromCustomerPayment(Order order, org.broadleafcommerce.profile.core.domain.CustomerPayment customerPayment, org.broadleafcommerce.common.money.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.

      Parameters:
      order -
      customerPayment -
      amount -
      Returns:
    • createCustomerPaymentFromPaymentTransaction

      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

      Parameters:
      transaction -
      Returns:
    • populateCustomerPaymentToken

      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).

      Parameters:
      customerPayment -
      transaction -