|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides an interface to perform point-of-sale operations with an active POS transaction.
A SimpleSalesTransaction
is an object that corresponds to an active transaction
on the point-of-sale system.
SimpleSalesTransaction
provides a basic API to process items sales and
complete the transaction with payment and confirm the results.
Method Summary | |
---|---|
void |
cancel()
Cancels the transaction. |
void |
confirm()
Provides confirmation that the client has received the results from a point-of-sale transaction request. |
boolean |
isCancelAllowed()
Returns true if the transaction is in a state that allows it to be cancelled. |
boolean |
isConfirmAllowed()
Returns true if the transaction is in a state that allows it to be confirmed. |
boolean |
isPaymentAllowed()
Returns true if the transaction is in a state that allows a payment operation to be performed. |
boolean |
isSalesAllowed()
Returns true if the transaction is in a state that allows sales operations to be performed. |
com.ibm.retail.saf.provider.PaymentResult |
payBalance(com.ibm.retail.saf.provider.PaymentRequest paymentRequest)
Sends a request to the point-of-sale system to tender payment for the balance and complete the transaction. |
com.ibm.retail.saf.provider.TransactionResult |
performSales(com.ibm.retail.saf.provider.TransactionRequest transactionRequest)
Sends a transaction request to the point-of-sale system to perform the sales operations on the transaction. |
Methods inherited from interface com.ibm.retail.saf.provider.Transaction |
---|
getCashReceiptImage, getPaymentResults, getTransactionID, getTransactionTotals |
Method Detail |
public com.ibm.retail.saf.provider.TransactionResult performSales(com.ibm.retail.saf.provider.TransactionRequest transactionRequest) throws TransactionStateException, POSException, java.rmi.RemoteException
This method provides a means to submit sales information to the point-of-sale system to initiate processing of a sales transaction.
The TransactionRequest
provided by the caller must include all the items
to be included in the transaction.
Additional information such as customer loyalty information may also be included in the request.
The point-of-sale system will process the request and will return an
TransationResult
object if no exceptions occur.
If the processing of the items is unsuccessful, an exception is thrown detailing the error
condition.
If the transaction processing is successfully performed on the POS and no exceptions are thrown,
a TransationResult
object is returned to the client containing the results.
If the POS is not able to receive and process the request, an exception is thrown which details the error condition.
transactionRequest
- contains the information for the point-of-sale to process this request.
TransactionStateException
- if the state of the transaction does not allow this request.
is unable to process this request.
POSException
- if the point-of-sale system is unable to process the request.
The exception wrappers the cause and provides
further details on the current condition.
java.rmi.RemoteException
public com.ibm.retail.saf.provider.PaymentResult payBalance(com.ibm.retail.saf.provider.PaymentRequest paymentRequest) throws TransactionStateException, TenderException, POSException, java.rmi.RemoteException
This method provides a means to submit the payment information to the point-of-sale system for completion of the sales transaction.
The PaymentRequest
provided by the caller includes the customer payment information
needed for the point-of-sale system to complete payment for the transaction.
The point-of-sale system will process the
request and put the results of the operation into the PaymentResult
object.
If the POS is not able to receive and process the request, an exception is thrown which details the error condition.
paymentRequest
- contains the information for the point-of-sale to process this request
TransactionStateException
- if the transaction is not in the proper state.
TenderException
- if the payment request failed on the point-of-sale system.
POSException
- if the point-of-sale system is unable to process the request.
java.rmi.RemoteException
public boolean isSalesAllowed() throws java.rmi.RemoteException
Sales operations are invoked through the method performSales
.
POSException
- if the point-of-sale system is unable to process the request.
java.rmi.RemoteException
public boolean isCancelAllowed() throws java.rmi.RemoteException
A transaction is cancelled by invoking the cancel
method.
The current transaction must be confirmed or cancelled before a POSProvider
will make a new transaction.
POSException
- if the point-of-sale system is unable to process the request.
java.rmi.RemoteException
public boolean isPaymentAllowed() throws java.rmi.RemoteException
A payment operation is performed by invoking the payBalance
method.
POSException
- if the point-of-sale system is unable to process the request.
java.rmi.RemoteException
public boolean isConfirmAllowed() throws java.rmi.RemoteException
A transaction is confirmed by invoking the confirm
method.
POSException
- if the point-of-sale system is unable to process the request.
java.rmi.RemoteException
public void confirm() throws TransactionStateException, java.rmi.RemoteException, POSException
This method provides a means for the client to acknowledge receipt of the payment results
from the complete
method and is used to ensure integrity of the
payment processing operation. Transactions that are not confirmed are handled as exceptions.
A SalesTransation
must be in the complete state before this method can
be called. A SalesTransation
is complete after it has been
successfully tendered using the complete
method.
TransactionStateException
- if the transaction is not in the proper state.
POSException
- if the point-of-sale system is unable to process the request.
java.rmi.RemoteException
public void cancel() throws TransactionStateException, java.rmi.RemoteException, POSException
TransactionStateException
- if the transaction is not in the proper state.
POSException
- if the point-of-sale system is unable to process the request.
java.rmi.RemoteException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |