|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.ibm.etill.ldbcardcassette.LdbCardOrder
The cassette order object is responsible for recording all the relevent protocol data passed when the order is created, managing the state of the framework object, and routing all the order requests.
Field Summary | |
private static java.lang.String |
COPYRIGHT
|
private LdbCardAccount |
objAccount
This cassette order attribute contains the reference to the cassette account object that will be used to perform transactions for this order. |
private java.lang.String |
objAddress
This cassette order attribute contains the shopper's street address (used for address verification systems). |
private int |
objAmount
This cassette order attribute contains the running total of all approved payments associated with this order. |
private java.lang.String |
objBrand
This cassette order attribute contains the brand name of the shopper's card. |
private LdbCardCassette |
objCassette
This cassette order attribute contains the reference back to the cassette that owns the order. |
private java.lang.String |
objExpiry
This cassette order attribute contains the expiration date of the shopper's card in YYYYMM format. |
private com.ibm.etill.framework.payapi.Order |
objFrameworkOrder
This cassette order attribute contains the reference back to the associated framework order object. |
private java.lang.String |
objPan
This cassette order attribute contains the shopper's personal account number (also known as the credit/debit card number). |
private java.lang.String |
objPostalCode
This cassette order attribute contains the shopper's postal code (used for address verification systems). |
Constructor Summary | |
LdbCardOrder(LdbCardCassette argCassette,
com.ibm.etill.framework.payapi.Order argFrameworkOrder)
This constructor initializes an existing cassette order object by resurrecting its attributes from the cassette's order database table. |
|
LdbCardOrder(LdbCardCassette argCassette,
com.ibm.etill.framework.payapi.Order argFrameworkOrder,
com.ibm.etill.framework.payapi.ParameterTable argProtocolData)
This constructor initializes a new cassette order object using attributes passed by the merchant as protocol data. |
Method Summary | |
void |
acceptPayment(com.ibm.etill.framework.cassette.AcceptPaymentRequest argRequest,
com.ibm.etill.framework.cassette.APIResponse argResponse)
This method is used by the cassette when it is asked to service an AcceptPayment request. |
java.lang.String |
accountNumber()
This method is used to obtain the account number for the account that will process the order's payments and credits. |
void |
approve(com.ibm.etill.framework.cassette.ApproveRequest argRequest,
com.ibm.etill.framework.cassette.APIResponse argResponse)
This method is used by the cassette 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 cassette when it is asked to service an ApproveReversal request. |
short |
batchRequired()
The method is used by the framework to determine if a batch ID is required on a Deposit or Refund request. |
void |
cancelOrder(com.ibm.etill.framework.cassette.CancelOrderRequest argRequest,
com.ibm.etill.framework.cassette.APIResponse argResponse)
This method is used by the cassette when it is asked to service a CancelOrder request. |
com.ibm.etill.framework.cassette.Cassette |
cassette()
This method is used to obtain the cassette object for the cassette that owns this order. |
void |
closeCredit(com.ibm.etill.framework.payapi.Credit argFrameworkCredit)
This method is used by the cassette batch when it is asked to close an open batch. |
void |
closeOrder(com.ibm.etill.framework.cassette.CloseOrderRequest argRequest,
com.ibm.etill.framework.cassette.APIResponse argResponse)
This method is used by the cassette when it is asked to service a CloseOrder request. |
void |
closePayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment)
This method is used by the cassette batch when it is asked to close an open batch. |
void |
createRecord(java.sql.Connection argConnection)
This method is used by the framework order (a commitable object) when its commit() method discovers the cassette order 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 order 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 cassette 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 cassette when it is asked to service a DepositReversal request. |
LdbCardAccount |
getAccount()
This method is used to obtain the account object that is used to process transactions for this order. |
java.lang.String |
getAccountNumber()
This method is used to obtain the account number that is used to process transactions for this order. |
java.lang.String |
getAddress()
This method is used to obtain the shopper's street address. |
int |
getAmount()
This method is used to obtain the current approved amount. |
java.lang.String |
getBrand()
This method is used to obtain the brand of the shopper's credit card number. |
java.lang.String |
getExpiry()
This method is used to obtain the expiration data of the shopper's credit card. |
java.lang.String |
getObscurePan()
This method is used to obtain the shopper's credit card number when it will be displayed in a trace. |
java.lang.String |
getPan()
This method is used to obtain the shopper's credit card number |
java.lang.String |
getPostalCode()
This method is used to obtain the shopper's postal code. |
private boolean |
isCancelOrderAllowed()
This method is used to determine if a CancelOrder command is allowed. |
private boolean |
isCloseOrderAllowed()
This method is used to determine if a CloseOrder command is allowed. |
void |
receivePayment(com.ibm.etill.framework.cassette.ReceivePaymentRequest argRequest,
com.ibm.etill.framework.cassette.APIResponse argResponse)
This method is used by the cassette when it is asked to service a ReceivePayment request. |
void |
refund(com.ibm.etill.framework.cassette.RefundRequest argRequest,
com.ibm.etill.framework.cassette.APIResponse argResponse)
This method is used by the cassette when it is asked to service a Refund request. |
void |
refundReversal(com.ibm.etill.framework.cassette.RefundReversalRequest argRequest,
com.ibm.etill.framework.cassette.APIResponse argResponse)
This method is used by the cassette when it is asked to service a RefundReversal request. |
private void |
resurrectOrder()
This method is used by the cassette order object to resurrect an existing cassette order from the cassette order database table. |
void |
setAccount(java.lang.String argMerchant,
java.lang.String argAccountNumber)
This method is used to find and set the cassette account object that will be used to process the transactions for this order. |
void |
setAddress(java.lang.String argAddress)
This method is used to set the shopper's street address. |
void |
setAmount(int argAmount)
This method is used to set total approved payment amount. |
void |
setBrand(java.lang.String argBrand)
This method is used to set the brand of the shopper's credit card. |
void |
setExpiry(java.lang.String argExpiry)
This method is used to set the expiration data of the shopper's credit card. |
void |
setPan(java.lang.String argPan)
This method is used to set the shopper's credit card number |
void |
setPostalCode(java.lang.String argPostalCode)
This method is used to set the shopper's postal code. |
void |
updateRecord(java.sql.Connection argConnection)
This method is used by the framework order (a commitable object) when its commit() method discovers the cassette order object on the framework order's update list. |
Field Detail |
private static final java.lang.String COPYRIGHT
private LdbCardCassette objCassette
private com.ibm.etill.framework.payapi.Order objFrameworkOrder
private LdbCardAccount objAccount
private int objAmount
private java.lang.String objPan
private java.lang.String objExpiry
private java.lang.String objBrand
private java.lang.String objAddress
private java.lang.String objPostalCode
Constructor Detail |
public LdbCardOrder(LdbCardCassette argCassette, com.ibm.etill.framework.payapi.Order argFrameworkOrder, com.ibm.etill.framework.payapi.ParameterTable argProtocolData) throws com.ibm.etill.framework.payapi.ETillAbortOperation
argCassette
- - The cassette that owns the order.argFrameworkOrder
- - The framework's order object.argProtocolData
- - The protocol data parameter values
provided by the merchant system.public LdbCardOrder(LdbCardCassette argCassette, com.ibm.etill.framework.payapi.Order argFrameworkOrder) throws com.ibm.etill.framework.payapi.ETillAbortOperation
argCassette
- - The cassette that owns the order.argFrameworkOrder
- - The framework's order object.Method Detail |
public com.ibm.etill.framework.cassette.Cassette cassette()
public java.lang.String accountNumber()
public short batchRequired()
For this cassette, 0 (False) is returned in all cases. By definition there is only one open batch for each account so there is no need for the merchant to choose a batch with a batch ID.
private void resurrectOrder() throws com.ibm.etill.framework.payapi.ETillAbortOperation
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.
public void createRecord(java.sql.Connection argConnection) throws com.ibm.etill.framework.payapi.ETillAbortOperation
argConnection
- - The JDBC database connection to be used
for this operation.public void updateRecord(java.sql.Connection argConnection) throws com.ibm.etill.framework.payapi.ETillAbortOperation
argConnection
- - The JDBC database connection to be used
for this operation.public void deleteRecord(java.sql.Connection argConnection) throws com.ibm.etill.framework.payapi.ETillAbortOperation
argConnection
- - The JDBC database connection to be used
for this operation.public void receivePayment(com.ibm.etill.framework.cassette.ReceivePaymentRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the payment engine does not support shopper interaction to obtain payment information after the order is created. The operation is always aborted.
argRequest
- - A ReceivePayment order request.argResponse
- - The response object to hold the result.public void acceptPayment(com.ibm.etill.framework.cassette.AcceptPaymentRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, required and optional protocol data values have already been saved by the constructor. This method peforms the state checks, assignes an account to process subsequent financial requests, updates the framework order's state, and adds the framework order to the current commit point. In an automatic approval has been requested, it is performed.
argRequest
- - An AcceptPayment order request.argResponse
- - The response object to hold the result.public void approve(com.ibm.etill.framework.cassette.ApproveRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the cassette order object knows that the cassette payment object is responsible for performing the approval. The framework's payment object is found in the request. The cassette's payment object is obtained and its approve() method is called.
argRequest
- - An Approve order request.argResponse
- - The response object to hold the result.public void approveReversal(com.ibm.etill.framework.cassette.ApproveReversalRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the cassette order object knows that the cassette payment object is responsible for performing the reversal. The framework's payment object is found in the request. The cassette's payment object is obtained and its approveReversal() method is called.
argRequest
- - An ApproveReversal order request.argResponse
- - The response object to hold the result.public void deposit(com.ibm.etill.framework.cassette.DepositRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the cassette order object knows that the cassette payment object is responsible for performing the deposit. The framework's payment object is found in the request. The cassette's payment object is obtained and its deposit() method is called.
argRequest
- - A Deposit order request.argResponse
- - The response object to hold the result.public void depositReversal(com.ibm.etill.framework.cassette.DepositReversalRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the cassette order object knows that the cassette payment object is responsible for performing the reversal. The framework's payment object is found in the request. The cassette's payment object is obtained and its depositReversal() method is called.
argRequest
- - A DepositReversal order request.argResponse
- - The response object to hold the result.public void refund(com.ibm.etill.framework.cassette.RefundRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the cassette order object knows that the cassette credit object is responsible for performing the refund. The framework's credit object is found in the request. The cassette's credit object is obtained and its refund() method is called.
argRequest
- - A Refund order request.argResponse
- - The response object to hold the result.public void refundReversal(com.ibm.etill.framework.cassette.RefundReversalRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the cassette order object knows that the cassette credit object is responsible for performing the reversal. The framework's credit object is found in the request. The cassette's credit object is obtained and its refundReversal() method is called.
argRequest
- - A Refund order request.argResponse
- - The response object to hold the result.public void closeOrder(com.ibm.etill.framework.cassette.CloseOrderRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
argRequest
- - A CloseOrder order request.argResponse
- - The response object to hold the result.private boolean isCloseOrderAllowed()
Note: At the time of this implementation, this definition is contrary to the definition in the programmer's guide. The programmer's guide contains a much stricter definition: "You can invoke the CLOSEORDER command when there is at least one payment or credit in Closed state [and there are no active payments or credits]." I cannot justify this definition. If this definition is used, a merchant who is pruning their orders would need to issue a CloseOrder for every order that contains a closed payment or credit and a CancelOrder for everything else. Imagine the complicated code required to choose which verb should be issued for hundreds of orders. When compared to this complication, the feeble attempt to prevent a merchant from closing an order too soon by requiring a closed payment or credit seems pointless. The active transaction check is both necessary and sufficient. In the near future, the definition will be changed.
public void cancelOrder(com.ibm.etill.framework.cassette.CancelOrderRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
argRequest
- - A CancelOrder order request.argResponse
- - The response object to hold the result.private boolean isCancelOrderAllowed()
public void closePayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment)
argFrameworkPayment
- - A framework payment to be closed.public void closeCredit(com.ibm.etill.framework.payapi.Credit argFrameworkCredit)
argFrameworkCredit
- - A framework credit to be closed.public LdbCardAccount getAccount()
public java.lang.String getAccountNumber()
public int getAmount()
public java.lang.String getPan()
public java.lang.String getObscurePan()
public java.lang.String getBrand()
public java.lang.String getExpiry()
public java.lang.String getAddress()
public java.lang.String getPostalCode()
public void setAccount(java.lang.String argMerchant, java.lang.String argAccountNumber)
argMerchant
- - The merchant number of the account that
will be used to process this order.argAccountNumber
- - The account number of the account
that will be used to process this order.public void setAmount(int argAmount)
argAmount
- - The total approved amount.public void setPan(java.lang.String argPan)
argPan
- - The shopper's credit card number.public void setBrand(java.lang.String argBrand)
argBrand
- - The brand of the shopper's credit card.public void setExpiry(java.lang.String argExpiry)
argExpiry
- - The expiration data of the shopper's credit
card.public void setAddress(java.lang.String argAddress)
argAddress
- - The shopper's street address.public void setPostalCode(java.lang.String argPostalCode)
argPostalCode
- - The shopper's postal code.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |