07-28-2013 08:36 PM
Hi, I am testing getting existing purchases and I am running into an error that I have no idea what it's talking about. Without further ado, here's the error:
Error Code: 3
Error: The parent application could not be located within the reconcile cache
Here's how I implemented the getting existing purchase.
1. User first opens the app and the app checks for existing purchase request to the server
2. With onExistingPurchasesResponseSuccess, I awknowledge that successful restore request have been made and save a value to use so that next time the app opens, it doesn't check the server again.
The problem is, with the above error occuring when the existing purchase request have been made, #2 doesn't get initiated and as a result, the app sends request to the server every time. Then, everytime it fails, it pops that message to the user again.
Is that error occuring because the app is still "Under review" in app world and I've downloaded via BlackBerry World via sandboxed account? Once the app is downloaded after it's approved, will the error go away?
07-29-2013 01:06 PM
Which OS are you using for testing? There was an issue where if no purchases existed then an error would be returned, error 3 to be specific.
This should not affect external users once the app goes live. To verify your logic is correct you can make purchases in sandbox mode then make the call to requestExistingPurchases(false) to query the cache, the purchase receipts will be returned in the same manner as if passing in 'true'.
10-01-2013 03:37 AM
Then, we cannot test really the get existing purchases?
If I test in sandbox with first param of paymentservice_get_existing_purchases_request to true, then my game crash.
I will update to SDK 10.2 and try again.
10-01-2013 08:55 AM
Then with 10.2 native SDK I have again the same crash when I call
unsigned request_id = 0;
STD_Printf("Error: restore transaction failed.\n");
STD_Printf("Purchase restore request ID %d\n", request_id);
Note that game crash only in sandbox mode. If I test in local mode an error occured but no crash. If I use the cache with the false first params then I have an error.
Will be crash when released?
10-01-2013 03:09 PM
Yes it should not.
I initiate all the payment service and when I purchase an item all is ok.
But if I call the code above then my game crash (only in draft mode in sandbox). Then I hope in release not.
In local mode with or without debug test mode then I only have an error and enter in the if statement (but this seems normal because local mode does not support real transaction).
10-27-2013 09:43 AM
you can look for saving the purchase with the object QSettings, that is the easiest way to save your user's settings and leave the request to the server as an "else" option