Broadleaf does support 2-phase transactions, however you will need to customize and extend Broadleaf to achieve it. Out of the box, all of Broadleaf's third party payment modules support authorizeAndDebit (single transaction). The default Checkout workflow is also set to authorizeAndDebit, so you will need to override that as well to achieve a 2 phase transaction.
All third party modules implement the interface PaymentModule:
Code: Select all
public PaymentResponseItem authorize(PaymentContext paymentContext) throws PaymentException;
public PaymentResponseItem reverseAuthorize(PaymentContext paymentContext) throws PaymentException;
public PaymentResponseItem debit(PaymentContext paymentContext) throws PaymentException;
public PaymentResponseItem authorizeAndDebit(PaymentContext paymentContext) throws PaymentException;
public PaymentResponseItem credit(PaymentContext paymentContext) throws PaymentException;
public PaymentResponseItem voidPayment(PaymentContext paymentContext) throws PaymentException;
public PaymentResponseItem balance(PaymentContext paymentContext) throws PaymentException;
The implementations differ from Payment Gateway to Payment Gateway, so you will need to look at the source of the Broadleaf third party module as well as the documentation of your chosen Payment Gateway to see if they also support two phase transactions.