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

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

public class NullCreditCardPaymentModule
extends AbstractModule


Constructor Summary
NullCreditCardPaymentModule()
           
 
Method Summary
 PaymentResponseItem authorize(PaymentContext paymentContext)
           
 PaymentResponseItem authorizeAndDebit(PaymentContext paymentContext)
          The following method: validates a credit card number against the Apache Commons CreditCardValidator.
 PaymentResponseItem balance(PaymentContext paymentContext)
           
 PaymentResponseItem credit(PaymentContext paymentContext)
           
 PaymentResponseItem debit(PaymentContext paymentContext)
           
 Boolean isValidCandidate(PaymentInfoType paymentType)
           
 PaymentResponseItem reverseAuthorize(PaymentContext paymentContext)
           
 PaymentResponseItem voidPayment(PaymentContext paymentContext)
           
 
Methods inherited from class org.broadleafcommerce.core.payment.service.module.AbstractModule
getNewResponseItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullCreditCardPaymentModule

public NullCreditCardPaymentModule()
Method Detail

authorize

public PaymentResponseItem authorize(PaymentContext paymentContext)
                              throws PaymentException
Throws:
PaymentException

reverseAuthorize

public PaymentResponseItem reverseAuthorize(PaymentContext paymentContext)
                                     throws PaymentException
Throws:
PaymentException

authorizeAndDebit

public PaymentResponseItem authorizeAndDebit(PaymentContext paymentContext)
                                      throws PaymentException
The following method: validates a credit card number against the Apache Commons CreditCardValidator. validates the expiration date. validates that the cvv != "000" in order to demonstrate a PaymentException This method will set the TransactionSuccess to false on the PaymentResponseItem if any of the conditions above are invalid. This does NOT integrate with any Payment Gateway and should not be used in any production environment. This class is for demonstration purposes only.

Parameters:
paymentContext - - the payment context injected from the workflow (see: blAuthorizeAndDebitWorkflow in bl-framework-applicationContext-workflow.xml)
Returns:
PaymentResponseItem - the response item
Throws:
PaymentException

debit

public PaymentResponseItem debit(PaymentContext paymentContext)
                          throws PaymentException
Throws:
PaymentException

credit

public PaymentResponseItem credit(PaymentContext paymentContext)
                           throws PaymentException
Throws:
PaymentException

voidPayment

public PaymentResponseItem voidPayment(PaymentContext paymentContext)
                                throws PaymentException
Throws:
PaymentException

balance

public PaymentResponseItem balance(PaymentContext paymentContext)
                            throws PaymentException
Throws:
PaymentException

isValidCandidate

public Boolean isValidCandidate(PaymentInfoType paymentType)


Copyright © 2013. All Rights Reserved.