Android In-App Billing v3:未收到签名

Nav*_*yle 13 android in-app-purchase

我正在我的应用程序上的In App Store中工作,我使用了robotmedia的AndroidBillingLibrary,当我使用库购买android.test.purchased时,响应没问题,我需要的所有数据都在那里.

问题是,当我切换到Android In-App Billing v3时,这都是从响应中收到的,没有签名.

{"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/preparing-iab-app.html#GetSample但没有签名.我甚至运行谷歌给出的示例应用程序,但没有运气.

我正确地将我的Base64编码的RSA公钥 mHelper = new IabHelper(this, myPublicKey);

这是我的购买代码 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);
            }
        }
    };
Run Code Online (Sandbox Code Playgroud)

不知何故,我的mPurchaseFinishedListener在购买后没有收到任何东西,但protected void onActivityResult(int requestCode, int resultCode, Intent data)收到了一些东西,但没有签名.

对此有何解决方案?v2接收签名而v3不接收是奇怪的.

Raw*_*ode 12

您没有获得测试ID,android.test.purchased等的签名.

您将收到真实购买的签名.