Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry® World™ Development

Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Errors when trying to get existing purchases

My application uploaded to BB World and is in draft mode. I 'good' is added. Never tried to purchase though.

When application starts and when it cannot located a 'purchased' flag in QSetting it is trying to query existing purchases and getting "The parent application could not be located withing the reconcile cache".

Code is

class BBPaymentServiceControl : public QObject
public Q_SLOTS:
    void handlePurchaseError(int errorCode, QString errorText);
 void infoResponseError(int errorCode, const QString &errorText);

    paymentServiceControl = new BBPaymentServiceControl(this, app);
    QObject::connect(paymentServiceControl, SIGNAL(infoResponseError(int, const QString)), paymentServiceControl, SLOT(handlePurchaseError(int, const QString)));
    const ExistingPurchasesReply *reply = m_paymentManager->requestExistingPurchases(refresh);
    bool ok = connect(reply, SIGNAL(finished()), SLOT(existingPurchasesResponse()));
void BBPaymentServiceControl::existingPurchasesResponse()
    bb::platform::ExistingPurchasesReply *reply = qobject_cast<bb::platform::ExistingPurchasesReply*>(sender());

    //emits error signal upon errors.
    if (reply->isError()) {
        qDebug() << "Existing purchases response error. Code(" << reply->errorCode() << ") Text(" << reply->errorText() << ")";
        emit infoResponseError(reply->errorCode(), reply->errorText());