com.ibm.commerce.payment.extensions
Class BankServACHCashierExtension

java.lang.Object
  |
  +--com.ibm.commerce.payment.extensions.BankServACHCashierExtension

public class BankServACHCashierExtension
extends java.lang.Object

This class is used by the WebSphere Commerce Cashier Profiles for Payment Cassettes to generate value for the $STATEPROVINCE or $AVS.STATEPROVINCE parameter specified in the Cashier Profile.

It implements the com.ibm.etill.cashier.CashierExtension interface.


Constructor Summary
BankServACHCashierExtension()
          BankServACHCashierExtension default constructor.
 
Method Summary
protected  java.lang.String getStateCode(java.util.Hashtable requestParms)
          Returns the two-character US State code for the $STATEPROVINCE parameter or $AVS.STATEPROVINCE parameter required by some cassettes.
 java.lang.String getValue(java.lang.String keyword, java.util.Hashtable parms, java.util.Hashtable paymentParms, java.sql.Connection dsConn, CashierTrace traceService, java.util.Locale locale)
          This method is called by the Cashier to give the CashierExtension an opportunity to construct and return a value for the specified keyword.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BankServACHCashierExtension

public BankServACHCashierExtension()
BankServACHCashierExtension default constructor.
Method Detail

getStateCode

protected java.lang.String getStateCode(java.util.Hashtable requestParms)
                                 throws ECException
Returns the two-character US State code for the $STATEPROVINCE parameter or $AVS.STATEPROVINCE parameter required by some cassettes.

This method tries to locate the two-character State code from the WebSphere Commerce STATEPROV Table using the value specified in the "billto_state" environment variable as State name.

The method returns null if no State Code can be found for the State name specified.

For compatibility, the method returns the "billto_state" environment variable value as the State code if the value is of length two.

Parameters:
requestParms - name-value pairs containing parameters passed to the Cashier Extension
Returns:
the two-character US State code
Throws:
ECException

getValue

public java.lang.String getValue(java.lang.String keyword,
                                 java.util.Hashtable parms,
                                 java.util.Hashtable paymentParms,
                                 java.sql.Connection dsConn,
                                 CashierTrace traceService,
                                 java.util.Locale locale)
                          throws CashierException
This method is called by the Cashier to give the CashierExtension an opportunity to construct and return a value for the specified keyword.

The Standard WebSphere Commerce Cashier Profile for the Cassette for BankServACH uses this method to generate value for the $STATEPROVINCE parameter specified in the profile.

Note that for WebSphere Commerce the DataSource Connection parameter is generally null.

Parameters:
keyword - WebSphere Commerce Payments Protocol Data keyword. (In this case, "$STAEPROVINCE" or "$AVS.STATEPROVINCE" are acceptable.)
parms - The Hashtable containing the parameters (name-value pairs) passed to the Cashier Extension.
paymentParms - Payment parameters collected up to this point
dsConn - DataSource Connection to be used for looking up database values
traceService - Trace Service instance for tracing to merchant server log
locale - Locale
Returns:
a String representing the value to be used for the keyword specified.
Throws:
CashierException.
CashierException
See Also:
getStateCode