无法从谷歌游戏市场获得订单历史记录

时间:2015-08-02 15:55:05

标签: android in-app-purchase in-app-billing

我正在尝试获取我在InApp结算中所做的订单,但每次尝试它都会让我无效。在play.google.com中,我购买的商品是订单历史记录,但是当我在mPurchaseMap中签入时,它是空的。

我的方法:

 @Override
        public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
            if (result.isFailure()) {
                Log.e("Android", "Problem getting inventory " + result.getMessage() + " code: " + result.getResponse());
            } else {
                Purchase premiumPurchase = inventory.getPurchase(Constants.SKU_PREMIUM_ACCOUNT);
                if(premiumPurchase != null)
                {
                    Log.e("Android", "User is premium");
                    SmokingUtils.changeToPremiuimAccount(getActivity());
                }
                else
                {
                    Log.e("Android", "User is NOT premium");
                }
            }
        }

0 个答案:

没有答案