org.broadleafcommerce.core.payment.service.module
Class AcceptAndPassthroughModule

java.lang.Object
  extended by org.broadleafcommerce.core.payment.service.module.AbstractModule
      extended by org.broadleafcommerce.core.payment.service.module.AcceptAndPassthroughModule
All Implemented Interfaces:
PaymentModule

public class AcceptAndPassthroughModule
extends AbstractModule

This payment module can be utilized when you wish to accept an order's payment without acting on it. For example, if the customer is going to pay by check and mail it to you, you will want to accept the order and not perform any actual payment transaction. In order to instantiate this module, you must inject a valid PaymentInfoType for which this module will be executed. If you are associating this module with several payment types, you should declare this bean as prototype For example:

Author:
Andre Azzolini (apazzolini)

Constructor Summary
AcceptAndPassthroughModule()
           
 
Method Summary
 Boolean isValidCandidate(PaymentInfoType paymentType)
           
 PaymentResponseItem processAuthorize(PaymentContext paymentContext, Money amountToAuthorize, PaymentResponseItem responseItem)
           
 PaymentResponseItem processAuthorizeAndDebit(PaymentContext paymentContext, Money amountToDebit, PaymentResponseItem responseItem)
           
 PaymentResponseItem processBalance(PaymentContext paymentContext, PaymentResponseItem responseItem)
           
 PaymentResponseItem processCredit(PaymentContext paymentContext, Money amountToCredit, PaymentResponseItem responseItem)
           
 PaymentResponseItem processDebit(PaymentContext paymentContext, Money amountToDebit, PaymentResponseItem responseItem)
           
 PaymentResponseItem processPartialPayment(PaymentContext paymentContext, Money amountToDebit, PaymentResponseItem responseItem)
           
 PaymentResponseItem processReverseAuthorize(PaymentContext paymentContext, Money amountToReverseAuthorize, PaymentResponseItem responseItem)
           
 PaymentResponseItem processVoidPayment(PaymentContext paymentContext, Money amountToVoid, PaymentResponseItem responseItem)
           
 void setValidPaymentInfoType(String validType)
           
 
Methods inherited from class org.broadleafcommerce.core.payment.service.module.AbstractModule
authorize, authorizeAndDebit, balance, credit, debit, findPaymentInfoFromContext, getAmountAvailableToCredit, getAmountAvailableToDebit, getAmountAvailableToReverseAuthorize, getNewCapturePaymentInfoDetail, getNewPaymentInfoDetail, getNewRefundPaymentInfoDetail, getNewResponseItem, getNewResponseItem, getNewReverseAuthPaymentInfoDetail, partialPayment, reverseAuthorize, voidPayment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcceptAndPassthroughModule

public AcceptAndPassthroughModule()
Method Detail

setValidPaymentInfoType

public void setValidPaymentInfoType(String validType)

processAuthorize

public PaymentResponseItem processAuthorize(PaymentContext paymentContext,
                                            Money amountToAuthorize,
                                            PaymentResponseItem responseItem)
                                     throws PaymentException
Throws:
PaymentException

processReverseAuthorize

public PaymentResponseItem processReverseAuthorize(PaymentContext paymentContext,
                                                   Money amountToReverseAuthorize,
                                                   PaymentResponseItem responseItem)
                                            throws PaymentException
Throws:
PaymentException

processAuthorizeAndDebit

public PaymentResponseItem processAuthorizeAndDebit(PaymentContext paymentContext,
                                                    Money amountToDebit,
                                                    PaymentResponseItem responseItem)
                                             throws PaymentException
Throws:
PaymentException

processDebit

public PaymentResponseItem processDebit(PaymentContext paymentContext,
                                        Money amountToDebit,
                                        PaymentResponseItem responseItem)
                                 throws PaymentException
Throws:
PaymentException

processCredit

public PaymentResponseItem processCredit(PaymentContext paymentContext,
                                         Money amountToCredit,
                                         PaymentResponseItem responseItem)
                                  throws PaymentException
Throws:
PaymentException

processVoidPayment

public PaymentResponseItem processVoidPayment(PaymentContext paymentContext,
                                              Money amountToVoid,
                                              PaymentResponseItem responseItem)
                                       throws PaymentException
Throws:
PaymentException

processBalance

public PaymentResponseItem processBalance(PaymentContext paymentContext,
                                          PaymentResponseItem responseItem)
                                   throws PaymentException
Throws:
PaymentException

processPartialPayment

public PaymentResponseItem processPartialPayment(PaymentContext paymentContext,
                                                 Money amountToDebit,
                                                 PaymentResponseItem responseItem)
                                          throws PaymentException
Throws:
PaymentException

isValidCandidate

public Boolean isValidCandidate(PaymentInfoType paymentType)


Copyright © 2013. All Rights Reserved.