com.ibm.etill.ldbcardcassette
Class LdbCardAccount

com.ibm.etill.ldbcardcassette.LdbCardAccount

public final class LdbCardAccount
implements LdbCardConstants

The Account object is responsible for managing the relationship between the merchant and the payment engine. It uses the cassette's account configuration table to create account objects and verifies that the configuration is syntactically and semantically correct. It is responsible for making connections to the payment engine and exchanging data between the cassette and the payment engine.


Field Summary
private static java.util.Hashtable clsAccountList
          This Hashtable contains the entire list of all the merchant accounts.
private static java.lang.String COPYRIGHT
           
private static java.lang.String ICV_KEY_ACCOUNT
          Constants for core engine parameter keys.
private static java.lang.String ICV_KEY_ADDRESS
           
private static java.lang.String ICV_KEY_AMOUNT
           
private static java.lang.String ICV_KEY_APPROVAL
           
private static java.lang.String ICV_KEY_CLERK
           
private static java.lang.String ICV_KEY_COMMENT
           
private static java.lang.String ICV_KEY_EXPIRY
           
private static java.lang.String ICV_KEY_REASON
           
private static java.lang.String ICV_KEY_STATUS
           
private static java.lang.String ICV_KEY_TYPE
           
private static java.lang.String ICV_KEY_ZIP_CODE
           
private static java.lang.String ICV_ORDER_PREFIX
          Constants to wrap the framework order numbers for the core engine.
private static java.lang.String ICV_ORDER_SEPARATOR
           
private static java.lang.String ICV_ORDER_SUFFIX
           
private static java.lang.String ICV_VAL_APPROVED
          Constants for core engine status values.
private static java.lang.String ICV_VAL_BOOK
          Constants for core engine parameter values.
private static java.lang.String ICV_VAL_CREDIT
           
private static java.lang.String ICV_VAL_SETTLE
           
private static java.lang.String ICV_VAL_SHIP
           
private static java.lang.String ICV_VAL_VOID
           
private static java.lang.String ICV_VAL_VOID_C
           
private  java.lang.String objAccount
          This account attribute contains the account number.
private  java.lang.Integer objBatchCloseTime
          This account attribute contains the time of day when the cassette should automatically close any open batch.
private  netverify.remote.client.Connection objConnection
          This account attribute contains the connection to the RMI server used by this account.
private  java.lang.String objCurrency
          This account attribute contains the ISO currency code supported by this account.
private  double objDoubleExp10
          This account attribute contains the exponent on 10 used to position the decimal point in integer currency values.
private  java.lang.String objExp10
          This account attribute contains the exponent on 10 used to position the decimal point in integer currency values.
private  java.text.NumberFormat objFormatter
          This account attribute contains a number formatter configured to convert currency values into strings.
private  com.ibm.etill.framework.admin.AccountAdmin objFrameworkAccount
          This account attribute contains a reference to the frameworks account object.
private  java.lang.String objLdbCardId
          This account attribute contains the merchant's identifier in the payment engine.
private  java.lang.Integer objMaxBatchSize
          This account attribute contains the maximum batch size for batches that use this account.
private  java.lang.String objMerchant
          This account attribute contains the merchant number.
private  java.lang.Integer objMinBatchTotal
          This account attribute contains the minimum batch total for batches that are closed automatically at a particular time of day.
private  java.lang.String objPassword
          This account attribute contains the password used to authenticate the accounts user.
private  java.lang.String objUrl
          This account attribute contains the universal resource locator for the RMI server used by this account.
private  java.lang.String objUser
          This account attribute contains the ID of the user authorized to connect to this account's RMI server.
 
Fields inherited from interface com.ibm.etill.ldbcardcassette.LdbCardConstants
ACC_ACCOUNT, ACC_CLOSE_TIME, ACC_CURRENCY, ACC_LDBCARD_ID, ACC_MAX_BATCH_SIZE, ACC_MERCHANT, ACC_MIN_BATCH_TOTAL, ACC_PASSWORD, ACC_URL, ACC_USER, BAT_APPROVAL, BAT_BATCH, BAT_CLOSED_TO_TRANS, BAT_MERCHANT, BAT_REASON, CASSETTE_NAME, COL_ACCOUNT, COL_ADDRESS, COL_AMOUNT, COL_APPROVAL, COL_BATCH, COL_BRAND, COL_CLOSE_TIME, COL_CLOSED_TO_TRANS, COL_CREDIT, COL_CURRENCY, COL_EXPIRY, COL_LDBCARD_ID, COL_MAX_BATCH_SIZE, COL_MERCHANT, COL_MERCHANT_NAME, COL_MIN_BATCH_TOTAL, COL_ORDER, COL_PAN, COL_PASSWORD, COL_PAYMENT, COL_POSTAL_CODE, COL_REASON, COL_URL, COL_USER, CRE_APPROVAL, CRE_CREDIT, CRE_MERCHANT, CRE_ORDER, CRE_REASON, MSG_ACCOUNT_CREATE_ROW_FAILURE, MSG_ACCOUNT_CREATE_SQL_FAILURE, MSG_ACCOUNT_DELETE_ROW_FAILURE, MSG_ACCOUNT_DELETE_SQL_FAILURE, MSG_ACCOUNT_ICV_CMD_FAILURE, MSG_ACCOUNT_ICV_FAILURE, MSG_ACCOUNT_MORE_THAN_ONE_BATCH, MSG_ACCOUNT_MULTIPLE_ACCOUNTS, MSG_ACCOUNT_NULL_BATCH_CLOSE_TIME, MSG_ACCOUNT_NULL_BATCH_NUMBER, MSG_ACCOUNT_NULL_MAX_BATCH_SIZE, MSG_ACCOUNT_NULL_MIN_BATCH_TOTAL, MSG_ACCOUNT_SELECT_CLOSE_FAILURE, MSG_ACCOUNT_SELECT_SQL_FAILURE, MSG_ACCOUNT_UPDATE_ROW_FAILURE, MSG_ACCOUNT_UPDATE_SQL_FAILURE, MSG_BATCH_AUTO_CLOSE_FAILURE, MSG_BATCH_BAD_ADD_CREDIT_STATE, MSG_BATCH_BAD_ADD_PAYMENT_STATE, MSG_BATCH_BAD_BATCH_IN_CREDIT, MSG_BATCH_BAD_BATCH_IN_PAYMENT, MSG_BATCH_CLOSE_WORK_ITEM_FAILURE, MSG_BATCH_CREATE_ROW_FAILURE, MSG_BATCH_CREATE_SQL_FAILURE, MSG_BATCH_CREDIT_RETRIEVAL_FAILURE, MSG_BATCH_DELETE_ROW_FAILURE, MSG_BATCH_DELETE_SQL_FAILURE, MSG_BATCH_DEPOSIT_REVERSAL_FAILURE, MSG_BATCH_NULL_CREDIT, MSG_BATCH_NULL_ORDER_FOR_CREDIT, MSG_BATCH_NULL_ORDER_FOR_PAYMENT, MSG_BATCH_NULL_PAYMENT, MSG_BATCH_PAYMENT_RETRIEVAL_FAILURE, MSG_BATCH_REFUND_REVERSAL_FAILURE, MSG_BATCH_SELECT_BATCH_MISSING, MSG_BATCH_SELECT_CLOSE_FAILURE, MSG_BATCH_SELECT_ROW_FAILURE, MSG_BATCH_SELECT_SQL_FAILURE, MSG_BATCH_TIMER_WORK_ITEM_FAILURE, MSG_BATCH_UPDATE_ROW_FAILURE, MSG_BATCH_UPDATE_SQL_FAILURE, MSG_CASSETTE_BUNDLE_ID_MISMATCH, MSG_CASSETTE_HAS_STARTED, MSG_CASSETTE_HAS_STOPPED, MSG_CASSETTE_METHOD_NOT_IMPLEMENTED, MSG_CREDIT_CLOSE_STATE_ERROR, MSG_CREDIT_CREATE_ROW_FAILURE, MSG_CREDIT_CREATE_SQL_FAILURE, MSG_CREDIT_DELETE_ROW_FAILURE, MSG_CREDIT_DELETE_SQL_FAILURE, MSG_CREDIT_SELECT_CLOSE_FAILURE, MSG_CREDIT_SELECT_CREDIT_MISSING, MSG_CREDIT_SELECT_ROW_FAILURE, MSG_CREDIT_SELECT_SQL_FAILURE, MSG_CREDIT_UPDATE_ROW_FAILURE, MSG_CREDIT_UPDATE_SQL_FAILURE, MSG_ORDER_CLOSE_CREDIT_STATE_ERROR, MSG_ORDER_CLOSE_PAYMENT_STATE_ERROR, MSG_ORDER_CREATE_ROW_FAILURE, MSG_ORDER_CREATE_SQL_FAILURE, MSG_ORDER_DELETE_ROW_FAILURE, MSG_ORDER_DELETE_SQL_FAILURE, MSG_ORDER_SELECT_CLOSE_FAILURE, MSG_ORDER_SELECT_ORDER_MISSING, MSG_ORDER_SELECT_ROW_FAILURE, MSG_ORDER_SELECT_SQL_FAILURE, MSG_ORDER_UPDATE_ROW_FAILURE, MSG_ORDER_UPDATE_SQL_FAILURE, MSG_PAYMENT_CLOSE_STATE_ERROR, MSG_PAYMENT_CREATE_ROW_FAILURE, MSG_PAYMENT_CREATE_SQL_FAILURE, MSG_PAYMENT_DELETE_ROW_FAILURE, MSG_PAYMENT_DELETE_SQL_FAILURE, MSG_PAYMENT_SELECT_CLOSE_FAILURE, MSG_PAYMENT_SELECT_PAYMENT_MISSING, MSG_PAYMENT_SELECT_ROW_FAILURE, MSG_PAYMENT_SELECT_SQL_FAILURE, MSG_PAYMENT_UPDATE_ROW_FAILURE, MSG_PAYMENT_UPDATE_SQL_FAILURE, MSG_QUERY_ACC_SELECT_SQL_FAILURE, MSG_QUERY_BAT_SELECT_SQL_FAILURE, MSG_QUERY_CRE_SELECT_SQL_FAILURE, MSG_QUERY_ORD_SELECT_SQL_FAILURE, MSG_QUERY_PAY_SELECT_SQL_FAILURE, ORD_ACCOUNT, ORD_ADDRESS, ORD_AMOUNT, ORD_BRAND, ORD_EXPIRY, ORD_MERCHANT, ORD_ORDER, ORD_PAN, ORD_POSTAL_CODE, PAY_APPROVAL, PAY_MERCHANT, PAY_ORDER, PAY_PAYMENT, PAY_REASON, PAYMENT_TYPE, PD_ACC_BATCH_CLOSE_TIME, PD_ACC_CURRENCY, PD_ACC_LDBCARDID, PD_ACC_MAX_BATCH_SIZE, PD_ACC_MIN_BATCH_TOTAL, PD_ACC_PASSWORD, PD_ACC_URL, PD_ACC_USER, PD_PAY_B_CITY, PD_PAY_B_COUNTRYCOD, PD_PAY_B_COUNTRYCODE, PD_PAY_B_POSTALCODE, PD_PAY_B_STATEPROV, PD_PAY_B_STATEPROVINCE, PD_PAY_B_STREETADDR, PD_PAY_B_STREETADDRESS, PD_PAY_BRAND, PD_PAY_CARDHOLDERNAME, PD_PAY_CITY, PD_PAY_COUNTRYCODE, PD_PAY_EXPIRY, PD_PAY_PAN, PD_PAY_POSTALCODE, PD_PAY_STATEPROV, PD_PAY_STATEPROVINCE, PD_PAY_STREETADDR, PD_PAY_STREETADDRESS, RB_ID, SRC_ACCOUNT_CREATE_ROW_FAILURE, SRC_ACCOUNT_CREATE_SQL_FAILURE, SRC_ACCOUNT_DELETE_ROW_FAILURE, SRC_ACCOUNT_DELETE_SQL_FAILURE, SRC_ACCOUNT_ICV_FAILURE, SRC_ACCOUNT_MORE_THAN_ONE_BATCH, SRC_ACCOUNT_NULL_BATCH_CLOSE_TIME, SRC_ACCOUNT_NULL_BATCH_NUMBER, SRC_ACCOUNT_NULL_MAX_BATCH_SIZE, SRC_ACCOUNT_NULL_MIN_BATCH_TOTAL, SRC_ACCOUNT_SELECT_CLOSE_FAILURE, SRC_ACCOUNT_SELECT_SQL_FAILURE, SRC_ACCOUNT_UPDATE_ROW_FAILURE, SRC_ACCOUNT_UPDATE_SQL_FAILURE, SRC_BATCH_BAD_ADD_CREDIT_STATE, SRC_BATCH_BAD_ADD_PAYMENT_STATE, SRC_BATCH_BAD_BATCH_IN_CREDIT, SRC_BATCH_BAD_BATCH_IN_PAYMENT, SRC_BATCH_CLOSE_WORK_ITEM_FAILURE, SRC_BATCH_CREATE_ROW_FAILURE, SRC_BATCH_CREATE_SQL_FAILURE, SRC_BATCH_DELETE_ROW_FAILURE, SRC_BATCH_DELETE_SQL_FAILURE, SRC_BATCH_NULL_CREDIT, SRC_BATCH_NULL_ORDER_FOR_CREDIT, SRC_BATCH_NULL_ORDER_FOR_PAYMENT, SRC_BATCH_NULL_PAYMENT, SRC_BATCH_PURGE_INCOMPLETE, SRC_BATCH_SELECT_BATCH_MISSING, SRC_BATCH_SELECT_CLOSE_FAILURE, SRC_BATCH_SELECT_ROW_FAILURE, SRC_BATCH_SELECT_SQL_FAILURE, SRC_BATCH_TIMER_WORK_ITEM_FAILURE, SRC_BATCH_UPDATE_ROW_FAILURE, SRC_BATCH_UPDATE_SQL_FAILURE, SRC_CASSETTE_BATCH_CLOSE_TIME, SRC_CASSETTE_BUNDLE_ID_MISMATCH, SRC_CASSETTE_CARDHOLDERNAME, SRC_CASSETTE_CURRENCY, SRC_CASSETTE_LDBCARDID, SRC_CASSETTE_LDBCARDRMIURL, SRC_CASSETTE_MAX_BATCH_SIZE, SRC_CASSETTE_MIN_BATCH_TOTAL, SRC_CASSETTE_PASSWORD, SRC_CASSETTE_USER, SRC_CREDIT_CREATE_ROW_FAILURE, SRC_CREDIT_CREATE_SQL_FAILURE, SRC_CREDIT_DELETE_ROW_FAILURE, SRC_CREDIT_DELETE_SQL_FAILURE, SRC_CREDIT_SELECT_CLOSE_FAILURE, SRC_CREDIT_SELECT_CREDIT_MISSING, SRC_CREDIT_SELECT_ROW_FAILURE, SRC_CREDIT_SELECT_SQL_FAILURE, SRC_CREDIT_UPDATE_ROW_FAILURE, SRC_CREDIT_UPDATE_SQL_FAILURE, SRC_METHOD_NOT_IMPLEMENTED, SRC_ORDER_CREATE_ROW_FAILURE, SRC_ORDER_CREATE_SQL_FAILURE, SRC_ORDER_DELETE_ROW_FAILURE, SRC_ORDER_DELETE_SQL_FAILURE, SRC_ORDER_SELECT_CLOSE_FAILURE, SRC_ORDER_SELECT_ORDER_MISSING, SRC_ORDER_SELECT_ROW_FAILURE, SRC_ORDER_SELECT_SQL_FAILURE, SRC_ORDER_UPDATE_ROW_FAILURE, SRC_ORDER_UPDATE_SQL_FAILURE, SRC_PAYMENT_CREATE_ROW_FAILURE, SRC_PAYMENT_CREATE_SQL_FAILURE, SRC_PAYMENT_DELETE_ROW_FAILURE, SRC_PAYMENT_DELETE_SQL_FAILURE, SRC_PAYMENT_SELECT_CLOSE_FAILURE, SRC_PAYMENT_SELECT_PAYMENT_MISSING, SRC_PAYMENT_SELECT_ROW_FAILURE, SRC_PAYMENT_SELECT_SQL_FAILURE, SRC_PAYMENT_UPDATE_ROW_FAILURE, SRC_PAYMENT_UPDATE_SQL_FAILURE, SRC_QUERY_ACC_SELECT_SQL_FAILURE, SRC_QUERY_BAT_SELECT_SQL_FAILURE, SRC_QUERY_CRE_SELECT_SQL_FAILURE, SRC_QUERY_ORD_SELECT_SQL_FAILURE, SRC_QUERY_PAY_SELECT_SQL_FAILURE, TBL_ACCOUNT, TBL_BATCH, TBL_CREDIT, TBL_ORDER, TBL_PAYMENT, TRACE_ID, VIEW_ACCOUNT, VIEW_ACCOUNTS, VIEW_ADDRESS, VIEW_AMOUNT, VIEW_APPROVAL, VIEW_BATCH, VIEW_BATCH_CREDITS, VIEW_BATCH_PAYMENTS, VIEW_BATCHES, VIEW_BRAND, VIEW_CLOSE_TIME, VIEW_CLOSED_TO_TRANS, VIEW_CREDIT, VIEW_CREDITS, VIEW_CURRENCY, VIEW_EXPIRY, VIEW_LDBCARD_ID, VIEW_MAX_BATCH_SIZE, VIEW_MERCHANT, VIEW_MERCHANT_NAME, VIEW_MIN_BATCH_TOTAL, VIEW_ORDER, VIEW_ORDERS, VIEW_PAN, VIEW_PASSWORD, VIEW_PAYMENT, VIEW_PAYMENTS, VIEW_POSTAL_CODE, VIEW_REASON, VIEW_URL, VIEW_USER, XDM_ACCOUNT, XDM_ADDRESS, XDM_AMOUNT, XDM_APPROVAL, XDM_BRAND, XDM_CLOSE_TIME, XDM_CLOSED_TO_TRANS, XDM_CURRENCY, XDM_EXPIRY, XDM_LDBCARD_ID, XDM_MAX_BATCH_SIZE, XDM_MIN_BATCH_TOTAL, XDM_PAN, XDM_PASSWORD, XDM_POSTAL_CODE, XDM_REASON, XDM_URL, XDM_USER
 
Constructor Summary
  LdbCardAccount(com.ibm.etill.framework.cassette.AdminRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This constructor is used by the cassette when the framework asks it to service an adminitration request that creates a new account.
protected LdbCardAccount(java.sql.ResultSet argResultSet)
          This method constructs a new account object and initializes the object's data from the current row of the supplied ResultSet.
 
Method Summary
private  void addAccountToList()
          This method is used to add a new account to the list of accounts kept by the account class.
 boolean authorizePayment(LdbCardPayment argCassettePayment)
          This method is used by the payment object whenever it needs to authorize a payment.
 boolean captureCredit(LdbCardCredit argCassetteCredit)
          This method is used by the credit object whenever it needs to capture a credit in the batch.
 boolean capturePayment(LdbCardPayment argCassettePayment, int argAmount)
          This method is used by the payment object whenever it needs to capture a payment in the batch.
private  void connect()
          This method constructs a Connection object used to communicate with the payment engine.
private  java.lang.String convertAmount(int argAmount)
          This method is used to convert a framework amount into a string that is acceptable to the payment engine.
 void createRecord(java.sql.Connection argConnection)
          This method is used by the framework thread (a commitable object) when its commit() method discovers the cassette account object on the framework thread create list.
 void deleteAccount(com.ibm.etill.framework.cassette.AdminRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This method is used by the cassette when the framework asks it to service an adminitration request that deletes an existing account.
 void deleteRecord(java.sql.Connection argConnection)
          This method is used by the framework thread (a commitable object) when its commit() method discovers the cassette account object on the framework thread delete list.
private  void disconnect()
          This method destroys a Connection object used to communicate with the payment engine.
 java.lang.String getAccountNumber()
          This method is used to get the account number of this account.
 int getBatchCloseTime()
          This method is used to get the time of day, specified in minutes after midnight, when this account's open batches should be automatically closed by the cassette.
 java.lang.Integer getBatchCloseTimeObject()
          This method is used to get an object that represents the time of day (specified in minutes after midnight) when this account's open batches will be automatically closed.
 java.lang.String getCurrency()
          This method is used to get the ISO currency code used by this account.
 java.lang.String getLdbCardId()
          This method is used to get the identifier configured in the the payment engine.
 int getMaxBatchSize()
          This method is used to get maximum batch size allowed for this account's batches.
 java.lang.Integer getMaxBatchSizeObject()
          This method is used to get an object that represents the maximum batch size for this account's batches.
 java.lang.String getMerchant()
          This method is used to get the merchant number of this account.
 int getMinBatchTotal()
          This method is used to get minimum batch size allowed when the batch is closed automatically.
 java.lang.Integer getMinBatchTotalObject()
          This method is used to get an object that represents the minimum batch size for batches are that automatically closed at a given time of day.
 java.lang.String getObscurePassword()
          This method is used to get the password necessary to authenticate the user ID when the password will be displayed in a trace.
 java.lang.String getPassword()
          This method is used to get the password necessary to authenticate the user ID.
 java.lang.String getUrl()
          This method is used to get the URL used to locate the Java RMI server for the payment engine.
 java.lang.String getUser()
          This method is used to get the user ID used for the Java RMI connection.
private  void initializeAccount()
          This method is used by all constructors to initialize the number formatter used to convert integer ammounts into strings and to add new accounts to the list of accounts kept by the account class.
static void initializeAccounts()
          This method is used by the cassette when the framework asks the cassette to initialize.
 boolean isBatchCloseTimeConfigured()
          This method is used to determine if the administrator has configured the account to automatically close an open batch at a specified time of day.
 boolean isMaxBatchSizeConfigured()
          This method is used to determine if the administrator has configured the account to automatically close an open batch when that batch reaches a specified size.
 boolean isMinBatchTotalConfigured()
          This method is used to determine if the administrator has configured a minimum batch size for a batch that is closed at a specified time of day.
 void modifyAccount(com.ibm.etill.framework.cassette.AdminRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This method is used by the cassette when the framework asks it to service an adminitration request that modifies an existing account.
static void resurrectAccounts()
          This method is called by the cassette when the framework asks the cassette to read its configuration.
static LdbCardAccount retrieveAccount(java.lang.String argMerchant)
          This method is used by the cassette when the framework requests an account object.
private  com.ibm.etill.framework.payapi.Batch retrieveBatch(com.ibm.etill.framework.payapi.Transaction argFrameworkTransaction)
          This method is used by payment objects to obtain the batch object that currently contains the payment.
 void retrieveBatchAndRemoveCredit(com.ibm.etill.framework.payapi.Credit argFrameworkCredit)
          This method is used by credit objects while processing a RefundReversal command.
 void retrieveBatchAndRemovePayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment)
          This method is used by payment objects while processing a DepositReversal command.
private  com.ibm.etill.framework.payapi.Batch selectBatch()
          This method is used by payment objects to obtain the batch object that will contain the payment when the payment is deposited.
 void selectBatchAndAddCredit(com.ibm.etill.framework.payapi.Credit argFrameworkCredit)
          This method is used by credit objects while processing a Refund command.
 void selectBatchAndAddPayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment)
          This method is used by payment objects while processing a Deposit command.
 boolean settleBatch(LdbCardBatch argCassetteBatch)
          This method is used by the batch object whenever it needs to settle a batch.
 void startAccount(com.ibm.etill.framework.cassette.AdminRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This method is used by the cassette when the framework asks it to service an adminitration request that starts an existing account.
 void stopAccount(com.ibm.etill.framework.cassette.AdminRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This method is used by the cassette when the framework asks it to service an adminitration request that stops an existing account.
 java.lang.String toString()
          This method is used to obtain a string of the object's indentifiers in a form suitable for Trace.trace().
 void updateRecord(java.sql.Connection argConnection)
          This method is used by the framework thread (a commitable object) when its commit() method discovers the cassette account object on the framework thread update list.
static void validateCreateRequest(com.ibm.etill.framework.cassette.AdminRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This method is used by the cassette when validating an adminstration request to create a new account object.
static void validateModifyRequest(com.ibm.etill.framework.cassette.AdminRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This method is used by the cassette when validating an adminstration request to modify an existing account object.
static boolean verifyAccounts()
          This method is used by the cassette when the framework asks the cassette to verify the configuration.
 boolean voidCredit(LdbCardCredit argCassetteCredit)
          This method is used by the credit object whenever it needs to void a credit.
 boolean voidPayment(LdbCardPayment argCassettePayment, int argAmount)
          This method is used by the payment object whenever it needs to void a payment.
 

Field Detail

COPYRIGHT

private static final java.lang.String COPYRIGHT

ICV_KEY_ACCOUNT

private static final java.lang.String ICV_KEY_ACCOUNT
Constants for core engine parameter keys.

These keys are used when passing key/value pairs to the payment engine.


ICV_KEY_ADDRESS

private static final java.lang.String ICV_KEY_ADDRESS

ICV_KEY_AMOUNT

private static final java.lang.String ICV_KEY_AMOUNT

ICV_KEY_APPROVAL

private static final java.lang.String ICV_KEY_APPROVAL

ICV_KEY_CLERK

private static final java.lang.String ICV_KEY_CLERK

ICV_KEY_COMMENT

private static final java.lang.String ICV_KEY_COMMENT

ICV_KEY_EXPIRY

private static final java.lang.String ICV_KEY_EXPIRY

ICV_KEY_REASON

private static final java.lang.String ICV_KEY_REASON

ICV_KEY_STATUS

private static final java.lang.String ICV_KEY_STATUS

ICV_KEY_TYPE

private static final java.lang.String ICV_KEY_TYPE

ICV_KEY_ZIP_CODE

private static final java.lang.String ICV_KEY_ZIP_CODE

ICV_VAL_APPROVED

private static final java.lang.String ICV_VAL_APPROVED
Constants for core engine status values.

These values are returned when when you get the status from a transaction statement that has been executed.


ICV_VAL_BOOK

private static final java.lang.String ICV_VAL_BOOK
Constants for core engine parameter values.

These values are define for the TransactionType key.


ICV_VAL_CREDIT

private static final java.lang.String ICV_VAL_CREDIT

ICV_VAL_SETTLE

private static final java.lang.String ICV_VAL_SETTLE

ICV_VAL_SHIP

private static final java.lang.String ICV_VAL_SHIP

ICV_VAL_VOID

private static final java.lang.String ICV_VAL_VOID

ICV_VAL_VOID_C

private static final java.lang.String ICV_VAL_VOID_C

ICV_ORDER_PREFIX

private static final java.lang.String ICV_ORDER_PREFIX
Constants to wrap the framework order numbers for the core engine.

By using the following tags, the framework order number is recorded in the database. The value has the form ordernumber:paymentnumber for payments or ordernumber:credit for credits.


ICV_ORDER_SEPARATOR

private static final java.lang.String ICV_ORDER_SEPARATOR

ICV_ORDER_SUFFIX

private static final java.lang.String ICV_ORDER_SUFFIX

clsAccountList

private static java.util.Hashtable clsAccountList
This Hashtable contains the entire list of all the merchant accounts. In this implementation, by definition, there is one and only one account for each merchant and only one currency for each account. Furthermore, there is one and only one open batch for each account.

objFrameworkAccount

private com.ibm.etill.framework.admin.AccountAdmin objFrameworkAccount
This account attribute contains a reference to the frameworks account object.

objMerchant

private java.lang.String objMerchant
This account attribute contains the merchant number.

objAccount

private java.lang.String objAccount
This account attribute contains the account number.

objCurrency

private java.lang.String objCurrency
This account attribute contains the ISO currency code supported by this account.

objExp10

private java.lang.String objExp10
This account attribute contains the exponent on 10 used to position the decimal point in integer currency values.

objUser

private java.lang.String objUser
This account attribute contains the ID of the user authorized to connect to this account's RMI server.

objPassword

private java.lang.String objPassword
This account attribute contains the password used to authenticate the accounts user.

objLdbCardId

private java.lang.String objLdbCardId
This account attribute contains the merchant's identifier in the payment engine. *

objUrl

private java.lang.String objUrl
This account attribute contains the universal resource locator for the RMI server used by this account.

objBatchCloseTime

private java.lang.Integer objBatchCloseTime
This account attribute contains the time of day when the cassette should automatically close any open batch. The value represents the time of day in minutes after midnight. The null value has special meaning: the cassette should never automatically close an open batch at a particular time of day.

objMinBatchTotal

private java.lang.Integer objMinBatchTotal
This account attribute contains the minimum batch total for batches that are closed automatically at a particular time of day. The null value has special meaning: any batch with any amount larger than 0 should be closed when the configured time of day is reached.

objMaxBatchSize

private java.lang.Integer objMaxBatchSize
This account attribute contains the maximum batch size for batches that use this account. When the number of items in the batch reach this value, the cassette will automatically close the batch. The null value has special meaning: the cassette should never use the batch size to determine if a batch should be closed automatically.

objFormatter

private java.text.NumberFormat objFormatter
This account attribute contains a number formatter configured to convert currency values into strings.

objDoubleExp10

private double objDoubleExp10
This account attribute contains the exponent on 10 used to position the decimal point in integer currency values.

objConnection

private netverify.remote.client.Connection objConnection
This account attribute contains the connection to the RMI server used by this account.
Constructor Detail

LdbCardAccount

protected LdbCardAccount(java.sql.ResultSet argResultSet)
                  throws java.sql.SQLException,
                         com.ibm.etill.framework.payapi.ETillAbortOperation
This method constructs a new account object and initializes the object's data from the current row of the supplied ResultSet.
Parameters:
argCassette - - The cassette object that is initializing.
argResultSet - - A ResultSet where the current row contains the values to be used to initialize the new account object.
Throws:
java.sql.SQLException - - any failure while reading the database row that contains this object's definition results in this exception.
ETillAbortOperation - - any other failure results in this exception.

LdbCardAccount

public LdbCardAccount(com.ibm.etill.framework.cassette.AdminRequest argRequest,
                      com.ibm.etill.framework.cassette.APIResponse argResponse)
               throws com.ibm.etill.framework.payapi.ETillAbortOperation
This constructor is used by the cassette when the framework asks it to service an adminitration request that creates a new account.

For this cassette, it initializes some attributes using values from the protocol data table found in the request and then uses methods common to all constructors to initialize the other account attributes.

Parameters:
argRequest - - the administration request that was sent to the cassette to create a new account.
argResponse - - the response object to be updated with the result of the operation.
Throws:
ETillAbortOperation - - any failure results in this exception.
Method Detail

resurrectAccounts

public static void resurrectAccounts()
                              throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is called by the cassette when the framework asks the cassette to read its configuration. It is a static method that initalizes all the existing account objects for the cassette.

For this cassette, the method reads every row from the account configuration table and constructs an account object for each row. The account objects are kept in a Hashtable (a static variable) that can be used to retrieve the appropriate account object when required.

Since, by definition, there can only be one account per merchant, the merchant number is used as a key in the Hashtable and if the database table contains more than one account for any given merchant, an exception is thrown.

Throws:
ETillAbortOperation - - any failure results in this exception.

verifyAccounts

public static boolean verifyAccounts()
This method is used by the cassette when the framework asks the cassette to verify the configuration. In this implementation, it is considered an error if the cassette was installed but there are no accounts defined.
Returns:
- True if there is at least one account created during initialization, False otherwise.

initializeAccounts

public static void initializeAccounts()
                               throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the cassette when the framework asks the cassette to initialize.

For this cassette, there is nothing to do because account initialization will continue when the AccountStart command is processed. Other cassettes may take this opportunity to initialize objects associated with the cassette (e.g. brand or currency objects)

Throws:
ETillAbortOperation - - any failure results in this exception.

retrieveAccount

public static LdbCardAccount retrieveAccount(java.lang.String argMerchant)
This method is used by the cassette when the framework requests an account object. The requested account object is found in the Hashtable and returned.

For this cassette, by definition, there can only be one account per merchant, so the key required is the merchant number. Other cassettes may support multiple accounts per merchant and require the account number as well as the merchant number to construct a key.

Parameters:
argMerchant - - The merchant number of the account object to be returned.
argAccountNumber - - The account number of the account object to be returned.
Returns:
- The account object for the specified merchant.

validateCreateRequest

public static void validateCreateRequest(com.ibm.etill.framework.cassette.AdminRequest argRequest,
                                         com.ibm.etill.framework.cassette.APIResponse argResponse)
                                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the cassette when validating an adminstration request to create a new account object.

For this cassette, the protocol data values are validated. Since all the conversions have been performed successfully by the framework (using the parameter validation table provided by the cassette), this method merely validates that all required parameter exist.

Note that this cassette assumes that there is only one account per merchant. If an administrator attempts to start another account for the same merchant, even if the account number is different (and therefore did not get automatically rejected by the framework) it is considered a duplicate account and the request is rejected.

Parameters:
argRequest - - The administration request that is attempting to create a new account for this cassette.
argResponse - - The response object to be updated with the result of the validation
Throws:
ETillAbortOperation - - any failure results in this exception.

validateModifyRequest

public static void validateModifyRequest(com.ibm.etill.framework.cassette.AdminRequest argRequest,
                                         com.ibm.etill.framework.cassette.APIResponse argResponse)
                                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the cassette when validating an adminstration request to modify an existing account object.

For this cassette, the protocol data values are validated. Since the conversions have been performed successfully by the framework (using the parameter validation table provided by the cassette), this method merely validates that the request does not attempt to modify the currency value. The existing orders that use this account cannot change to a new currency simply because the administrator has changed the account's currency.

All other account attributes are related to the payment engine connection and can be changed without affecting the orders that reference this account.

Parameters:
argRequest - - The administration request that is attempting to create a new account for this cassette.
argResponse - - The response object to be updated with the result of the validation
Throws:
ETillAbortOperation - - any failure results in this exception.

initializeAccount

private void initializeAccount()
                        throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by all constructors to initialize the number formatter used to convert integer ammounts into strings and to add new accounts to the list of accounts kept by the account class.
Throws:
ETillAbortOperation - - any failure results in this exception.

addAccountToList

private void addAccountToList()
                       throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used to add a new account to the list of accounts kept by the account class.
Throws:
ETillAbortOperation - - any failure results in this exception.

createRecord

public void createRecord(java.sql.Connection argConnection)
                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the framework thread (a commitable object) when its commit() method discovers the cassette account object on the framework thread create list.
Parameters:
argConnection - - The JDBC database connection to be used for this operation.
Throws:
ETillAbortOperation - - any failure results in this exception.

updateRecord

public void updateRecord(java.sql.Connection argConnection)
                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the framework thread (a commitable object) when its commit() method discovers the cassette account object on the framework thread update list.
Parameters:
argConnection - - The JDBC database connection to be used for this operation.
Throws:
ETillAbortOperation - - any failure results in this exception.

deleteRecord

public void deleteRecord(java.sql.Connection argConnection)
                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the framework thread (a commitable object) when its commit() method discovers the cassette account object on the framework thread delete list.
Parameters:
argConnection - - The JDBC database connection to be used for this operation.
Throws:
ETillAbortOperation - - any failure results in this exception.

modifyAccount

public void modifyAccount(com.ibm.etill.framework.cassette.AdminRequest argRequest,
                          com.ibm.etill.framework.cassette.APIResponse argResponse)
                   throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the cassette when the framework asks it to service an adminitration request that modifies an existing account.

For this cassette, it re-initializes its attributes using values from the protocol data table found in the request and adds the object to the update list of the current commit point.

Parameters:
argRequest - - the administration request that was sent to the cassette to modify the account.
argResponse - - the response object to be updated with the result of the operation.
Throws:
ETillAbortOperation - - any failure results in this exception.

deleteAccount

public void deleteAccount(com.ibm.etill.framework.cassette.AdminRequest argRequest,
                          com.ibm.etill.framework.cassette.APIResponse argResponse)
                   throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the cassette when the framework asks it to service an adminitration request that deletes an existing account.

For this cassette, it adds this object to the delete list of the current commit point.

Parameters:
argRequest - - the administration request that was sent to the cassette to delete the account.
argResponse - - the response object to be updated with the result of the operation.
Throws:
ETillAbortOperation - - any failure results in this exception.

startAccount

public void startAccount(com.ibm.etill.framework.cassette.AdminRequest argRequest,
                         com.ibm.etill.framework.cassette.APIResponse argResponse)
                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the cassette when the framework asks it to service an adminitration request that starts an existing account.

For this cassette, it creates a connection to the payment engine and then starts the service threads for any batch associated with this account.

Parameters:
argRequest - - the administration request that was sent to the cassette to start the account.
argResponse - - the response object to be updated with the result of the operation.
Throws:
ETillAbortOperation - - any failure results in this exception.

stopAccount

public void stopAccount(com.ibm.etill.framework.cassette.AdminRequest argRequest,
                        com.ibm.etill.framework.cassette.APIResponse argResponse)
                 throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the cassette when the framework asks it to service an adminitration request that stops an existing account.

For this cassette, it breaks a connection to the payment engine.

Parameters:
argRequest - - the administration request that was sent to the cassette to start the account.
argResponse - - the response object to be updated with the result of the operation.
Throws:
ETillAbortOperation - - any failure results in this exception.

selectBatchAndAddPayment

public void selectBatchAndAddPayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment)
                              throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by payment objects while processing a Deposit command. It finds the appropriate batch and adds the payment to the batch.

The method must be synchronized because framework API locks do not prevent race conditions between automatic batch close requests and API requests that affect the contents of the batch (Deposit, DepositReversal, Refund and RefundReversal). Synchronizing on the cassette account object prevents one thread from changing the contents of the batch a micro-moment after some other thread has triggered an automatic batch close.

Parameters:
argFrameworkPayment - - a framework payment that is to be added to a batch.
Throws:
ETillAbortOperation - - any error results in this exception

selectBatchAndAddCredit

public void selectBatchAndAddCredit(com.ibm.etill.framework.payapi.Credit argFrameworkCredit)
                             throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by credit objects while processing a Refund command. It finds the appropriate batch and adds the credit to the batch.

The method must be synchronized because framework API locks do not prevent race conditions between automatic batch close requests and API requests that affect the contents of the batch (Deposit, DepositReversal, Refund and RefundReversal). Synchronizing on the cassette account object prevents one thread from changing the contents of the batch a micro-moment after some other thread has triggered an automatic batch close.

Parameters:
argFrameworkCredit - - a framework credit that is to be added to a batch.
Throws:
ETillAbortOperation - - any error results in this exception

retrieveBatchAndRemovePayment

public void retrieveBatchAndRemovePayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment)
                                   throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by payment objects while processing a DepositReversal command. It retrieves the batch that contains the the payment and removes the payment from the batch.

The method must be synchronized because framework API locks do not prevent race conditions between automatic batch close requests and API requests that affect the contents of the batch (Deposit, DepositReversal, Refund and RefundReversal). Synchronizing on the cassette account object prevents one thread from changing the contents of the batch a micro-moment after some other thread has triggered an automatic batch close.

Parameters:
argFrameworkPayment - - a framework payment that is to be removed from its batch.
Throws:
ETillAbortOperation - - any error results in this exception

retrieveBatchAndRemoveCredit

public void retrieveBatchAndRemoveCredit(com.ibm.etill.framework.payapi.Credit argFrameworkCredit)
                                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by credit objects while processing a RefundReversal command. It retrieves the batch that contains the the credit and removes the credit from the batch.

The method must be synchronized because framework API locks do not prevent race conditions between automatic batch close requests and API requests that affect the contents of the batch (Deposit, DepositReversal, Refund and RefundReversal). Synchronizing on the cassette account object prevents one thread from changing the contents of the batch a micro-moment after some other thread has triggered an automatic batch close.

Parameters:
argFrameworkCredit - - a framework credit that is to be removed from its batch.
Throws:
ETillAbortOperation - - any error results in this exception

selectBatch

private com.ibm.etill.framework.payapi.Batch selectBatch()
                                                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by payment objects to obtain the batch object that will contain the payment when the payment is deposited. It is also used by credit objects to obtain the batch object that will contain the credit when the credit is refunded.

The method must be synchronized because framework API locks do not prevent race conditions between automatic batch open requests and API requests that add a transaction to a batch (Deposit and Refund). Synchronizing on the cassette account object prevents one thread from triggering an automatic batch open when no suitable batch was found a micro-moment after some other thread has triggered a batch open request for the same reason.

Returns:
- the framework batch object of the current batch.
Throws:
ETillAbortOperation - - any error results in this exception

retrieveBatch

private com.ibm.etill.framework.payapi.Batch retrieveBatch(com.ibm.etill.framework.payapi.Transaction argFrameworkTransaction)
                                                    throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by payment objects to obtain the batch object that currently contains the payment. It is also used by credit objects to obtain the batch object that currently contains the credit.
Parameters:
argFrameworkTransaction - - a framework transaction (it dosen't matter if it is a framework payment or a framework credit) that is contained in the batch to be retrieved
Returns:
- the framework batch object of the current batch.
Throws:
ETillAbortOperation - - any error results in this exception

getMerchant

public java.lang.String getMerchant()
This method is used to get the merchant number of this account.
Returns:
- The merchant number.

getAccountNumber

public java.lang.String getAccountNumber()
This method is used to get the account number of this account.
Returns:
- The account number.

getCurrency

public java.lang.String getCurrency()
This method is used to get the ISO currency code used by this account.
Returns:
- The ISO currency code.

getUser

public java.lang.String getUser()
This method is used to get the user ID used for the Java RMI connection.
Returns:
- The user ID.

getPassword

public java.lang.String getPassword()
This method is used to get the password necessary to authenticate the user ID.
Returns:
- The user's password.

getObscurePassword

public java.lang.String getObscurePassword()
This method is used to get the password necessary to authenticate the user ID when the password will be displayed in a trace.
Returns:
- A string of asterisks the same length as the password.

getLdbCardId

public java.lang.String getLdbCardId()
This method is used to get the identifier configured in the the payment engine.
Returns:
- The ID used by the payment engine to identify the merchant using the account.

getUrl

public java.lang.String getUrl()
This method is used to get the URL used to locate the Java RMI server for the payment engine.
Returns:
- The URL that locates the RMI server.

isBatchCloseTimeConfigured

public boolean isBatchCloseTimeConfigured()
This method is used to determine if the administrator has configured the account to automatically close an open batch at a specified time of day. If it returns false, the automatic time of day close should not be performed. If it returns true, the getBatchCloseTime() method should be used to obtain the time of day specified in minutes after midnight.
Returns:
- True if this account has been configured to automatically close an open batch at a specified time of day, false otherwise.

getBatchCloseTime

public int getBatchCloseTime()
This method is used to get the time of day, specified in minutes after midnight, when this account's open batches should be automatically closed by the cassette.
Returns:
- The number of minutes after midnight when an open batch should be automatically closed.

getBatchCloseTimeObject

public java.lang.Integer getBatchCloseTimeObject()
This method is used to get an object that represents the time of day (specified in minutes after midnight) when this account's open batches will be automatically closed.
Returns:
- Either null or a reference to an Integer object with a value equal to the configured batch close time.

isMinBatchTotalConfigured

public boolean isMinBatchTotalConfigured()
This method is used to determine if the administrator has configured a minimum batch size for a batch that is closed at a specified time of day. If it returns false, no minimum batch size was specified, so an automatic close should be performed if there are one or more items in the batch. If it returns true, the getMinBatchTotal() method should be used to obtain the minimum batch size and, if the batch size is smaller, the automatic time of day close should be aborted.
Returns:
- True if a minimum batch size has been configured, false otherwise.

getMinBatchTotal

public int getMinBatchTotal()
This method is used to get minimum batch size allowed when the batch is closed automatically. If the number of items in the batch is less than the minimum at the given time of day, the automatic close will be abandoned.
Returns:
- The minimum number of batch items that must exist in an open batch before it is automatically closed at the given time of day.

getMinBatchTotalObject

public java.lang.Integer getMinBatchTotalObject()
This method is used to get an object that represents the minimum batch size for batches are that automatically closed at a given time of day.
Returns:
- Either null or a reference to an Integer object with a value equal to the configured minimum batch size.

isMaxBatchSizeConfigured

public boolean isMaxBatchSizeConfigured()
This method is used to determine if the administrator has configured the account to automatically close an open batch when that batch reaches a specified size. If it returns false, the automatic close should not be performed. If it returns true, the getMaxBatchSize() method should be used to obtain the batch size that will trigger the automatic close.
Returns:
- True if this account has been configured to automatically close an open batch when the batch has reached a specified size, false otherwise.

getMaxBatchSize

public int getMaxBatchSize()
This method is used to get maximum batch size allowed for this account's batches. If the number of items in the batch reaches this value, the cassette will automatically close the batch.
Returns:
- The maximum number of batch items allowed in an open batch.

getMaxBatchSizeObject

public java.lang.Integer getMaxBatchSizeObject()
This method is used to get an object that represents the maximum batch size for this account's batches.
Returns:
- Either null or a reference to an Integer object with a value equal to the configured maximum batch size.

toString

public java.lang.String toString()
This method is used to obtain a string of the object's indentifiers in a form suitable for Trace.trace(). Each identifier is separated with a new line character.
Returns:
- A string containing the object's identifiers.

connect

private void connect()
              throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method constructs a Connection object used to communicate with the payment engine.
Throws:
ETillAbortOperation - - any failure results in this exception.

disconnect

private void disconnect()
                 throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method destroys a Connection object used to communicate with the payment engine.
Throws:
ETillAbortOperation - - any failure results in this exception.

authorizePayment

public boolean authorizePayment(LdbCardPayment argCassettePayment)
                         throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the payment object whenever it needs to authorize a payment.
Parameters:
argCassettePayment - - The cassette's payment object.
Returns:
- True if the authorization is approved, False otherwise.
Throws:
ETillAbortOperation - - any failure results in this exception.

capturePayment

public boolean capturePayment(LdbCardPayment argCassettePayment,
                              int argAmount)
                       throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the payment object whenever it needs to capture a payment in the batch.
Parameters:
argCassettePayment - - The cassette's payment object.
argAmount - - The amount to be captured.
Returns:
- True if the authorization is approved, False otherwise.
Throws:
ETillAbortOperation - - any failure results in this exception.

voidPayment

public boolean voidPayment(LdbCardPayment argCassettePayment,
                           int argAmount)
                    throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the payment object whenever it needs to void a payment.
Parameters:
argCassettePayment - - The cassette's payment object.
argAmount - - The amount to be voided.
Returns:
- True if the authorization is approved, False otherwise.
Throws:
ETillAbortOperation - - any failure results in this exception.

captureCredit

public boolean captureCredit(LdbCardCredit argCassetteCredit)
                      throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the credit object whenever it needs to capture a credit in the batch.
Parameters:
argCassetteCredit - - The cassette's credit object.
Returns:
- True if the authorization is approved, False otherwise.
Throws:
ETillAbortOperation - - any failure results in this exception.

voidCredit

public boolean voidCredit(LdbCardCredit argCassetteCredit)
                   throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the credit object whenever it needs to void a credit.
Parameters:
argCassetteCredit - - The cassette's credit object.
Returns:
- True if the authorization is approved, False otherwise.
Throws:
ETillAbortOperation - - any failure results in this exception.

settleBatch

public boolean settleBatch(LdbCardBatch argCassetteBatch)
                    throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the batch object whenever it needs to settle a batch.
Parameters:
argBatch - - The cassette's batch object.
Returns:
- True if the settlement succeeds, False otherwise.
Throws:
ETillAbortOperation - - any failure results in this exception.

convertAmount

private java.lang.String convertAmount(int argAmount)
This method is used to convert a framework amount into a string that is acceptable to the payment engine. The account's data formatter has been initialized to understand the currency symbol and the decimal separator required for the currency used.
Parameters:
argAmount - - The amount to be converted.
Returns:
- The amount converted into a string acceptable by the payment engine.