Skip to content
This repository has been archived by the owner on Dec 7, 2017. It is now read-only.

ngoclt/phonegap-InAppPurchaseARC

Repository files navigation

phonegap-InAppPurchaseARC

iOS InAppPurchase plugin for PhoneGap ARC project (Tested on Phonegap version 2.1)

This plugin is ARC version of InAppPurchaseManager plugin of usmart

For more informations, check here:

HOW TO USE:

    // request product info
    window.plugins.inAppPurchaseManager.requestProductData("net.ngoclt.ProductExample",
        function(productId, title, description, price) {
                console.log("productId: " + productId + " title: " + title + " description: " + description + " price: " + price);
                // purchase product after got info
                window.plugins.inAppPurchaseManager.makePurchase(productId, 1);
            }, function(id) {
                console.log("Invalid product id: " + id);
            }
        );
    
    // Callback functions
    window.plugins.inAppPurchaseManager.onPurchased = function(transactionIdentifier, productId, transactionReceipt) {
        console.log('>>>>>>>>>>>>>> purchased: ' + productId);

        // navigator.notificationEx.loadingStop();
    }

    window.plugins.inAppPurchaseManager.onFailed = function(errno, errtext) {
        console.log('failed: ' + errtext);
        // navigator.notificationEx.loadingStop();
    }

    window.plugins.inAppPurchaseManager.onRestored = function(transactionIdentifier, productId, originalTransactionReceipt) {
        console.log('restored: ' + productId);
        // navigator.notificationEx.loadingStop();
    }

About

iOS In App Purchase plugin for PhoneGap ARC project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published