net.rimlib.blackberry.api.paymentsdk
Interface Result

All Superinterfaces:
ResultCodes
All Known Subinterfaces:
ExistingPurchasesResult, PriceSet, PurchaseResult

public interface Result
extends ResultCodes

Represents the result of a payment-related transaction attempt, such as making an in-app purchase or retrieving existing purchases. Developers can determine whether the result is successful by querying the isSuccessful() method. If the result is unsuccessful, the failure reason can be obtained from the getFailureReason() method, which allows specialized handling of failure cases. This method will return one of the REASON_* constants in this interface or in a subinterface. Finally, getStatusMessage() provides a human-readable status message suitable for use as a notification to the end user.


Field Summary
static java.lang.String RETURN_CODE
           
static java.lang.String STATUS_MESSAGE
           
 
Fields inherited from interface net.rimlib.blackberry.api.paymentsdk.ResultCodes
REASON_APP_WORLD_NOT_CORRECT_VERSION, REASON_ARGUMENTS_ERROR, REASON_CANCELED, REASON_GOOD_NOT_FOUND, REASON_ILLEGAL_APPLICATION, REASON_NONE, REASON_SERVER_ERROR, REASON_UNKNOWN
 
Method Summary
 int getFailureReason()
          Retrieves a constant representing the reason this result is unsuccessful, or REASON_NONE if this result is successful.
 java.lang.String getStatusMessage()
          Retrieves a human-readable status message that an application can use relay this result to the end user.
 boolean isSuccessful()
          Determines whether or not this is a successful result.
 

Field Detail

RETURN_CODE

static final java.lang.String RETURN_CODE
See Also:
Constant Field Values

STATUS_MESSAGE

static final java.lang.String STATUS_MESSAGE
See Also:
Constant Field Values
Method Detail

isSuccessful

boolean isSuccessful()
Determines whether or not this is a successful result.

Returns:
True if this result is successful; false otherwise.

getFailureReason

int getFailureReason()
Retrieves a constant representing the reason this result is unsuccessful, or REASON_NONE if this result is successful.

Returns:
One of the REASON_* constants. If this result is successful, then REASON_NONE is returned.

getStatusMessage

java.lang.String getStatusMessage()
Retrieves a human-readable status message that an application can use relay this result to the end user.

Returns:
A human-readable status message.


Copyright © 2011 Research In Motion Limited. All Rights Reserved.