$ cordova plugin add com.mediamatrixdoo.amazoniap
By using this Cordova plugin within your app, you enable your customers to use 1-Click ordering to purchase items from Amazon. The plugin will work with Cordova / PhoneGap >= 3.0. It completely wraps Amazon IAP v2.0 API so you can offer consumables, entitlements, or subscriptions in your app.
cordova plugin add https://github.com/zoxxx/cordova-plugin-amazon-in-app-purchasing.git
phonegap local plugin add https://github.com/zoxxx/cordova-plugin-amazon-in-app-purchasing.git
amazonIAP.getProductData(skusArray, successCallback, errorCallback) - This API method will confirm (un)availability of product skus listed in skusArray. You'll also get properties like local pricing and other related properties to the product(s).
amazonIAP.getUserData(successCallback, errorCallback) Amazon recommended to call this method inside onResume event handler to retrieve the user ID of the customer that is currently logged into the Amazon Appstore. Your app should handle multiple users - more specifically, it should handle the case where the user logged into the Amazon Appstore changes.
amazonIAP.getPurchaseUpdates(reset, successCallback, errorCallback) This method retrieves purchase history for the current user. To check if product is canceled, find the most recent receipt (by start date) for product SKU from the returned receipts and verify that the endDate property exists.
amazonIAP.purchase(productSKU, successCallback, errorCallback) This method will initiate purchase for a specific SKU.
amazonIAP.notifyFullfiled(receiptId, successCallback, errorCallback) Amazon recommends calling notifyFullfiled for each product that has been fulfilled in your app. Once receive Fulfilled status for the purchase, Amazon will not try to send the purchase receipt to application any more. It's especially important to call this method for CONSUMABLE purchases.
amazonIAP.notifyUnavailable(receiptId, successCallback, errorCallback) If the product sku is not applicable anymore, call this method.
Amazon provides few options for testing your app before going live. Read more at: https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs-v2/testing-iap-2.0
For bugs and issues please use repository issue tracker. For other inquiries contact me at zoran.b(at)mediamatrixdoo.com. However note that my availability on this project is limited by my spare time.