jasonz1987 / marketbilling

Automatically exported from code.google.com/p/marketbilling
0 stars 0 forks source link

IabHelper returning "User canceled" instead of "Item already owned" (when trying to purchase owned item) #196

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
STEPS TO REPRODUCE:

1. Purchase item on phone 1 (make sure it's successful, we want to won item.
2. Try to purchase same item pack on phone 2 (before device reboot, or clearing 
Google Play cache, which the user might not know about)
3. Google dialog shows, showing "You already own this item".
4. Click ok.

In my implemented listener -> onIabPurchaseFinished(IabResult result, Purchase 
purchase) I now look at the logs.

EXPECTED OUTPUT:
If Item is already owned, I'd like to get a 
BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED back to the 
onIabPurchaseFinished(IabResult result, Purchase purchase); 

(This way I can give user correct response)

ACTUAL OUTPUT:
"Purchase finished: IabResult: User canceled. (response: -1005:User cancelled), 
purchase: null" 

I can't act on "User canceled". 

I see in your code that you get the correct info from Play (an int 7, with 
which you fetch the "user cancelled" messsage. 

AFFECTED ORDER IDS (IF RELEVANT):

OS VERSION:
4.2.1
4.4.2

MARKET/MYAPPS VERSION:
In-app version 3, using IabHelper.java you guys checked in at Aug 6, 2014.

DEVICE:
Sony Z2, Galaxy S4, Galaxy nexus

OUTPUT FROM ADB BUGREPORT ATTACHED:
(Note: The output from "adb bugreport" is required for all bug reports.)

NOTES:
 Relevant info starts in attached file is: "onActivityResult(10001,0,Intent { (has extras) }"

Original issue reported on code.google.com by vincenth...@gmail.com on 2 Sep 2014 at 8:36

Attachments: