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
New Developer
LeoNoblink
Posts: 25
Registered: ‎09-13-2012
My Device: Playbook, Z10, Z30, Q10, Q5
My Carrier: None

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

First of all sorry for my basic English.

I'm using the same code as the example in this link:

https://developer.blackberry.com/air/documentation/ww_air_services/CS_Creating_an_application_that_s...

Except when I call the function refreshHandler(null) to check purchases at the end of the loading digitalgoods function resultHandler().

The error 3 "The parent application could not be located within the reconcile cache." appears here. This is the only instance in which I make the query.

 

Thanks!

Leo.

___________________________________

I am in a strange new world...
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,556
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

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

Thanks Leo,

 

I'll run a test with the sample code posted. I know you said you did, but I just want to confirm, in PaymentServiceDemo.as, you've changed this code:

paymentSystem.setConnectionMode(PaymentSystem.CONNECTION_MODE_LOCAL);

 

To:

paymentSystem.setConnectionMode(PaymentSystem.CONNECTION_MODE_NETWORK);

 

Is that right? Also, have you changed:

paymentSystem.getExistingPurchases(false);

 

To:

paymentSystem.getExistingPurchases(true);

 

Based on the error's reference to not finding the parent application in the reconcile cache, it may simply be that there hasn't been a live request yet (i.e. the cache isn't populated) so the error reported would be accurate. If you could confirm whether the error still occurs with CONNETION_MODE_NETWORK and getExistingPurchases(true), then that would help indicate whether there is some larger issue at hand.


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.
New Developer
LeoNoblink
Posts: 25
Registered: ‎09-13-2012
My Device: Playbook, Z10, Z30, Q10, Q5
My Carrier: None

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

Yes, I was using these functions:
paymentSystem.setConnectionMode(PaymentSystem.CONNECTION_MODE_NETWORK);
and
paymentSystem.getExistingPurchases(true);

Today realize a new test and now I have no more that mistake!
but when i call the function paymentSystem.getExistingPurchases does not list the the previous purchases, is this because I am in the sandbox?

___________________________________

I am in a strange new world...
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,556
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

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

Hi Leo,

 

That one is expected behaviour, correct. In Sandbox mode, App World doesn't create a purchase objects in its records, so any purchases made there will not actually be returned.

 

Do you happen to know what you might have changed between then and now that could have impacted the error occurring/going away?


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.
New Developer
LeoNoblink
Posts: 25
Registered: ‎09-13-2012
My Device: Playbook, Z10, Z30, Q10, Q5
My Carrier: None

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

Hi Erik,

 

Today I uploaded a new version, without significant changes, I had problems in installation, and searching the error said that it could be a blackberry id problem with the type of payment, I perform some changes in the acount related with Paypal and I could reinstall it, and in this last test the error disappeared.

 

I hope some of this be a help, and thanks for the help given!

 

Leo.

___________________________________

I am in a strange new world...
Please use plain text.
Regular Contributor
dlacerte
Posts: 68
Registered: ‎03-12-2013
My Device: BB Z10
My Carrier: Rogers

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

[ Edited ]

I was getting an error "There is no getExistingPurchases Local Cache" in a "real" deployment (not sandbox) using the local cache with requestExistingPurchases(false) so I changed the flag from false to true as suggested in:

 

http://supportforums.blackberry.com/t5/BlackBerry-World-Development/What-quot-There-is-no-getExistin...

 

And now I am getting the subject error "The parent application could not be located within the reconcile cache." when checking receipts in BB World by using requestExistingPurchases(true) in sandbox mode. I am not calling setConnectionMode() at all so it should be in Production mode according to the docs. I get this error even after making the purchase. Will I get this error in the regular mode?

Please use plain text.