com.ibm.etill.kitcashcassette
Class KitCashPurchase

java.lang.Object
  |
  +--com.ibm.etill.kitcashcassette.KitCashPurchase
All Implemented Interfaces:
com.ibm.etill.framework.archive.Archivable, com.ibm.etill.framework.cassette.CassetteOrder, com.ibm.etill.framework.cassette.CassetteTransaction, com.ibm.etill.framework.payapi.FrameworkReturnCodes, KitCashConstants, KitCashFSMConstants, KitCashFSMUser, com.ibm.etill.framework.payapi.PaymentAPIConstants

public class KitCashPurchase
extends java.lang.Object
implements com.ibm.etill.framework.cassette.CassetteOrder, com.ibm.etill.framework.cassette.CassetteTransaction, com.ibm.etill.framework.payapi.PaymentAPIConstants, KitCashFSMUser, KitCashFSMConstants, KitCashConstants

KitCashPurchase objects represent purchases made by consumers. They are created by the KitCashCassette object whenever ReceivePayment API commands are issued for the KitCash cassette.

The state of a KitCashPurchase object is stored in the KITCASHPURCHASE database table so that they can be recovered in the event that the Payment Manager shuts down mid-way through the life of the purchase object.

Purchase objects use the KitCash finite state machine to determine what actions should be performed based on what inputs are received.

Since multiple payments against a single order are not permitted by the KitCash payment method, KitCashPurchase objects hold both cassette-specific order information and cassette-specific payment information. If the payment method were to allow mutiple payments, this class would probably have to be split into KitCashOrder and KitCashPayment classes.

The class contains a constructor, getter and setter methods, methods to invoke and respond to the KitCash finite state machine, and methods to store and retrieve cassette specific information on the KITCASHPURCHASE database table.


Fields inherited from interface com.ibm.etill.framework.payapi.PaymentAPIConstants
ABOUT, ABOUT_TOKEN, ACCEPT_PAYMENT, ACCEPTPAYMENT_TOKEN, ACCEPTPAYMENTAUTOAPPROVE, ACCEPTPAYMENTAUTOAPPROVE_TOKEN, ACCEPTPAYMENTAUTODEPOSIT, ACCEPTPAYMENTAUTODEPOSIT_TOKEN, ACCOUNTNUMBER, ACCOUNTNUMBER_TOKEN, ACCOUNTTITLE, ACCOUNTTITLE_TOKEN, ADMINHOSTNAME, ADMINHOSTNAME_TOKEN, AMOUNT, AMOUNT_TOKEN, AMOUNTEXP10, AMOUNTEXP10_TOKEN, APPROVALEXPIRATION, APPROVALEXPIRATION_TOKEN, APPROVE_PAYMENT, APPROVE_REVERSAL, APPROVE_TOKEN, APPROVEFLAG, APPROVEFLAG_TOKEN, APPROVEREVERSAL_TOKEN, ATTEMPT, ATTEMPT_ACTION, AVS_COMPLETE_MATCH, AVS_NO_MATCH, AVS_OTHER_RESPONSE, AVS_POSTALCODE_MATCH, AVS_STREETADDRESS_MATCH, BATCH_BALANCED, BATCH_CLOSED, BATCH_CLOSING, BATCH_NOT_YET_BALANCED, BATCH_OPEN, BATCH_OPENING, BATCH_OUT_OF_BALANCE, BATCH_PENDING_DEPRECATED, BATCHCLOSE_TOKEN, BATCHENTRY_DEPOSIT, BATCHENTRY_DEPOSITREVERSAL, BATCHENTRY_REFUND, BATCHENTRY_REFUNDREVERSAL, BATCHID, BATCHID_TOKEN, BATCHITEM_DEPOSIT, BATCHITEM_DEPOSITREVERSAL, BATCHITEM_REFUND, BATCHITEM_REFUNDREVERSAL, BATCHNUMBER, BATCHNUMBER_TOKEN, BATCHOPEN_TOKEN, BATCHPURGE_TOKEN, BECOME_MEMBER_TOKEN, CANCEL_ORDER, CANCELORDER_TOKEN, CANCELURL, CANCELURL_TOKEN, CASSETTECOMMAND, CASSETTECOMMAND_TOKEN, CASSETTECONTROL, CASSETTECONTROL_TOKEN, CASSETTENAME, CASSETTENAME_TOKEN, CHARSET, CHARSET_TOKEN, CLOSE_BATCH, CLOSE_ORDER, CLOSEORDER_TOKEN, COMMAND, COMMANDNAME_LENGTH, COMMTYPE, COMMTYPE_TOKEN, CREATE_ACCOUNT, CREATE_ACCOUNT_TOKEN, CREATE_MERCHANT, CREATE_MERCHANT_TOKEN, CREATE_MERCHANTCASSETTEOBJECT, CREATE_MERCHANTCASSETTEOBJECT_TOKEN, CREATE_MEREVENTLISTENER, CREATE_MEREVENTLISTENER_TOKEN, CREATE_PAYSYSTEM, CREATE_PAYSYSTEM_TOKEN, CREATE_SNMEVENTLISTENER, CREATE_SNMEVENTLISTENER_TOKEN, CREATE_SYSTEMCASSETTEOBJECT, CREATE_SYSTEMCASSETTEOBJECT_TOKEN, CREDIT_CLOSED, CREDIT_DECLINED, CREDIT_PENDING, CREDIT_REFUNDED, CREDIT_RESET, CREDIT_VOID, CREDITNUMBER, CREDITNUMBER_TOKEN, CURRENCY, CURRENCY_TOKEN, DEFAULT_SOCKS_PORT, DELETE_ACCOUNT, DELETE_ACCOUNT_TOKEN, DELETE_BATCH, DELETE_MERCHANT, DELETE_MERCHANT_TOKEN, DELETE_MERCHANTCASSETTEOBJECT, DELETE_MERCHANTCASSETTEOBJECT_TOKEN, DELETE_MEREVENTLISTENER, DELETE_MEREVENTLISTENER_TOKEN, DELETE_PAYSYSTEM, DELETE_PAYSYSTEM_TOKEN, DELETE_SNMEVENTLISTENER, DELETE_SNMEVENTLISTENER_TOKEN, DELETE_SYSTEMCASSETTEOBJECT, DELETE_SYSTEMCASSETTEOBJECT_TOKEN, DELETE_USER, DELETE_USER_TOKEN, DELETEBATCH_TOKEN, DELETEORDER, DELETEORDER_TOKEN, DEPOSIT_PAYMENT, DEPOSIT_REVERSAL, DEPOSIT_TOKEN, DEPOSITFLAG, DEPOSITFLAG_TOKEN, DEPOSITREVERSAL_TOKEN, DO_NOT_ATTEMPT, DO_NOT_ATTEMPT_ACTION, ENABLED, ENABLED_TOKEN, ETAPIVERSION, ETAPIVERSION_TOKEN, ETILLHOSTNAME, ETILLHOSTNAME_TOKEN, ETORDER_CTYPECHARSET_LENGTH, EVENTTYPE, EVENTTYPE_TOKEN, FAILUREURL, FAILUREURL_TOKEN, FINANCIALINSTITUTION, FINANCIALINSTITUTION_TOKEN, flagValuesSupported, FORCE, FORCE_TOKEN, ISO8859_1, LISTENERURL, LISTENERURL_TOKEN, LOCALHOST, LOGPATH, MAX_ACCOUNT_TITLE_LENGTH, MAX_AMOUNT_EXP10_LENGTH, MAX_AMOUNT_LENGTH, MAX_APPROVEFLAG_LENGTH, MAX_COMMAND_LENGTH, MAX_CTYPECHARSET_LENGTH, MAX_ETILLHOSTNAME_LENGTH, MAX_FILTER_LENGTH, MAX_FINANCIALINSTITUTION_LENGTH, MAX_FLAG_VALUE, MAX_GENERAL_API_NUMBER_LENGTH, MAX_MERCHANT_NUMBER_LENGTH, MAX_MERCHANT_TITLE_LENGTH, MAX_NUMERICTOKEN_LENGTH, MAX_NUMERICTOKEN_VALUE, MAX_ORDERDATA1_LENGTH, MAX_ORDERDATA2_LENGTH, MAX_ORDERDATA3_LENGTH, MAX_ORDERDATA4_LENGTH, MAX_ORDERDATA5_LENGTH, MAX_ORDERDESCRIPTION_LENGTH, MAX_ORDERNUMBER_LENGTH, MAX_PARAMETER_LENGTH, MAX_PATH_LENGTH, MAX_PAYMENT_SYSTEM_LENGTH, MAX_PROTOCOLDATA_LENGTH, MAX_TRANSACTIONID_LENGTH, MAX_URL_LENGTH, MAX_USER_NAME_LENGTH, MERCHANTNUMBER, MERCHANTNUMBER_TOKEN, MERCHANTNUMBERS, MERCHANTTITLE, MERCHANTTITLE_TOKEN, MIN_MERCHANT_NUMBER_LENGTH, MIN_NUMERICTOKEN_LENGTH, MIN_ORDERDESCRIPTION_LENGTH, MIN_ORDERNUMBER_LENGTH, MODIFY_ACCOUNT, MODIFY_ACCOUNT_TOKEN, MODIFY_CASSETTE, MODIFY_CASSETTE_TOKEN, MODIFY_MERCHANT, MODIFY_MERCHANT_TOKEN, MODIFY_MERCHANTCASSETTEOBJECT, MODIFY_MERCHANTCASSETTEOBJECT_TOKEN, MODIFY_MEREVENTLISTENER, MODIFY_MEREVENTLISTENER_TOKEN, MODIFY_PAYSERVER, MODIFY_PAYSERVER_TOKEN, MODIFY_PAYSYSTEM, MODIFY_PAYSYSTEM_TOKEN, MODIFY_SNMEVENTLISTENER, MODIFY_SNMEVENTLISTENER_TOKEN, MODIFY_SYSPLEX, MODIFY_SYSPLEX_TOKEN, MODIFY_SYSTEMCASSETTEOBJECT, MODIFY_SYSTEMCASSETTEOBJECT_TOKEN, MODIFY_USERSTATUS, MODIFY_USERSTATUS_TOKEN, NDHOSTNAME, NDHOSTNAME_TOKEN, NEWPASSWORD, NEWPASSWORD_TOKEN, OBJECTNAME, OBJECTNAME_TOKEN, OPEN_BATCH, ORDER_CANCELED, ORDER_CLOSED, ORDER_ORDERED, ORDER_PENDING, ORDER_REFUNDABLE, ORDER_REJECTED, ORDER_REQUESTED, ORDER_RESET, ORDERDATA1, ORDERDATA1_TOKEN, ORDERDATA2, ORDERDATA2_TOKEN, ORDERDATA3, ORDERDATA3_TOKEN, ORDERDATA4, ORDERDATA4_TOKEN, ORDERDATA5, ORDERDATA5_TOKEN, ORDERDESCRIPTION, ORDERDESCRIPTION_TOKEN, ORDERNUMBER, ORDERNUMBER_TOKEN, ORDERURL, ORDERURL_TOKEN, PARAMETERNAME_LENGTH, PASSWORD, PASSWORD_TOKEN, PAYMENT_APPROVALEXPIRED, PAYMENT_APPROVED, PAYMENT_CLOSED, PAYMENT_DECLINED, PAYMENT_DEPOSITED, PAYMENT_PENDING, PAYMENT_RESET, PAYMENT_VOID, PAYMENTAMOUNT, PAYMENTAMOUNT_TOKEN, PAYMENTGROUPNAME, PAYMENTGROUPNAME_TOKEN, PAYMENTNUMBER, PAYMENTNUMBER_TOKEN, PAYMENTTYPE, PAYMENTTYPE_TOKEN, PD_AUTHCODE, PD_AUXILIARY1, PD_AUXILIARY2, PD_AVS_CITY, PD_AVS_COUNTRYCODE, PD_AVS_LOCATIONID, PD_AVS_POSTALCODE, PD_AVS_PREFIX, PD_AVS_STATEPROV, PD_AVS_STATEPROVINCE, PD_AVS_STREETADDR, PD_AVS_STREETADDRESS, PD_AVSCODE, PD_BATCHCLOSETIME, PD_BILL_CITY, PD_BILL_COUNTRYCOD, PD_BILL_COUNTRYCODE, PD_BILL_POSTALCODE, PD_BILL_PREFIX, PD_BILL_STATEPROV, PD_BILL_STATEPROVINCE, PD_BILL_STREETADDR, PD_BILL_STREETADDRESS, PD_BRAND, PD_BUYERNAME, PD_CANCELURL, PD_CARDHOLDERNAME, PD_CARDVERIFYCODE, PD_CHARSET, PD_CHECKINGACCOUNTNUMBER, PD_CHECKROUTINGNUMBER, PD_CITY, PD_COUNTRYCODE, PD_CURRENCY, PD_DECLINECODE, PD_DECLINEREASON, PD_EMAILADDRESS, PD_EXPIRY, PD_FAILUREURL, PD_FIBATCHID, PD_ITEM_COMMODITYCODE, PD_ITEM_DESCRIPTOR, PD_ITEM_DISCOUNTAMOUNT, PD_ITEM_DISCOUNTINDICATOR, PD_ITEM_LOCALTAXAMOUNT, PD_ITEM_LOCALTAXRATE, PD_ITEM_NATIONALTAXAMOUNT, PD_ITEM_NATIONALTAXRATE, PD_ITEM_NATIONALTAXTYPE, PD_ITEM_NETCOST, PD_ITEM_OTHERTAXAMOUNT, PD_ITEM_PRODUCTCODE, PD_ITEM_QUANTITY, PD_ITEM_SKU, PD_ITEM_TOTALCOST, PD_ITEM_UNITCOST, PD_ITEM_UNITOFMEASURE, PD_MAXBATCHSIZE, PD_METHOD, PD_ORDERDESCRIPTION, PD_PAN, PD_PCARD_ALTERNATETAXID, PD_PCARD_CUSTOMERDUTYTARIFFREFERENCE, PD_PCARD_CUSTOMERREFERENCENUMBER, PD_PCARD_CUSTOMERSERVICEPHONE, PD_PCARD_DISCOUNTAMOUNT, PD_PCARD_DUTYAMOUNT, PD_PCARD_DUTYREFERENCE, PD_PCARD_LOCALTAXAMOUNT, PD_PCARD_MERCHANTCITYCODE, PD_PCARD_MERCHANTCOUNTRYCODE, PD_PCARD_MERCHANTDUTYTARIFFREFERENCE, PD_PCARD_MERCHANTLOCATIONID, PD_PCARD_MERCHANTNAME, PD_PCARD_MERCHANTORDERNUMBER, PD_PCARD_MERCHANTPOSTALCODE, PD_PCARD_MERCHANTSTATEPROVINCE, PD_PCARD_MERCHANTTAXID, PD_PCARD_MERCHANTTYPE, PD_PCARD_NATIONALTAXAMOUNT, PD_PCARD_NATIONALTAXINVOICEREFERENCE, PD_PCARD_NATIONALTAXRATE, PD_PCARD_ORDERSUMMARY, PD_PCARD_OTHERTAXAMOUNT, PD_PCARD_PRINTCUSTOMERSERVICEPHONENUMBER, PD_PCARD_SHIPFROMCITYCODE, PD_PCARD_SHIPFROMCOUNTRYCODE, PD_PCARD_SHIPFROMLOCATIONID, PD_PCARD_SHIPFROMPOSTALCODE, PD_PCARD_SHIPFROMSTATEPROVINCE, PD_PCARD_SHIPPINGAMOUNT, PD_PCARD_SHIPPINGNATIONALTAXAMOUNT, PD_PCARD_SHIPPINGNATIONALTAXRATE, PD_PCARD_SHIPTOCITYCODE, PD_PCARD_SHIPTOCOUNTRYCODE, PD_PCARD_SHIPTOLOCATIONID, PD_PCARD_SHIPTOPOSTALCODE, PD_PCARD_SHIPTOSTATEPROVINCE, PD_PCARD_SUMMARYCOMMODITYCODE, PD_PCARD_TAXEXEMPTINDICATOR, PD_PCARD_TOTALTAXAMOUNT, PD_PHONENUMBER, PD_POSTALCODE, PD_SERVICEURL, PD_SHIP_CITY, PD_SHIP_COUNTRYCOD, PD_SHIP_COUNTRYCODE, PD_SHIP_POSTALCODE, PD_SHIP_PREFIX, PD_SHIP_STATEPROV, PD_SHIP_STATEPROVINCE, PD_SHIP_STREETADDR, PD_SHIP_STREETADDRESS, PD_SPLITALLOWED, PD_STATEPROVINCE, PD_STREETADDRESS, PD_STREETADDRESS2, PD_SUCCESSURL, PLEXNAME, PLEXNAME_TOKEN, PURGE_BATCH, RECEIVE_PAYMENT, RECEIVEPAYMENT_TOKEN, RECEIVEPAYMENTAUTOAPPROVE, RECEIVEPAYMENTAUTOAPPROVE_TOKEN, RECEIVEPAYMENTAUTODEPOSIT, RECEIVEPAYMENTAUTODEPOSIT_TOKEN, REFUND_PAYMENT, REFUND_REVERSAL, REFUND_TOKEN, REFUNDREVERSAL_TOKEN, ROLE, ROLES, ROLES_TOKEN, SERVICEURL, SERVICEURL_TOKEN, SET_USERACCESSRIGHTS, SET_USERACCESSRIGHTS_TOKEN, SOCKSHOST, SOCKSHOST_TOKEN, SOCKSPORT, SOCKSPORT_TOKEN, SPLITALLOWED, SPLITALLOWED_TOKEN, START, START_ACCOUNT_TOKEN, START_CASSETTE_TOKEN, START_PAYSYSTEM_TOKEN, STOP, STOP_ACCOUNT_TOKEN, STOP_CASSETTE_TOKEN, STOP_PAYSYSTEM_TOKEN, STOP_TOKEN, SUCCESSURL, SUCCESSURL_TOKEN, SYSPLEXFLAG, SYSPLEXFLAG_TOKEN, TRACEFILESIZE, TRACELEVEL1_TOKEN, TRACELEVEL2_TOKEN, TRACELEVEL3_TOKEN, TRACEOFF_TOKEN, TRACEON_TOKEN, TRACESETTING, TRANSACTIONID, TRANSACTIONID_TOKEN, UNSPECIFIED, UNSPECIFIED_ACTION, USER, USER_TOKEN, UTF8, VALID_CURRENCY_LENGTH, xorBaseInteger
 
Fields inherited from interface com.ibm.etill.framework.payapi.FrameworkReturnCodes
PRC_AUTHENTICATION_ERROR, PRC_AUTHORIZATION_ERROR, PRC_AUTOAPPROVE_FAILED, PRC_AUTODEPOSIT_FAILED, PRC_BATCH_ERROR, PRC_CASSETTE_ERROR, PRC_CASSETTE_NOTRUNNING, PRC_CASSETTE_NOTVALID, PRC_COMMAND_NOT_SUPPORTED, PRC_COMMUNICATION_ERROR, PRC_COREQUISITE_PARAMETER_NOT_FOUND, PRC_CRYPTO_ERROR, PRC_DATABASE_ERROR, PRC_DELETE_ERROR, PRC_DUPLICATE_OBJECT, PRC_DUPLICATE_PARAMETER_VALUE_NOT_ALLOWED, PRC_FINANCIAL_FAILURE, PRC_INPUT_ERROR, PRC_INTERNAL_ETILL_ERROR, PRC_INVALID_PARAMETER_COMBINATION, PRC_NOT_ACTIVE, PRC_OBSOLETE_API_VERSION, PRC_OPERATION_PENDING, PRC_OPERATION_SUCCESS, PRC_PARAMETER_FORMAT_ERROR, PRC_PARAMETER_MISMATCH, PRC_PARAMETER_NOT_ALLOWED, PRC_PARAMETER_NOT_FOUND, PRC_PARAMETER_NULL_VALUE, PRC_PARAMETER_TOO_LONG, PRC_PARAMETER_TOO_SHORT, PRC_PARAMETER_VALUE_ERROR, PRC_REALM, PRC_SERVLET_INIT_ERROR, PRC_SUPPORTED_IN_SYSPLEX_ADMIN_ONLY, PRC_UNDEFINED_OBJECT, PRC_UNHANDLED_EXCEPTION, PRC_UNSUPPORTED_API_VERSION, PRC_UNSUPPORTED_IN_SYSPLEX, PRC_VERB_NOT_VALID_IN_PRESENT_STATE, PRC_WEBSPHERE, PRC_XML_ERROR, RC_ACCEPTPAYMENTAUTOAPPROVE, RC_ACCEPTPAYMENTAUTODEPOSIT, RC_ACCOUNT, RC_ACCOUNT_ADMIN, RC_ACCOUNTNUMBER, RC_ACCOUNTTITLE, RC_ADMINHOSTNAME, RC_AMOUNT, RC_AMOUNT_RANGE_INVALID, RC_AMOUNTEXP10, RC_AP_APPROVEFLAG, RC_AP_DEPOSITFLAG, RC_API_INITIALIZE_FAILURE, RC_APPEXPDELAY, RC_APPROVALEXPIRATION, RC_APPROVEFLAG, RC_APPROVESALLOWED, RC_ASYNCHAPPDELAY, RC_AUTHENTICATED_USER_NOT_GIVEN, RC_AUTOMATIC_CREATION, RC_BAD_REALM, RC_BATCH, RC_BATCH_EMPTY, RC_BATCHNUMBER, RC_BRAND, RC_CANCELURL, RC_CANNOT_FIND_PROPERTY_FILE, RC_CASSETTE_ADMIN, RC_CASSETTE_AMOUNT_WOULD_EXCEED_ORDER_AMOUNT, RC_CASSETTE_APPROVE_NO_DEPOSIT, RC_CASSETTE_AUTHCODE, RC_CASSETTE_AUTHCODE_AND_DECLINEREASON, RC_CASSETTE_AUXILIARY1, RC_CASSETTE_AUXILIARY2, RC_CASSETTE_AVS_CITY, RC_CASSETTE_AVS_COUNTRYCODE, RC_CASSETTE_AVS_LOCATIONID, RC_CASSETTE_AVS_POSTALCODE, RC_CASSETTE_AVS_STATEPROVINCE, RC_CASSETTE_AVS_STREETADDRESS, RC_CASSETTE_AVSCODE, RC_CASSETTE_AVSDATA, RC_CASSETTE_BATCH_AMOUNTEXP10, RC_CASSETTE_BATCH_BALANCE_ERROR, RC_CASSETTE_BATCH_CURRENCY, RC_CASSETTE_BATCH_ERROR, RC_CASSETTE_BATCH_ID, RC_CASSETTE_BATCHCLOSETIME, RC_CASSETTE_BILL_CITY, RC_CASSETTE_BILL_COUNTRYCODE, RC_CASSETTE_BILL_POSTALCODE, RC_CASSETTE_BILL_STATEPROVINCE, RC_CASSETTE_BILL_STREETADDRESS, RC_CASSETTE_BILLINGDATA, RC_CASSETTE_BRAND, RC_CASSETTE_BUYERNAME, RC_CASSETTE_CARDHOLDERNAME, RC_CASSETTE_CARDVERIFYCODE, RC_CASSETTE_CHECKINGACCOUNTNUMBER, RC_CASSETTE_CHECKROUTINGNUMBER, RC_CASSETTE_CITY, RC_CASSETTE_COMMUNICATION_ERROR, RC_CASSETTE_COUNTRYCODE, RC_CASSETTE_CURRENCY, RC_CASSETTE_DECLINECODE, RC_CASSETTE_DECLINED, RC_CASSETTE_DECLINED_APPROVAL_EXPIRED, RC_CASSETTE_DECLINED_EXPIRY, RC_CASSETTE_DECLINED_INSTRUMENT, RC_CASSETTE_DECLINEREASON, RC_CASSETTE_DECRYPTION_ERROR, RC_CASSETTE_DEPOSIT_AMOUNT_NOT_ZERO, RC_CASSETTE_EMAILADDRESS, RC_CASSETTE_ENCRYPTION_ERROR, RC_CASSETTE_EXPIRY, RC_CASSETTE_FIBATCHID, RC_CASSETTE_FUNCTION_NOT_SUPPORTED, RC_CASSETTE_HUMAN_INTERVENTION_REQUIRED, RC_CASSETTE_IMPLICIT_BATCHES_ONLY, RC_CASSETTE_INTERMEDIATE_RESPONSE_NULL, RC_CASSETTE_INTERMEDIATE_RESPONSE_UNEXPECTED, RC_CASSETTE_ITEM_COMMODITYCODE, RC_CASSETTE_ITEM_DESCRIPTOR, RC_CASSETTE_ITEM_DISCOUNTAMOUNT, RC_CASSETTE_ITEM_DISCOUNTINDICATOR, RC_CASSETTE_ITEM_LOCALTAXAMOUNT, RC_CASSETTE_ITEM_LOCALTAXRATE, RC_CASSETTE_ITEM_NATIONALTAXAMOUNT, RC_CASSETTE_ITEM_NATIONALTAXRATE, RC_CASSETTE_ITEM_NATIONALTAXTYPE, RC_CASSETTE_ITEM_NETCOST, RC_CASSETTE_ITEM_OTHERTAXAMOUNT, RC_CASSETTE_ITEM_PRODUCTCODE, RC_CASSETTE_ITEM_QUANTITY, RC_CASSETTE_ITEM_SKU, RC_CASSETTE_ITEM_TOTALCOST, RC_CASSETTE_ITEM_UNITCOST, RC_CASSETTE_ITEM_UNITOFMEASURE, RC_CASSETTE_MAXBATCHSIZE, RC_CASSETTE_METHOD, RC_CASSETTE_OPERATION_FAILED, RC_CASSETTE_PAN, RC_CASSETTE_PCARD_ALTERNATETAXID, RC_CASSETTE_PCARD_CUSTOMERDUTYTARIFFREFERENCE, RC_CASSETTE_PCARD_CUSTOMERREFERENCENUMBER, RC_CASSETTE_PCARD_CUSTOMERSERVICEPHONE, RC_CASSETTE_PCARD_DISCOUNTAMOUNT, RC_CASSETTE_PCARD_DUTYAMOUNT, RC_CASSETTE_PCARD_DUTYREFERENCE, RC_CASSETTE_PCARD_LOCALTAXAMOUNT, RC_CASSETTE_PCARD_MERCHANTCITYCODE, RC_CASSETTE_PCARD_MERCHANTCOUNTRYCODE, RC_CASSETTE_PCARD_MERCHANTDUTYTARIFFREFERENCE, RC_CASSETTE_PCARD_MERCHANTLOCATIONID, RC_CASSETTE_PCARD_MERCHANTNAME, RC_CASSETTE_PCARD_MERCHANTORDERNUMBER, RC_CASSETTE_PCARD_MERCHANTPOSTALCODE, RC_CASSETTE_PCARD_MERCHANTSTATEPROVINCE, RC_CASSETTE_PCARD_MERCHANTTAXID, RC_CASSETTE_PCARD_MERCHANTTYPE, RC_CASSETTE_PCARD_NATIONALTAXAMOUNT, RC_CASSETTE_PCARD_NATIONALTAXINVOICEREFERENCE, RC_CASSETTE_PCARD_NATIONALTAXRATE, RC_CASSETTE_PCARD_ORDERSUMMARY, RC_CASSETTE_PCARD_OTHERTAXAMOUNT, RC_CASSETTE_PCARD_PRINTCUSTOMERSERVICEPHONENUMBER, RC_CASSETTE_PCARD_SHIPFROMCITYCODE, RC_CASSETTE_PCARD_SHIPFROMCOUNTRYCODE, RC_CASSETTE_PCARD_SHIPFROMLOCATIONID, RC_CASSETTE_PCARD_SHIPFROMPOSTALCODE, RC_CASSETTE_PCARD_SHIPFROMSTATEPROVINCE, RC_CASSETTE_PCARD_SHIPPINGAMOUNT, RC_CASSETTE_PCARD_SHIPPINGNATIONALTAXAMOUNT, RC_CASSETTE_PCARD_SHIPPINGNATIONALTAXRATE, RC_CASSETTE_PCARD_SHIPTOCITYCODE, RC_CASSETTE_PCARD_SHIPTOCOUNTRYCODE, RC_CASSETTE_PCARD_SHIPTOLOCATIONID, RC_CASSETTE_PCARD_SHIPTOPOSTALCODE, RC_CASSETTE_PCARD_SHIPTOSTATEPROVINCE, RC_CASSETTE_PCARD_SUMMARYCOMMODITYCODE, RC_CASSETTE_PCARD_TAXEXEMPTINDICATOR, RC_CASSETTE_PCARD_TOTALTAXAMOUNT, RC_CASSETTE_PHONENUMBER, RC_CASSETTE_POSTALCODE, RC_CASSETTE_REFUND_AMOUNT_NOT_ZERO, RC_CASSETTE_SHIP_CITY, RC_CASSETTE_SHIP_COUNTRYCODE, RC_CASSETTE_SHIP_POSTALCODE, RC_CASSETTE_SHIP_STATEPROVINCE, RC_CASSETTE_SHIP_STREETADDRESS, RC_CASSETTE_SHIPPINGDATA, RC_CASSETTE_STATEPROVINCE, RC_CASSETTE_STREETADDRESS, RC_CASSETTE_STREETADDRESS2, RC_CASSETTE_UNSPECIFIED_ERROR, RC_CASSETTE_VERSION, RC_CASSETTECOMMAND, RC_CASSETTENAME, RC_CHARSET, RC_CHECK_CASSETTE_STATUS, RC_CLOSEALLOWED, RC_CLOSEBEGINTIME, RC_CLOSEENDTIME, RC_COMMTYPE, RC_COMMUNICATION_ERROR, RC_COMMUNICATION_ERROR_INPUT, RC_CONNECTION_TO_PAYMENT_SERVER_FAILED, RC_CREATEBEGINTIME, RC_CREATEENDTIME, RC_CREDIT, RC_CREDITNUMBER, RC_CURRENCY, RC_DATA_SOURCE, RC_DECRYPT_ENCRYPTION_KEY_FAILED, RC_DELETEORDER, RC_DEPOSITFLAG, RC_DOCUMENT_TOO_LARGE, RC_DTDPATH, RC_EMPTY_DOCUMENT, RC_ENABLED, RC_ENCODING_EXCEPTION, RC_ENCRYPT_ENCRYPTION_KEY_FAILED, RC_ENCRYPTION_KEY_TYPE_NOT_SUPPORTED, RC_ERROR_CHECKING_FOR_READ_DATA, RC_ERROR_CONNECTING_DATABASE_OR_EXEC_SQL, RC_ERROR_DBOWNER, RC_ERROR_DBPASSWORD, RC_ERROR_DBUSERID, RC_ERROR_HOSTNAME, RC_ERROR_INIT_ERROR_LOG, RC_ERROR_JDBCDRIVER_NAME, RC_ERROR_JDBCURL, RC_ERROR_LOADING_CASSETTE, RC_ERROR_LOADING_JDBCDRIVER, RC_ERROR_LOADING_PROPERTY_FILE, RC_ERROR_MAXDBCONNECTIONS, RC_ERROR_MINSENSITIVEACCESSROLE, RC_ERROR_PROTECTION_REALM_NOT_SPECIFIED, RC_ERROR_PSENGINE_PORTNUMBER, RC_ERROR_ROOT_PASSWORD, RC_ETAPIVERSION, RC_ETILLHOSTNAME, RC_EVENT_LISTENER, RC_EVENTTYPE, RC_FAILURL, RC_FILTER, RC_FINANCIALINSTITUTION, RC_FORCE, RC_GENERATE_ENCRYPTION_KEY_FAILED, RC_HANDLE_REQUIRED, RC_HOST_IP_ADDRESS_UNAVAILABLE, RC_HOSTNAME_NOT_VALID, RC_INITIALIZATION_MESSAGE, RC_INPUT_ERROR_TOO_LONG, RC_INPUT_ERROR_UNKNOWN_COMMAND, RC_INVALID_CHANGEPASSWORD_STATE, RC_KEY_NOT_EXIST, RC_KEY_TAMPERED, RC_KEYSONLY, RC_LAST_ACL_OWNER, RC_LISTENERURL, RC_MAXAMOUNT, RC_MAXAPPROVEAMOUNT, RC_MAXBATCHSIZE, RC_MAXDEPOSITAMOUNT, RC_MAXUNAPPROVEDAMOUNT, RC_MERCHANT_ADMIN, RC_MERCHANTNUMBER, RC_MERCHANTPAYSYS, RC_MERCHANTTITLE, RC_MESSAGES, RC_MINAMOUNT, RC_MINAPPROVEAMOUNT, RC_MINDEPOSITAMOUNT, RC_MINUNAPPROVEDAMOUNT, RC_MISSING_ORDER_COLLECTION, RC_MODIFYBEGINTIME, RC_MODIFYENDTIME, RC_MULTIPLE_BATCHES, RC_NDHOSTNAME, RC_NEW_PASSWORD, RC_NO_SUCH_ACL, RC_NO_SUCH_USER, RC_NONE, RC_NOT_ACL_OWNER, RC_OBJECTNAME, RC_OD, RC_OPENBEGINTIME, RC_OPENENDTIME, RC_OPERATION, RC_ORDER, RC_ORDERDATA1, RC_ORDERDATA2, RC_ORDERDATA3, RC_ORDERDATA4, RC_ORDERDATA5, RC_ORDERNUMBER, RC_ORDERURL, RC_ORDERURLS, RC_PAYMENT, RC_PAYMENTAMOUNT, RC_PAYMENTGROUPNAME, RC_PAYMENTNUMBER, RC_PAYMENTSYSTEM_ADMIN, RC_PAYMENTTYPE, RC_PAYSERVER_ADMIN, RC_PLEXNAME, RC_PROTOCOL_DATA_KEYWORD_INVALID, RC_PROTOCOL_POOL, RC_PROTOCOLDATA, RC_PURGEALLOWED, RC_REALM_INIT_ERROR, RC_REALM_OPERATION_ERROR, RC_REALMCLASS, RC_RECEIVE_OF_DATA_ON_SOCKET_FAILED, RC_RECEIVEPAYMENTAUTOAPPROVE, RC_RECEIVEPAYMENTAUTODEPOSIT, RC_REFERENCENUMBER, RC_RESERVED_BITS_SET_IN_FLAGS, RC_RETURNATMOST, RC_ROLE, RC_RP_APPROVEFLAG, RC_RP_DEPOSITFLAG, RC_SEND_OF_DATA_ON_SOCKET_FAILED, RC_SERVICE_POOL, RC_SERVICEURL, RC_SERVLET_INIT_EXCEPTION, RC_SOCKET_CLOSE_FAILED, RC_SOCKET_CREATION_FAILED, RC_SOCKET_STARTUP_FAILURE, RC_SOCKSHOST, RC_SOCKSPORT, RC_SPECIFIED_REALM_UNKNOWN, RC_SPLITFLAG, RC_STATE, RC_STATUS, RC_SUCCESSURL, RC_SYSPLEXFLAG, RC_TIME_PERIOD_INVALID, RC_TIMEREGISTERED, RC_TRANSACTIONID, RC_UNEXPECTED, RC_UNKNOWN_ETILL_HOST, RC_UNSUPPORTED_DOCUMENT_TYPE, RC_USER, RC_USER_MISCONFIGURED, RC_USER_NOT_AUTHORIZED, RC_USER_NOT_ENABLED, RC_USERNAME, RC_VALIDATE_ENCRYPTION_KEY_FAILED, RC_WITHCREDITS, RC_WITHORDERS, RC_WITHPAYMENTS
 
Fields inherited from interface com.ibm.etill.kitcashcassette.KitCashFSMConstants
actionStrings, BatchClosed, CloseOrder, ContinuePayment, Deposit, EndOfConsumerFlow, Error, ErrorState, INVALID_INPUT, KitCashMsg, MarkPaymentAsComplete, MarkPaymentAsReceived, MarkPaymentForDeposit, NO_STATE_CHANGE, OrderClosed, PaymentAddedToBatch, PaymentComplete, PaymentPending, PaymentReceived, PaymentRequested, ReceivePayment, ReportError, SendInitiationMsg, Start, StartPayment, stateStrings, UNREACHABLE_STATE_ACTION
 
Fields inherited from interface com.ibm.etill.kitcashcassette.test.card.KitCashConstants
BATCH_CLOSED_TOKEN, CASHMSG_TOKEN, END_TOKEN, ERROR_TOKEN, PD_ACCOUNTNUMBER, PD_BANKHOSTNAME, PD_BANKPORT, PD_PROTOCOLPORT, RC_BANKHOSTNAME, RC_BANKPORT, RC_PROTOCOLPORT
 
Constructor Summary
KitCashPurchase(com.ibm.etill.framework.cassette.Cassette cassette, com.ibm.etill.framework.payapi.Order order)
          Constructs a new KitCashPurchase object for the KitCash cassette.
KitCashPurchase(com.ibm.etill.framework.cassette.Cassette cassette, com.ibm.etill.framework.payapi.Order order, com.ibm.etill.framework.payapi.ParameterTable protocolData)
          Constructs a new KitCashPurchase object for the KitCash cassette.
 
Method Summary
 java.lang.String accountNumber()
          Returns the number of the account to be used when deposited the payment.
 short batchRequired()
          Deprecated. not required by cassette developers
 com.ibm.etill.framework.cassette.Cassette cassette()
          Returns the Cassette instance associated with this purchase object.
 java.lang.Integer closeOrder()
          Updates the database to delete an order.
 java.lang.Integer continuePayment()
          Sends the KitCash protocol message from the consumer's wallet to the merchant's KitCash card and returns the KitCash response message.
 void createRecord(java.sql.Connection conn)
          Inserts a new purchase record into the KITCASHPURCHASE database table.
 void deleteRecord(java.sql.Connection conn)
          Deletes a purchase record from the KITCASHPURCHASE database table.
 int getFinalBatchID()
          Deprecated. not required by cassette developers
 int getInitialBatchID()
          Deprecated. not required by cassette developers
 com.ibm.etill.framework.payapi.Order getOrder()
          Returns the framework order associated with this cassette specific order object
 java.lang.Integer markPaymentAsComplete()
          Updates the database to indicate that the cash for this payment has been sent to the bank.
 java.lang.Integer markPaymentAsReceived()
          Updates the database indicating that the protocol flow completed successfully.
 java.lang.Integer markPaymentForDeposit()
          Updates the database to indicate that this payment has been marked for deposit in the appropriate account.
 java.lang.Integer performAction(int action)
          performAction; always returns an Integer(0)
 void processEvent(com.ibm.etill.framework.cassette.APIRequest req, com.ibm.etill.framework.cassette.APIResponse resp)
          Processes cassette requests from the merchant.
 void processEvent(java.lang.Integer token)
          Processes requests.
 void processEvent(KitCashPaymentRequest req, com.ibm.etill.framework.cassette.ProtocolResponse resp)
          Processes cassette requests from the consumer's wallet.
 java.lang.Integer reportError()
          In case of a processing error, updates the order's state to ORDER_REJECTED and reports the error to the console.
 void resetTransaction()
          This method is not used.
 void resurrectPurchase()
          Retrieves the cassette specific order information from the KitCashPurchase database table.
 java.lang.Integer sendInitiationMsg()
          Returns an applet tag to the merchant so that it can be sent to the consumer to start up their wallet.
 java.lang.Integer startPayment()
          Sends the KitCash pay message from the consumer's wallet to the merchant's KitCash card and returns the KitCash response message.
 java.lang.String toString()
          Returns a string representation of the KitCashPurchase object
 void updateRecord(java.sql.Connection conn)
          Updates a purchase record on the KITCASHPURCHASE database table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KitCashPurchase

public KitCashPurchase(com.ibm.etill.framework.cassette.Cassette cassette,
                       com.ibm.etill.framework.payapi.Order order)
Constructs a new KitCashPurchase object for the KitCash cassette.
Parameters:
cassette - a Cassette object
order - the framework order

KitCashPurchase

public KitCashPurchase(com.ibm.etill.framework.cassette.Cassette cassette,
                       com.ibm.etill.framework.payapi.Order order,
                       com.ibm.etill.framework.payapi.ParameterTable protocolData)
Constructs a new KitCashPurchase object for the KitCash cassette.
Parameters:
cassette - a Cassette object
order - the framework order
Method Detail

accountNumber

public java.lang.String accountNumber()
Returns the number of the account to be used when deposited the payment.
Specified by:
accountNumber in interface com.ibm.etill.framework.cassette.CassetteOrder
Returns:
the account number

batchRequired

public short batchRequired()
Deprecated. not required by cassette developers

Specified by:
batchRequired in interface com.ibm.etill.framework.cassette.CassetteOrder

cassette

public com.ibm.etill.framework.cassette.Cassette cassette()
Returns the Cassette instance associated with this purchase object.
Specified by:
cassette in interface com.ibm.etill.framework.cassette.CassetteOrder
Returns:
the Cassette instance associated with this purchase object

continuePayment

public java.lang.Integer continuePayment()
                                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
Sends the KitCash protocol message from the consumer's wallet to the merchant's KitCash card and returns the KitCash response message.

This method is triggered in response to a protocol message being receive at the KitCash comPoint.

Specified by:
continuePayment in interface KitCashFSMUser
Returns:
a token indicating the next action to be performed
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails

createRecord

public void createRecord(java.sql.Connection conn)
                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
Inserts a new purchase record into the KITCASHPURCHASE database table.

The cassette should not call this method directly. It is called by the Payment Manager framework when needed.

Specified by:
createRecord in interface com.ibm.etill.framework.archive.Archivable
Parameters:
conn - the database connection to use
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails

deleteRecord

public void deleteRecord(java.sql.Connection conn)
                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
Deletes a purchase record from the KITCASHPURCHASE database table.

The cassette should not call this method directly. It is called by the Payment Manager framework when needed.

Specified by:
deleteRecord in interface com.ibm.etill.framework.archive.Archivable
Parameters:
conn - the database connection to use
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails

getFinalBatchID

public int getFinalBatchID()
Deprecated. not required by cassette developers


getInitialBatchID

public int getInitialBatchID()
Deprecated. not required by cassette developers


getOrder

public com.ibm.etill.framework.payapi.Order getOrder()
Returns the framework order associated with this cassette specific order object
Returns:
the framework order

markPaymentAsComplete

public java.lang.Integer markPaymentAsComplete()
                                        throws com.ibm.etill.framework.payapi.ETillAbortOperation
Updates the database to indicate that the cash for this payment has been sent to the bank.
Specified by:
markPaymentAsComplete in interface KitCashFSMUser
Returns:
a token indicating the next action to be performed
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails
See Also:
KitCashBatch.markOrdersAsComplete()

markPaymentAsReceived

public java.lang.Integer markPaymentAsReceived()
                                        throws com.ibm.etill.framework.payapi.ETillAbortOperation
Updates the database indicating that the protocol flow completed successfully.

This method is triggered in response to the merchant's KitCash card indicating that the protocol flow completed successfully.

Specified by:
markPaymentAsReceived in interface KitCashFSMUser
Returns:
a token indicating the next action to be performed
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails

markPaymentForDeposit

public java.lang.Integer markPaymentForDeposit()
                                        throws com.ibm.etill.framework.payapi.ETillAbortOperation
Updates the database to indicate that this payment has been marked for deposit in the appropriate account.
Specified by:
markPaymentForDeposit in interface KitCashFSMUser
Returns:
a token indicating the next action to be performed
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails

closeOrder

public java.lang.Integer closeOrder()
                             throws com.ibm.etill.framework.payapi.ETillAbortOperation
Updates the database to delete an order. KitCashFSM calls this when a CloseOrderRequest is received.
Specified by:
closeOrder in interface KitCashFSMUser
Returns:
a token (null) indicating no more operations to perform
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails

performAction

public java.lang.Integer performAction(int action)
                                throws com.ibm.etill.framework.payapi.ETillAbortOperation
performAction; always returns an Integer(0)
Specified by:
performAction in interface KitCashFSMUser
Parameters:
int - action
Returns:
Integer(0)
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the procesing fails

processEvent

public void processEvent(com.ibm.etill.framework.cassette.APIRequest req,
                         com.ibm.etill.framework.cassette.APIResponse resp)
                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
Processes cassette requests from the merchant.

The KitCash Finite State Machine is used to determine which action to perform based on the token embedded in the APIRequest and the KitCashPurchase object's current state.

Parameters:
req - the request object passed to the cassette by the Payment Manager framework
resp - the response object to be used in replying to the requester
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the procesing fails

processEvent

public void processEvent(KitCashPaymentRequest req,
                         com.ibm.etill.framework.cassette.ProtocolResponse resp)
                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
Processes cassette requests from the consumer's wallet.

The KitCash Finite State Machine is used to determine which action to perform based on the token (CASHMSG_TOKEN) and the KitCashPurchase object's current state.

Parameters:
req - the request object passed to the cassette by the Payment Manager framework
resp - the response object to be used in replying to the requester
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the procesing fails

processEvent

public void processEvent(java.lang.Integer token)
                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
Processes requests.

The KitCash Finite State Machine is used to determine which action to perform based on the input token and the KitCashPurchase object's current state.

Parameters:
req - the request object passed to the cassette by the PaymentManager framework
resp - the response object to be used in replying to the requester
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails

reportError

public java.lang.Integer reportError()
In case of a processing error, updates the order's state to ORDER_REJECTED and reports the error to the console.
Specified by:
reportError in interface KitCashFSMUser
Returns:
a token indicating the next action to be performed (null if no action is to be performed)

resetTransaction

public void resetTransaction()
This method is not used.
Specified by:
resetTransaction in interface com.ibm.etill.framework.cassette.CassetteTransaction

resurrectPurchase

public void resurrectPurchase()
                       throws com.ibm.etill.framework.payapi.ETillAbortOperation
Retrieves the cassette specific order information from the KitCashPurchase database table.
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the database table cannot be read

sendInitiationMsg

public java.lang.Integer sendInitiationMsg()
                                    throws com.ibm.etill.framework.payapi.ETillAbortOperation
Returns an applet tag to the merchant so that it can be sent to the consumer to start up their wallet.

When a ReceivePayment API command is received by the Payment Manager, it is sent to the cassette for cassette-specific processing. The KitCash finite state machine specifies that sendInitiationMsg() should be called as as result.

Specified by:
sendInitiationMsg in interface KitCashFSMUser
Returns:
a token indicating the next action to be performed (null if no action is to be performed)
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails

startPayment

public java.lang.Integer startPayment()
                               throws com.ibm.etill.framework.payapi.ETillAbortOperation
Sends the KitCash pay message from the consumer's wallet to the merchant's KitCash card and returns the KitCash response message.

This method is triggered in response to the first protocol message being receive at the KitCash comPoint.

Specified by:
startPayment in interface KitCashFSMUser
Returns:
a token indicating the next action to be performed
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails

toString

public java.lang.String toString()
Returns a string representation of the KitCashPurchase object
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the KitCashPurchase object

updateRecord

public void updateRecord(java.sql.Connection conn)
                  throws com.ibm.etill.framework.payapi.ETillAbortOperation
Updates a purchase record on the KITCASHPURCHASE database table.

The cassette should not call this method directly. It is called by the Payment Manager framework when needed.

Specified by:
updateRecord in interface com.ibm.etill.framework.archive.Archivable
Parameters:
conn - the database connection to use
Throws:
com.ibm.etill.framework.payapi.ETillAbortOperation - if the processing fails