@purchasely/cordova-plugin-purchasely

Purchasely is a solution to ease the integration and boost your In-App Purchases & Subscriptions on the App Store, Google Play Store, Amazon Appstore and Huawei App Gallery.

Usage no npm install needed!

<script type="module">
  import purchaselyCordovaPluginPurchasely from 'https://cdn.skypack.dev/@purchasely/cordova-plugin-purchasely';
</script>

README

Cordova plugin Purchasely

Purchasely is a solution to ease the integration and boost your In-App Purchase & Subscriptions on the App Store, Google Play Store and Huawei App Gallery.

Installation

cordova plugin add @purchasely/cordova-plugin-purchasely

Usage

Purchasely.startWithAPIKey('API_KEY', ['Google'], null, Purchasely.LogLevel.DEBUG, false);

Purchasely.presentPresentationWithIdentifier(
    'my_presentation_id',
    (callback) => {
        console.log(callback);
        if(callback.result == Purchasely.PurchaseResult.CANCELLED) {
            console.log("User cancelled purchased");
        } else {
            console.log("User purchased " + callback.plan.name);
        }
    },
    (error) => {
        console.log("Error with purchase : " + error);
    }
);

🏁 Documentation

A complete documentation is available on our website https://docs.purchasely.com