11-30-2011 10:08 AM
I'm preparing a playbook app for release. When I call PaymentService.getExistingPurchases(true) (to sync with the payment server), I'm getting thePurchase Error "The parent application could not be located within the reconcile cache." (code 3).
I don't see this behaviour with "local testing". For local testing, the documentation states that getExistingPurchases must be called with the parameter set to false. I haven't seen equivalent instructions for testing with a sandbox account, but maybe the requirement is the same?
Alternatively, as it mentions an application cache, perhaps it's an issue with how the application sandbox is set up server-side?
12-07-2011 10:47 AM
Could you please confirm how you have installed your application to your PlayBook (i.e. direct load or through App World)? When setting the refresh to true, the device will communicate with the Payment Service server directly, and if your application or digitial goods are not being hosted within App World (or you have not installed your application via App World), you will likely run into issues.
I will dig into the specific error code you have identified and will follow-up with any additional information I find, but my initial hunch would be the above.
BlackBerry Development Advisor
12-07-2011 11:11 AM
Both the app and the digital goods were in draft mode in appworld, and the app was installed through appworld using a sandbox account.
In the documentation for 'local mode' testing, it mentions that you can't call the PaymentService. I couldn't find documentation one way or the other for sandbox accounts.
If a call to getExistingPurchases(true) is
made in the sandbox, could you please clarify whether the expected
a) The server will respond with a PaymentSuccessEvent, but zero
results (the payment server fakes a response to sandbox users)
b) The server will respond with a PaymentErrorEvent (the payment
server doesn't recognize sandbox users, tries to locate the parent
application outside of the sandbox, and fails)
09-13-2012 01:27 PM
No, I never got a response from RIM, and the problem still existed when we released (I haven't been on that project for months). In our case, the purchase info was also sent to our own account server, so we just let our server result take precendence over the appworld result.
09-14-2012 11:59 AM
Hi guys, apologies, I dropped the ball on this thread back in December it seems. Not sure how it slipped through but I'll avoid excuses.
I'll sync up with our Payment team and get confirmation on this behaviour.
09-14-2012 01:28 PM
Just to confirm, when you tested through the sandbox, did you also switch your application to use network mode instead of local mode?
09-14-2012 02:29 PM
Yes, this happened when calling getExistingPurchases(true) with network mode, when the app and digital goods are in an AppWorld sandbox.
09-14-2012 04:11 PM
I checked withour Payment team and that scenario should be working. Do you happen to have a small sample application that I could test out and investigate on my end?