PurchaseReply
#include <bb/platform/PurchaseReply>
To link against this class, add the following line to your .pro file: LIBS += -lbbplatform
Represents a response to PaymentManager::requestPurchase().
An instance of this class is returned when a PaymentManager::requestPurchase() is made. Initially, the returned object will be unfinished and not contain any valid information relating to the request (other than that it is unfinished). Once the request is finished, PaymentReply::isError() can be used to determine whether the request succeeded or failed. If the request was successful, then the receipt() method provides a purchase receipt with details of the purchase. If the request failed, then the error code and error text are included; these can be accessed on the PaymentReply base class.
The finished() signal can be used to determine when the request finishes. The PaymentManager::purchaseFinished() signal can also be used to determine when a request finishes.
Do not delete the object in a slot connected to any of the finished signals. Use QObject::deleteLater() instead.
BlackBerry 10.0.0
Inheritance
| bb::platform::PaymentReply | |||
| bb::platform::DigitalGoodReply | |||
| bb::platform::PurchaseReply | |||
Public Functions Index
| virtual | ~PurchaseReply () |
| bb::platform::PurchaseReceipt | receipt () const |
| QString | purchaseMetadata () const |
| QString | digitalGoodId () const |
| QString | digitalGoodSku () const |
| int | errorCode () const |
| QString | errorText () const |
| bool | isError () const |
| bool | isFinished () const |
Signals Index
Only has inherited signals
| void | finished () |
Public Functions
bb::platform::PurchaseReceipt
Gets the receipt from a successful purchase response.
If the request finished successfully, then the purchase receipt is returned. If the request failed or is unfinished, then an invalid purchase receipt is returned.
The purchase receipt.
BlackBerry 10.0.0
QString
Gets the purchase metadata from an error purchase response.
If the request finished successfully, then the purchase metadata is returned. If the request failed or is unfinished, then the empty string is returned.
If no metadata was provided in the request, then metadata is empty.
The purchase metadata, if passed in the request.
BlackBerry 10.0.0
QString 
Get the digital good ID.
If the request finished successfully, then this returns the digital good ID. If the request failed or is unfinished, then the empty string is returned.
If no digital good ID was provided in the request, then the digital good ID is empty.
The digital good ID.
BlackBerry 10.0.0
QString 
Get the digital good SKU.
If the request finished successfully, then this returns the digital good SKU. If the request failed or is unfinished, then the empty string is returned.
If no digital good SKU was provided in the request, then digital good SKU is empty.
The digital good SKU.
BlackBerry 10.0.0
int 
Get the error code.
If the request is unfinished or finished successfully, then this method returns 0. If the request failed, then this method returns the error code.
The error code.
BlackBerry 10.0.0
QString 
Get the error text.
If the request is unfinished or finished successfully, then this method returns an empty string. If the request failed, then this method returns the a description of the error that occurred.
A description of the error that occurred.
BlackBerry 10.0.0
bool 
Whether the request failed.
If the request is unfinished or finished successfully, then this method returns false. If the request failed, then this method returns true.
Whether the request failed.
BlackBerry 10.0.0
bool 
Whether the request is finished.
true if a result has been received, false otherwise.
BlackBerry 10.0.0
Signals
(Only has inherited signals)
void 
Emitted when a result is received.
BlackBerry 10.0.0