I am working on the In App Store in my application, I used AndroidBillingLibrary from robotmedia when I buy android.test.purchased using the library, the answer is ok, all the data I need is there.
The problem is that when I switched to Android In-App Billing v3 , it all came from the answer, without signatures.
{"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"}
I followed exactly this sample https://developer.android.com/training/in-app-billing/preparing-iab-app.html#GetSample , but there is no signature. I even run this sample Google app, but no luck.
I correctly set the Base64-encoded RSA public key mHelper = new IabHelper(this, myPublicKey);
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); } } };
Somehow my mPurchaseFinishedListener does not receive anything after the purchase, but protected void onActivityResult(int requestCode, int resultCode, Intent data) receives something, but there is no signature there.
Any solutions? It is strange that v2 receives signatures, but v3 does not.