Welcome!

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

Testing and Deployment

Reply
Contributor
conor_xl
Posts: 11
Registered: ‎11-30-2011
My Carrier: rogers,telus

testing in-app purchases with an appworld sandbox account

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?

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,459
Registered: ‎04-12-2010
My Carrier: Bell

Re: testing in-app purchases with an appworld sandbox account

Hi there,

 

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.

 

Erik Oros

BlackBerry Development Advisor


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Contributor
conor_xl
Posts: 11
Registered: ‎11-30-2011
My Carrier: rogers,telus

Re: testing in-app purchases with an appworld sandbox account

Hi Erik,

 

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
behavior is:

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)

 

Thanks,

 

Conor

Please use plain text.
Contributor
LeoNoblink
Posts: 20
Registered: ‎09-13-2012
My Carrier: None

Re: testing in-app purchases with an appworld sandbox account

Hello, I have the same problem, Did you find a solution?
Please use plain text.
Contributor
conor_xl
Posts: 11
Registered: ‎11-30-2011
My Carrier: rogers,telus

Re: testing in-app purchases with an appworld sandbox account

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.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,459
Registered: ‎04-12-2010
My Carrier: Bell

Re: testing in-app purchases with an appworld sandbox account

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.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,459
Registered: ‎04-12-2010
My Carrier: Bell

Re: testing in-app purchases with an appworld sandbox account

Hi guys,

 

Just to confirm, when you tested through the sandbox, did you also switch your application to use network mode instead of local mode?


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Contributor
conor_xl
Posts: 11
Registered: ‎11-30-2011
My Carrier: rogers,telus

Re: testing in-app purchases with an appworld sandbox account

Hi Erik, 

 

Yes, this happened when calling getExistingPurchases(true) with network mode, when the app and digital goods are in an AppWorld sandbox.

 

Conor

Please use plain text.
Contributor
LeoNoblink
Posts: 20
Registered: ‎09-13-2012
My Carrier: None

Re: testing in-app purchases with an appworld sandbox account

Hi Erik,

I have the same configurations as Conor

Leo.
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,459
Registered: ‎04-12-2010
My Carrier: Bell

Re: testing in-app purchases with an appworld sandbox account

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?


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.