11-28-2013 11:38 AM - edited 11-28-2013 11:41 AM
I'm testing the payment service in my app. After downloading the app from BB World, i'm able to purchase the in-app items with my sandbox account. But I still have some issues while getting the existing purchases. I also tried to set the parameter of the paymentSystem.getExistingPurchase function to true and false but there's no result at all.
var purchase : Purchase
var pastPurchases : Purchases = e.existingPurchases;
for(var i:int = 0;i<=pastPurchases.length;i++)
purchase = pastPurchases[i]
if(mySKU == purchase.digitalGoodSKU)
////my code here!
Any help would be greatly appreciated. Thanks in advance!
Solved! Go to Solution.
11-29-2013 02:02 AM
try adding the event listener first, and then call getExistingPurchas()
for some base code, see here
11-29-2013 07:08 AM - edited 11-29-2013 07:54 AM
I did not copy code from my IDE. In my real code, the paymentSystem.getExistingPurchases() called after all events added Thanks!
Umm... I'm going to change the license model of my in-app items to consumable. I found this line in the document "The Payment Service does not set any controls on the number of times that a user can purchase these goods."
Do I need call paymentSystem.getExistingPurchases() if my in-app items are consumable?, Are they also stored on the Payment Server?
Anyone can help me again?
11-29-2013 09:39 AM