Android的应用内计费V3:不接收签名 [英] Android In-App Billing v3: Not receiving signatures

查看:241
本文介绍了Android的应用内计费V3:不接收签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个在App Store中对我的应用程序,我用AndroidBillingLibrary由robotmedia, 当我购买的 android.test.purchased 使用该库的响应是确定的,我需要的数据都在那里。

I'm working on a In App Store on my app, I used AndroidBillingLibrary by robotmedia, when I purchase android.test.purchased using the library the response is OK, all the data I need is in there.

现在的问题是,当我切换到的 Android的应用内结算V3 这是所有从收到的响应,没有签名。

The problem is, when I switched to Android In-App Billing v3 this is all received from the response, no signatures.

<$c$c>{"packageName":"com.my.sampleapp","orderId":"transactionId.android.test.purchased","productId":"android.test.purchased","developerPayload":"","purchaseTime":0,"purchaseState":0,"purchaseToken":"inapp:com.my.sampleapp:android.test.purchased"}

{"packageName":"com.my.sampleapp","orderId":"transactionId.android.test.purchased","productId":"android.test.purchased","developerPayload":"","purchaseTime":0,"purchaseState":0,"purchaseToken":"inapp:com.my.sampleapp:android.test.purchased"}

我完全按照这个样本的https://developer.android.com/training/in-app-billing/$p$pparing-iab-app.html#GetSample但没有签名。我甚至跑由谷歌,但没有运气给定的样本应用程序。

I followed exactly this sample https://developer.android.com/training/in-app-billing/preparing-iab-app.html#GetSample but there's no signatures. I even run the given sample app by Google but no luck.

我把我的Base64-CN codeD RSA公共密钥正确 mHelper =新IabHelper(这一点,myPublicKey);

I put my Base64-encoded RSA public key correctly in mHelper = new IabHelper(this, myPublicKey);

这是我购买code mHelper.launchPurchaseFlow(这一点,itempackage,10001,mPurchaseFinishedListener);

and this is my purchase code mHelper.launchPurchaseFlow(this, itempackage, 10001, mPurchaseFinishedListener);

OnIabPurchaseFinishedListener mPurchaseFinishedListener = new OnIabPurchaseFinishedListener() {
        public void onIabPurchaseFinished(IabResult result, Purchase purchase) {
            Log.i("Billing", "purchasing: " + result.getMessage());

            if (result.isFailure()) {
                Log.i("Billing", "Error purchasing: " + result);
                return;
            } else if (purchase.getSku().equals("android.test.purchased")) {
                Log.i("Billing - signature", purchase.getSignature());
                consumeItems();
            } else {
                Log.i("Billing", "Error purchasing: " + result);
            }
        }
    };

不知怎的,我的 mPurchaseFinishedListener 购买,但保护无效onActivityResult(INT申请code,INT结果$ C后,不接受任何$ C,意图数据)正在接受的东西,但没有签名。

Somehow my mPurchaseFinishedListener is not receiving anything after the purchase but the protected void onActivityResult(int requestCode, int resultCode, Intent data) is receiving something but there's no signature.

要对此有何解决方案? 这是奇怪的是V2接收签名和v3是不是。

Any solutions to this? It's weird that v2 is receiving signatures and v3 is not.

推荐答案

您没有得到签名的测试标识,android.test.purchased等。

You don't get signatures for the test IDs, android.test.purchased, etc.

您将收到的签名与真正的购买。

You'll receive signatures with real purchases.

这篇关于Android的应用内计费V3:不接收签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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