Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In-app purchase uses wrong account after update

Typical scenario, user has two accounts, [email protected] and [email protected], both on their Android device. The user buys my premium upgrade on version 1.0 using account [email protected], then they update to version 1.1 and the code (the in-app purchases code) now thinks they are using account [email protected], so it thinks the user hasn't bought the premium upgrade. I know it is using the wrong account because they send me their order email and then they tell me the wrong email is listed on the buy dialog if they press on the $ amount. The only fix at this point is to uninstall and reinstall using the Play store desktop website and the right account.

I am using the IABHelper from the sample with some fixes from StackOverflow. As far as I know there is no way for me to even choose the account they are using for that.

Any ideas on what might be going on? has this happened to anyone else?

The code exceeded the length limit at StackOverflow so I've put it here http://pastebin.com/hLquZ6SP

EDIT: I now have a user who claims this happens to him every time he updates the app.

EDIT: This happens a lot more during staged rollouts, I think because the account that gets the staged update is not the one the user bought the IAP with.

like image 559
casolorz Avatar asked Apr 27 '15 01:04

casolorz


1 Answers

This appears to be a bug in the Play Store app. See this Google Help Forum post for a user workaround.

Basically, the Play Store app sometimes associates the wrong Google Account with an app's in-app billing. But it seems to work correctly when the app installation is "pushed" from the Play Store website (from a computer).

One caveat though: In the above linked thread, there's a report of the workaround correcting the account and billing association, but then reverting back to the incorrect Google Account after an app update. So, I'm unsure if this workaround is reliable.

like image 50
hungryghost Avatar answered Oct 19 '22 08:10

hungryghost