Android应用内购买:购买时弹出网络失败,但购买完成后收到电子邮件 [英] Android In-app purchase: While purchasing got network failed popup but purchase has been completed got an email

查看:136
本文介绍了Android应用内购买:购买时弹出网络失败,但购买完成后收到电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自1周前以来,我在应用内购买 IInAppBillingService version 3 中遇到了一个奇怪的问题.

I am getting a weird issue from the in-app purchase IInAppBillingService version 3 since 1 week ago.

以下是我遵循的步骤:

注意:我遵循这些步骤是因为我的用户很少遇到相同的网络问题 但购买已完成.但是应用仍然显示购买"按钮 该产品.因此,要复制该问题,我必须遵循以下步骤.

Note: I followed these steps because few of my users got same network issue but purchase has been completed. But app still showing Buy button for that product. So to replicate the issue I had to follow these steps.

  1. 在Play商店版本上安装了可调试的已签名APK.
  2. 点击了要购买的商品
  3. 使用购买"按钮打开Play商店弹出窗口.在购买的弹出窗口中单击 Buy
  4. 我在购买产品时失去了网络.使用 No Internet Connection 弹出窗口
  5. No Internet Connection 弹出窗口中单击 ok .返回我的应用程序.
  6. 再次点击要购买的商品.
  7. 现在获得了 Error --> You already owned this item
  1. Installed the debuggable signed APK over the play store version.
  2. Clicked on item to buy
  3. Opened the play store popup with Buy button. Clicked on Buy in the purchased popup
  4. I lost the network while purchasing a product. Got a popup with No Internet Connection
  5. Clicked on ok in the No Internet Connection popup. Return to my application.
  6. Again clicked on item to buy.
  7. Now got the Error --> You already owned this item

但是问题是,我在应用程序 mPurchaseFinishedListener callback 中没有任何购买结果.我得到了空.甚至我都从Google那里收到了电子邮件,并在 Google Play store --> Menu --> Account --> Order History

But the problem is, I didn't get any purchase result in the app mPurchaseFinishedListener callback. I got Null. Even I got the email from the google and I checked that whether it is purchased or not in the Google Play store --> Menu --> Account --> Order History

我的产品是 Managed Product ,但是用户可以多次购买.因此,无论何时打开产品或完成购买之后,都会消耗基于skuId的所需购买(如果已购买).

My product is Managed Product but user can purchased it multiple times. So for that, whenever opening the product or after finishing the purchase consuming the desired purchase based on the skuId if it is purchased.

if (purchase != null && purchase.getItemType().equalsIgnoreCase("inapp"))
{
    mHelper.consumeAsync(purchase, mConsumeFinishedListener); 
}

现在我无法使用该产品,甚至无法购买.为什么Play商店完成了购买但没有将购买详细信息返回给回调?

Now I am not able consume the product or even not able to purchase. Why is it so that play store completed the purchase but it didn't return the purchase details to callback?

据我所知,是否已经为该SKUID购买了商品,它应该返回购买详细信息.但就我而言,它没有返回购买明细.

As far as I know if an item already purchased for that SKUID it should return the purchase details. But in my case it is not returning the purchase details.

任何人都可以帮助我解决此问题吗?

Can any one help me to resolve this issue?

推荐答案

响应中是否显示错误代码2?

Do you get an error code of 2 in the response?

这似乎是Google Play服务问题,并且由于没有网络,因此Google Play客户端应用无法同步.当网络可用并且发生同步(几个小时后)后,您就可以再次购买该产品.

It looks like an issue of Google Play services and the Google Play client app getting out of sync because of no network. When the network is available and the sync happens (in a few hours time), you'll be able to buy the product again.

这篇关于Android应用内购买:购买时弹出网络失败,但购买完成后收到电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆