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

BlackBerry® World™ Development

Error "You have already purchased this item" When Attempting to Make an In App Purchase

by BlackBerry Development Advisor on ‎12-16-2011 10:35 AM (2,884 Views)

Problem

 

The following error is reported when attempting to make an in application purchase using the BlackBerry® Payment Service.

 

You have already purchased this item

 

 

Cause

 

The user is attempting to purchase an item that they have already purchased.  The list of items available for purchase in the application is out of sync with the list of items already purchased using the BlackBerry Payment Service.  This can occur if the application has been re-installed, but has not retrieved a listing of previous purchases made by the user.

 

Resolution

 

1.  When your application starts up for the first time you should call:

 

PaymentEngine.getExistingPurchases(true)

 

This will return them an array of previous purchases from the server. Using this array they need to indicate which items have been previously purchased.

 

2.  If you catch the error “You have already purchased this item” (which should not occur if the approach above is used) you can unlock that item.

Users Online
Currently online: 7 members 1,623 guests
Please welcome our newest community members: