question

zetha82 avatar image
zetha82 asked

Active Transaction issue

Hi, I have problem to see active transaction with SDKTester. I follow instruction in site.: 1. Create myApp 2. Generate json file 3. Run kindleFireHD7 emulator 4. Install SDKtester.apk to kindle emulator 5. copy json file to /mnt/sdcard/amazon.sdktester.json 6. I run SDK tester and click to Active transaction I check LogCat and it return me message "05-10 07:45:30.843: I/AmazonSDKTester(698): {"transactions":[],"hasMoreTransactions":false} on line 20 of file:///android_asset/web/js/transactions.js " Please can you help with this issue? Regards
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bipin@Amazon avatar image
Bipin@Amazon answered
Hi Zetha, If there is no transaction done with IAP api, the sdk tester dont hold any active transaction hence, you get below message in Logcat 05-13 11:20:02.188: I/AmazonSDKTester(869): Getting Transactions. on line 11 of file:///android_asset/web/js/transactions.js 05-13 11:20:03.420: I/AmazonSDKTester(869): {"transactions":[],"hasMoreTransactions":false} on line 20 of file:///android_asset/web/js/transactions.js if there is a transaction done from your app, then sdk tester shows you below message in Logcat 05-13 11:33:37.470: I/AmazonSDKTester(990): Getting Transactions. on line 11 of file:///android_asset/web/js/transactions.js 05-13 11:33:38.330: I/AmazonSDKTester(990): {"transactions":[{"id":1,"packageName":"com.amazon.amazonapidemos","sku":"com.amazon.buttonclicker.subscription","requestId":"d4127238-3eb9-4be1-bf66-7537a052fbe6","itemType":"SUBSCRIPTION","purchaseDate":1368424987518}],"hasMoreTransactions":false} on line 20 of file:///android_asset/web/js/transactions.js I hope this information helps
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

justincao avatar image
justincao answered
This message cause by your item id in javacode not match with SKU in your JSON file, for example, let's see SampleIAPEntitlementsApp from Amazon Web App SDK ( https://developer.amazon.com/sdk/webapps.html), in MySKU enum, you can see item id is: com.amazon.sample.iap.entitlement.level2, let's open amazon.sdktester.json file located in SampleIAPEntitlementsApp folder (near by AndroidManifest.xml), you can see the content: { "com.amazon.sample.iap.entitlement.level2" : { "itemType": "ENTITLED", "price": 10.00, "title": "Level 2", "description": "An entitlement to play level 2" } } => com.amazon.sample.iap.entitlement.level2 is your SKU. Let's check your project and JSON file again and good luck!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.