Amazon

https://docs.coronalabs.com/guide/monetization/IAP/index.html

https://developer.amazon.com/

Apps & Services

https://developer.amazon.com/home.html

  • click New App button
  • click In-App Items tab

  • add an Entitlement with the following screen shot images

    • 114 x 114px PNG
    • 512 x 512px PNG

Products

For instance, you are going to make IAP products like this

name type product id
book01 Entitlements com.kwiksher.bookshelf.book01
book02 Entitlements com.kwiksher.bookshelf.book02

https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs-v2/submitting-iap-items

Once you have added the products, download JSON data file. Later it is copied to App Tester


Build apk

You need a keystore file for IAP and use it for building .apk with Corona simulator

keystore file

syntax

sudo keytool -genkey -v -keystore yourapp.keystore -alias yourapp -keyalg RSA -validity 10000

for example,

sudo keytool -genkey -v -keystore kwikbookshelf.keystore -alias kwikbookshelf -keyalg RSA -validity 10000
  • fist and last name: Naoya Yamamoto
  • origanizational unit: IT
  • orignization: Kwiksher
  • city or Locality: Akihabara
  • state or province: Tokyo
  • country code: jp

build.settings and config.lua

the IAP plugin is added

build.settings

settings = {
    plugins  =  
        --Amazon IAP
        ["plugin.amazon.iap"] = {
            publisherId = "com.coronalabs",
            supportedPlatforms = { ["android-kindle"]=true }
        },
    },
}

Prepareing Test

https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs-v2/testing-iap

please read Suggested Testing Process. It describes the following tools

  • App Tester
  • Receipt Verification Service
  • Live App Testing

App Tester

  • donwload App Tester from Amazon Appstore and install it your device
  • download json file from Portal > App&Service > Your App > In-App Items
  • rename it as “amazon.sdktester.json”
  • copy it to the device

      adb push [_Your_JSON_File_Folder_]/amazon.sdktester.json /mnt/sdcard/amazon.sdktester.json
    

Sandbox mode

store.isSandboxMode() is a Corona API. If you want to check if the app's IAP is running with sandbox mode or not. You can use it with external codes.

Receipt Verification Service(RVS)

if you use server-side receipt verification, Amazon offers RVS sandbox though Kwik does not support server-side verification.

Live App Testing

testers will not be charged for any purchases that they make.

  • Portal > App&Service > Tester Management
  • Portal > App&Service > Your App > Live App Testing

when your apk is ready to test, upload it for Live App Tesing.

https://developer.amazon.com/public/resources/development-tools/live-app-testing/docs/live-app-testing-understanding

https://developer.amazon.com/public/resources/development-tools/live-app-testing/docs/getting-started-with-live-app-testing

Testing without an Amazon Device

TODO: is it virtual device woking with Live App Testing?

https://developer.amazon.com/public/resources/development-tools/ide-tools/tech-docs/testing-without-an-amazon-device

results matching ""

    No results matching ""