Android InApp Purchase - How to handle Pending Status?

让人想犯罪 __ 提交于 2019-12-03 22:42:12

I know this question was asked a long time ago. But I am facing the very same issue (with an App for the Brazilian market).

I noticed that purchases which got processed right away, everything works fine.

But, some purchases get into the 'pending payment' status and it can take up to 48 hours to change status. But, my server never gets called - as OP stated, I suspect Google play server returns a different status (other than RESULT_OK) and my app doesn't capture that. Then, my user gets charged, but has no access to the PREMIUM features - since my server never got notified.

So, as of 2018, I read that we might have an alternative. The following link has some information on how to deal with subscriptions

https://developer.android.com/google/play/billing/billing_subscriptions

.. and points to the following:

https://developer.android.com/google/play/billing/realtime_developer_notifications

"Realtime Developer Notifications"

this allows Google play to send your server a notification, every time a user subscription status changes. So, if your user's payment took 48h to complete, your server would receive a notification and you could make the user PREMIUM or whatever logic you need.

Hope it helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!