com.ibm.commerce.payment.beans
Class PayStatusPMDataBean

java.lang.Object
  |
  +--com.ibm.commerce.beans.InputDataBeanImpl
        |
        +--com.ibm.commerce.beans.SmartDataBeanImpl
              |
              +--com.ibm.commerce.payment.beans.PayStatusPMDataBean
All Implemented Interfaces:
DataBean, InputDataBean, java.io.Serializable, SmartDataBean

public class PayStatusPMDataBean
extends SmartDataBeanImpl

This DataBean, when populated, provides the order state and payment state of the specified order as known by WebSphere Commerce Payments. The order must be one that has been sent to the Payments for processing. No information will be returned if the order is not known to WebSphere Commerce Payments. This DataBean is designed for the use of JavaServer Pages that may be invoked during shopping flow to display the payment status of an order by shopper.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.commerce.beans. SmartDataBeanImpl
commandContext, COPYRIGHT
 
Fields inherited from class com.ibm.commerce.beans. InputDataBeanImpl
requestProperties
 
Fields inherited from interface com.ibm.commerce.beans. DataBean
emptyString
 
Constructor Summary
PayStatusPMDataBean()
          PayStatusPMDataBean default constructor.
 
Method Summary
 java.lang.String getCommonAVSCode()
          Returns the commonAVSCode property of the Bean.
protected  long getElapsedTimeMillis()
          Returns the elapsedTimeMillis property of the Bean.
 java.lang.String getMessage()
          Returns the message property of the Bean.
 java.lang.String getOrderId()
          Returns the orderId property of the Bean
 java.lang.String getOrderState()
          Returns the orderState property of the Bean.
 java.lang.String getOrderStatus()
          Returns the orderStatus property of the Bean.
 java.lang.String getPaymentState()
          Returns the paymentState property of the Bean.
 int getPrimaryRC()
          Returns the primary return code as returned from the WebSphere Commerce Payments QueryOrders command.
 int getSecondaryRC()
          Returns the secondary return code as returned from the WebSphere Commerce Payments QueryOrders command.
 java.lang.String getStoreId()
          Returns the storeId property of the Bean
 void populate()
          Populate the Bean Properties.
protected  void setCommonAVSCode(java.lang.String astrCommonAVSCode)
          Sets the commonAVSCode property of the Bean.
protected  void setElapsedTimeMillis(long anElapsedTimeMillis)
          Sets the elapsedTimeMillis property of the Bean.
protected  void setMessage(java.lang.String astrMessage)
          Sets the message property of the Bean.
protected  void setOrderId(java.lang.String astrOrderId)
          Sets the orderId property of the Bean
protected  void setOrderState(java.lang.String astrOrderState)
          Sets the orderState property of the Bean.
protected  void setOrderStatus(java.lang.String astrOrderStatus)
          Sets the orderStatus property of the Bean.
protected  void setPaymentNumber(java.lang.String astrPaymentNumber)
          Sets the paymentNumber property of the Bean.
protected  void setPaymentState(java.lang.String astrPaymentState)
          Sets the paymentState property of the Bean.
protected  void setPrimaryRC(int anPrimaryRC)
          Sets the primary return code as returned from the WebSphere Commerce Payments QueryOrders command.
protected  void setSecondaryRC(int anSecondaryRC)
          Sets the secondary return code as returned from the WebSphere Commerce Payments QueryOrders command.
protected  void setStoreId(java.lang.String astrStoreId)
          Sets the storeId property of the Bean
 
Methods inherited from class com.ibm.commerce.beans. SmartDataBeanImpl
fulfills, getCommandContext, getResources, setCommandContext
 
Methods inherited from class com.ibm.commerce.beans. InputDataBeanImpl
getRequestProperties, setRequestProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.beans. InputDataBean
getRequestProperties, setRequestProperties
 

Constructor Detail

PayStatusPMDataBean

public PayStatusPMDataBean()
PayStatusPMDataBean default constructor.
Method Detail

getCommonAVSCode

public java.lang.String getCommonAVSCode()
Returns the commonAVSCode property of the Bean.

The commonAVSCode property is the String representation of the the common AVS code set by the payment cassette. The payment cassette maps the payment service specific AVS Results Code returned by the Address Verification Services (AVS) to the WebSphere Commerce Payments defined common AVS code.

Possible values for the common AVS Code are:

Returns:
the String representation of the the common AVS code set by the payment cassette. If the cassette does not use AVS, an empty String is returned.

getElapsedTimeMillis

protected long getElapsedTimeMillis()
Returns the elapsedTimeMillis property of the Bean.

The elapsedTimeMillis property represents the elapsed time in milliseconds for the WebSphere Commerce Payments QueryOrders command to run and get the results back from the Payments to populate this DataBean. It includes any Network delay.

Returns:
the elapsed time in milliseconds or zero if an error is detected before the QueryOrders command is issued.

getMessage

public java.lang.String getMessage()
Returns the message property of the Bean.

The message property stores any message received during population of the Bean. It may be the empty String if no message has been received.

Returns:
any String message received during population of the DataBean or the empty String if no message has been received.

getOrderId

public java.lang.String getOrderId()
Returns the orderId property of the Bean
Returns:
the order ID for the order for which status is requested

getOrderState

public java.lang.String getOrderState()
Returns the orderState property of the Bean.

The orderState property is a String representing the WebSphere Commerce Payments state of the order. Possible values are defined in the com.ibm.etill.frame.clientapi.PaymentCommandConstants interface.

The constants defined for order state are:

Returns:
the String representing the WebSphere Commerce Payments state of the order It may be the empty string if no order state is known by Payments or if an error occurred during the population of this DataBean.

getOrderStatus

public java.lang.String getOrderStatus()
Returns the orderStatus property of the Bean.

The orderStatus property is a String representing the status of the order. Some possible values are:

Returns:
the String representing the status of the order. It may be the empty string if an error occurred during the population of this DataBean.

getPaymentState

public java.lang.String getPaymentState()
Returns the paymentState property of the Bean.

The paymentState property is a String representing the payment state of the order known by WebSphere Commerce Payments.

Possible values for the payment state are defined in the com.ibm.etill.frame.clientapi.PaymentCommandConstants interface.

The constants defined for payment state are:

If there are more than one payment for an order then the payment state of one of the payments will be used if it is not PAYMENTSTATE_VOID.

The value for the PAYMENTSTATE_VOID constant will be returned if and only if all the payments for the order have the payment state equals to the constant in PAYMENTSTATE_VOID.

Returns:
the String representing the payment state of the order. It may be the empty string if there is no payment for the order or if an error occurred during the population of this DataBean.

getPrimaryRC

public int getPrimaryRC()
Returns the primary return code as returned from the WebSphere Commerce Payments QueryOrders command.
Returns:
the primary return code from the QueryOrders command or -1 if an error occurred before the command was issued.

getSecondaryRC

public int getSecondaryRC()
Returns the secondary return code as returned from the WebSphere Commerce Payments QueryOrders command.
Returns:
the secondary return code from the QueryOrders command or -1 if an error occurred before the command was issued.

getStoreId

public java.lang.String getStoreId()
Returns the storeId property of the Bean
Returns:
the ID of the Store to which the order belongs.

populate

public void populate()
              throws java.lang.Exception
Populate the Bean Properties. This method is called by the DataBeanManager during DataBean activation.
Specified by:
populate in interface SmartDataBean
Overrides:
populate in class SmartDataBeanImpl
Throws:
java.lang.Exception

setCommonAVSCode

protected void setCommonAVSCode(java.lang.String astrCommonAVSCode)
Sets the commonAVSCode property of the Bean.
Parameters:
astrCommonAVSCode - the String representation of the the common AVS code
See Also:
getCommonAVSCode

setElapsedTimeMillis

protected void setElapsedTimeMillis(long anElapsedTimeMillis)
Sets the elapsedTimeMillis property of the Bean. The elapsedTimeMillis property represents the elapsed time in milliseconds for the WebSphere Commerce Payments QueryOrders command to run and get the results back. It includes Network delay.
Parameters:
anElapsedTimeMillis - the elapsed time in milliseconds

setMessage

protected void setMessage(java.lang.String astrMessage)
Sets the message property of the Bean. The message property stores any message received during population of the Bean. It may be null.
Parameters:
astrMessage - the String message

setOrderId

protected void setOrderId(java.lang.String astrOrderId)
Sets the orderId property of the Bean
Parameters:
astrOrderId - the ID of the order

setOrderState

protected void setOrderState(java.lang.String astrOrderState)
Sets the orderState property of the Bean.
Parameters:
astrOrderState - the WebSphere Commerce Payments state of the order.
See Also:
getOrderState

setOrderStatus

protected void setOrderStatus(java.lang.String astrOrderStatus)
Sets the orderStatus property of the Bean.
Parameters:
astrOrderStatus - the single character String representation of the status of the WebSphere Commerce order.
See Also:
getOrderStatus

setPaymentNumber

protected void setPaymentNumber(java.lang.String astrPaymentNumber)
Sets the paymentNumber property of the Bean.
Parameters:
astrPaymentNumber - the String representing the payment number of the payment with payment state stored in the paymentState property of the Bean.

setPaymentState

protected void setPaymentState(java.lang.String astrPaymentState)
Sets the paymentState property of the Bean.
Parameters:
astrPaymentState - the String representing the payment state of the order known by WebSphere Commerce Payments .
See Also:
getPaymentState

setPrimaryRC

protected void setPrimaryRC(int anPrimaryRC)
Sets the primary return code as returned from the WebSphere Commerce Payments QueryOrders command.
Parameters:
anPrimaryRC - the primary return code from the QueryOrders command.

setSecondaryRC

protected void setSecondaryRC(int anSecondaryRC)
Sets the secondary return code as returned from the WebSphere Commerce Payments QueryOrders command.
Parameters:
anSecondaryRC - the secondary return code from the QueryOrders command.

setStoreId

protected void setStoreId(java.lang.String astrStoreId)
Sets the storeId property of the Bean
Parameters:
astrStoreId - the ID of the Store to which the order belongs.