I am trying to implement In App purchases for an Android application. So, in order to support various app store(i.e., Samsung, Google Play, Amazon etc.,) I am using OpenIab from enter link description here
I have successfully used the OpenIab
for Google Play Store.
But, for Amazon
, I am not able to test the InApp purchases.
I want to test the Amazon purchases using Amazon SDK tester. For that, I created the amazon.sdktester.json
and placed at /sdcard/amazon.sdktester.json
Now, as usual, I am performing the following steps
String base64EncodedPublicKey = "xxxxxxxx";
Map<String, String> storeKeys = new HashMap<String, String>();
storeKeys.put(OpenIabHelper.NAME_GOOGLE, base64EncodedPublicKey);
OpenIabHelper helper= new OpenIabHelper(this, storeKeys);
helper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
@Override
public void onIabSetupFinished(IabResult result) {
// TODO Auto-generated method stub
if (result.isSuccess()) {
System.out.println("Successfully Setup finished");
}
else {
System.out.println("Failed to setup IAB"+result.getMessage());
}
}
});
Now, IabSetup
is getting failed i.e., result.isSuccess()
is returning false
.
But, if I use IAP API, then Amazon SDK tester
is launching perfectly.
So, my question is, how to use the Amazon SDK tester with OpenIab
i.e., how to test the Amazon InApp purchases using OpenIab
.