com.ibm.etill.ldbcardcassette
Class LdbCardPayment

com.ibm.etill.ldbcardcassette.LdbCardPayment

public final class LdbCardPayment
implements LdbCardConstants

The cassette payment object is responsible for performing all the cassette's payment requests (Approve, ApproveReversal, Deposit, DepositReversal) and to manage the state of the framework payment object.


Field Summary
private static java.lang.String COPYRIGHT
           
private  java.lang.String objApprovalCode
          This cassette payment attribute contains the approval code.
private  java.lang.String objDeclineReason
          This cassette payment attribute contains the decline reason.
private  com.ibm.etill.framework.payapi.Payment objFrameworkPayment
          This cassette payment attribute contains the reference back to the associated framework payment object.
 
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
LdbCardPayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment)
          This constructor initializes an existing cassette payment object.
LdbCardPayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment, com.ibm.etill.framework.payapi.ParameterTable argProtocolData)
          This constructor initializes a new cassette payment object.
 
Method Summary
 void approve(com.ibm.etill.framework.cassette.ApproveRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This method is used by the order object when it is asked to service an Approve request.
 void approveReversal(com.ibm.etill.framework.cassette.ApproveReversalRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This method is used by the order object when it is asked to service an ApproveReversal request.
private  void checkApprovalAmount(com.ibm.etill.framework.payapi.Order argFrameworkOrder, LdbCardOrder argOrder)
          This method is used when an Approve is requested.
private  void checkReversalAmount(com.ibm.etill.framework.payapi.Order argFrameworkOrder, LdbCardOrder argOrder, int argNewAmount)
          This method is used when an ApproveReversal is requested.
 void closePayment()
          This method is used by the cassette order object when it is asked to close a payment when a batch is being closed.
 void createRecord(java.sql.Connection argConnection)
          This method is used by the framework order (a commitable object) when its commit() method discovers the cassette payment object on the framework order's create list.
 void deleteRecord(java.sql.Connection argConnection)
          This method is used by the framework order (a commitable object) when its commit() method discovers the cassette payment object on the framework order's delete list.
 void deposit(com.ibm.etill.framework.cassette.DepositRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This method is used by the order object when it is asked to service a Deposit request.
 void depositReversal(com.ibm.etill.framework.cassette.DepositReversalRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse)
          This method is used by the order object when it is asked to service a DepositReversal request.
 java.lang.String getApproval()
          This method is used to obtain the current approval code.
 com.ibm.etill.framework.payapi.Payment getFrameworkPayment()
          This method is used to obtain the framework's payment object.
 java.lang.String getReason()
          This method is used to obtain the current reason code.
 void resetTransaction()
          This method is called by the framework when the merchant attempts to Approve a payment that has previously been declined.
private  void resurrectPayment()
          This method is used by the cassette object to resurrect an existing cassette payment from the cassette payment database table.
 void setApproval(java.lang.String argApprovalCode)
          This method is used to set the approval code for this payment.
 void setReason(java.lang.String argDeclineReason)
          This method is used to set the decline reason for this payment.
 void updateRecord(java.sql.Connection argConnection)
          This method is used by the framework order (a commitable object) when its commit() method discovers the cassette payment object on the framework order's update list.
 

Field Detail

COPYRIGHT

private static final java.lang.String COPYRIGHT

objFrameworkPayment

private com.ibm.etill.framework.payapi.Payment objFrameworkPayment
This cassette payment attribute contains the reference back to the associated framework payment object.

objApprovalCode

private java.lang.String objApprovalCode
This cassette payment attribute contains the approval code. The approval code is supplied by the payment engine when a payment transaction is successfully created and is used in subsequent payment engine requests (like void or capture) to reference this payment.

objDeclineReason

private java.lang.String objDeclineReason
This cassette payment attribute contains the decline reason. The decline reason, originally small and therefore cryptic, was designed to be displayed on a card swipe terminal at a point of sale terminal. In this cassette, it provides detailed information about the cause of the failure. (Since the text is provided by the financial network, different for each network, and not standardized in any way, it is impossible to translate these text strings into return codes.)
Constructor Detail

LdbCardPayment

public LdbCardPayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment,
                      com.ibm.etill.framework.payapi.ParameterTable argProtocolData)
This constructor initializes a new cassette payment object. A reference to the associated framework's payment object is set.
Parameters:
argFrameworkPayment - - The framework's payment object.
argProtocolData - - The protocol data parameter values provided by the merchant system.

LdbCardPayment

public LdbCardPayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment)
               throws com.ibm.etill.framework.payapi.ETillAbortOperation
This constructor initializes an existing cassette payment object. A reference to the associated framework's payment object is set and the remaining attributes are resurrected from the cassette's payment database table.
Parameters:
argFrameworkPayment - - The framework's payment object.
Throws:
ETillAbortOperation - - any failure results in this exception.
Method Detail

resetTransaction

public void resetTransaction()
This method is called by the framework when the merchant attempts to Approve a payment that has previously been declined. Usually an Approve creates a new payment. In this case, the payment exists and must be reset to its initial state so that the Approval can be attempted again.

resurrectPayment

private void resurrectPayment()
                       throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the cassette object to resurrect an existing cassette payment from the cassette payment database table.

This method is not part of the Archivable interface. The methods for the Archivable interface are passed a JDBC database connection for the operation. In this case, an ETillArchive object is constructed to provide a JDBC databaes connection.

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 order (a commitable object) when its commit() method discovers the cassette payment object on the framework order's 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 order (a commitable object) when its commit() method discovers the cassette payment object on the framework order's 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 order (a commitable object) when its commit() method discovers the cassette payment object on the framework order's delete list.
Parameters:
argConnection - - The JDBC database connection to be used for this operation.
Throws:
ETillAbortOperation - - any failure results in this exception.

approve

public void approve(com.ibm.etill.framework.cassette.ApproveRequest argRequest,
                    com.ibm.etill.framework.cassette.APIResponse argResponse)
             throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the order object when it is asked to service an Approve request.

For this cassette, the account object is used to authorize the payment. The account will be asked to authorize this payment and, if successful and the merchant has requested an automatic deposit, the account will be asked to capture this payment as well. In any case, the framework payment object's state is updated and return codes are placed in the provided response object.

Parameters:
argRequest - - An Approve order request.
argResponse - - The response object to hold the result.
Throws:
ETillAbortOperation - - any failure results in this exception.

checkApprovalAmount

private void checkApprovalAmount(com.ibm.etill.framework.payapi.Order argFrameworkOrder,
                                 LdbCardOrder argOrder)
                          throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used when an Approve is requested. It checks to make sure that the new payment amount will not increase the total approved amount to a value which exceeds the amount of the order.
Parameters:
argFrameworkOrder - - The Framework order object.
argOrder - - The cassette order object.
Throws:
ETillAbortOperation - - any failure results in this exception.

approveReversal

public void approveReversal(com.ibm.etill.framework.cassette.ApproveReversalRequest argRequest,
                            com.ibm.etill.framework.cassette.APIResponse argResponse)
                     throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the order object when it is asked to service an ApproveReversal request.

For this cassette, the account object is used to void the previous authorization and, if the new approval amount is not zero, authorize again with the new amount.

Parameters:
argRequest - - An ApproveReversal order request.
argResponse - - The response object to hold the result.
Throws:
ETillAbortOperation - - any failure results in this exception.

checkReversalAmount

private void checkReversalAmount(com.ibm.etill.framework.payapi.Order argFrameworkOrder,
                                 LdbCardOrder argOrder,
                                 int argNewAmount)
                          throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used when an ApproveReversal is requested. It checks to make sure that the new payment amount will not increase the total approved amount to a value which exceeds the amount of the order.
Parameters:
argFrameworkOrder - - The Framework order object.
argOrder - - The cassette order object.
argNewAmount - - The amount proposed by the request.
Throws:
ETillAbortOperation - - any failure results in this exception.

deposit

public void deposit(com.ibm.etill.framework.cassette.DepositRequest argRequest,
                    com.ibm.etill.framework.cassette.APIResponse argResponse)
             throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the order object when it is asked to service a Deposit request.

For this cassette, the account object is used to capture the payment.

Parameters:
argRequest - - A Deposit order request.
argResponse - - The response object to hold the result.
Throws:
ETillAbortOperation - - any failure results in this exception.

depositReversal

public void depositReversal(com.ibm.etill.framework.cassette.DepositReversalRequest argRequest,
                            com.ibm.etill.framework.cassette.APIResponse argResponse)
                     throws com.ibm.etill.framework.payapi.ETillAbortOperation
This method is used by the order object when it is asked to service a DepositReversal request.

For this cassette, the account is used to void the previous payment and then authorize again with the previous amount. This is required because the framework expects the payment to be in Approved state after processing a complete deposit reversal but the payment engine voids the authorization as well as the capture.

Parameters:
argRequest - - A DepositReversal order request.
argResponse - - The response object to hold the result.
Throws:
ETillAbortOperation - - any failure results in this exception.

closePayment

public void closePayment()
This method is used by the cassette order object when it is asked to close a payment when a batch is being closed.

getApproval

public java.lang.String getApproval()
This method is used to obtain the current approval code.
Returns:
- The approval code returned by the payment engine.

getFrameworkPayment

public com.ibm.etill.framework.payapi.Payment getFrameworkPayment()
This method is used to obtain the framework's payment object.
Returns:
- The framework's payment object for this payment.

getReason

public java.lang.String getReason()
This method is used to obtain the current reason code.
Returns:
- The reason code (usually a text message) returned by the payment engine when a transaction is declined.

setApproval

public void setApproval(java.lang.String argApprovalCode)
This method is used to set the approval code for this payment.
Parameters:
argApprovalCode - - The approval code returned by the payment engine.

setReason

public void setReason(java.lang.String argDeclineReason)
This method is used to set the decline reason for this payment.
Parameters:
argDeclineReason - - The decline reason returned by the payment engine.