Cordova In-app Purchase プラグイン
最終更新
store.when()
.productUpdated(updatedPurchase)
.approved(approvedPurchase)
.finished(finishedPurchase);store.verbosity// Enable maximum logging level
store.verbosity = store.DEBUG;store.register(product); store.register({
id: ITEM_CONSUMABLE_1, // id without package name!
alias: 'Consumable Item',
type: CdvPurchase.ProductType.CONSUMABLE,
platform: CdvPurchase.Platform.APPLE_APPSTORE
});store.registeredProducts.find(product.platform, product.id).alias;store.restorePurchase();// ...
// register products and events handlers here
// ...
//
// then and only then, call refresh.
store.restorePurchases();store.get(id)var product = store.get("consumable1");store.when()store.when()
.productUpdated(updatedPurchase)
.approved(approvedPurchase)
.finished(finishedPurchase);store.ready(callback)store.ready(function() {
console.log("Store is ready");
});const platform = store.defaultPlatform();
store.initialize([platform]);