current_requestId = iap_client->purchaseProduct(current_productId, IAPClient::ForcedAutomaticRestoration);
and in the completion callback doing this:
void App:urchaseCompleted(int requestId, QString status, QString purchaseTicket)
if(QString::compare(status, "OK", Qt::CaseInsensitive)==0
|| QString::compare(status, "RestorableProduct", Qt::CaseInsensitive)==0)
Based on the docs I would have expected that purchaseCompleted will be called with status "RestorableProduct" if it has already been bought. The docs state that purchase will be automatically converted to restoration if possible, which seems logical to me.
However, I got a user report that after firmware upgrade he needed to do another purchase, so either I'm missing something or there is a bug somewhere.