npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

openiab-cordova-plugin-fortumo

v1.0.40

Published

OpenIAB-Cordova-Plugin forked to be used from phonegap build npm

Downloads

46

Readme

OpenIAB-Cordova-Plugin

OpenIAB plugin for Cordova-based frameworks

Cordova Integration

  1. Add Android platform to your project using CLI.
$ cordova platform add android
  1. Add OpenIAB plugin, referencing repo.
$ cordova plugin add https://github.com/onepf/OpenIAB-Cordova-Plugin.git
  1. Build the app.
$ cordova build
  1. Run it.
$ cordova run android

Intel XDK Integration

Import plugin

Import settings

Import settings

Plugin Usage

  1. Include script to your application.
<script type="text/javascript" src="cordova.js"></script>
  1. Simply call openiab object methods, passing callback functions.

a) Map you SKUs. This step is optional.

openiab.mapSku(function(){}, function(error){}, SKU1, openiab.STORE_NAME.GOOGLE, "sku_product");

b) Set some options.

Set store search strategy.

openiab.options.storeSearchStrategy = openiab.STORE_SEARCH_STRATEGY.INSTALLER_THEN_BEST_FIT;

Set available stores to restrict the set of stores to check.

openiab.options.availableStoreNames = [ openiab.STORE_NAME.GOOGLE, openiab.STORE_NAME.YANDEX ];

Set preferred store names (works only for store search strategy OpenIabHelper.Options.SEARCH_STRATEGY_BEST_FIT and OpenIabHelper.Options.SEARCH_STRATEGY_INSTALLER_THEN_BEST_FIT).

openiab.options.preferredStoreNames = [ openiab.STORE_NAME.GOOGLE, openiab.STORE_NAME.YANDEX ];

Set store keys.

openiab.options.storeKeys = [ [openiab.STORE_NAME.GOOGLE, 'your public key'] ];

Set verifying mode (applicable only for Google Play, Appland, Aptoide, AppMall, SlideMe, Yandex.Store).

openiab.options.verifyMode = openiab.VERIFY_MODE.SKIP;

c) Initialize plugin.

openiab.init(function(){}, function(error){}, [ "SKU1", "SKU2", "SKU3" ]);

d) Start purchase.

openiab.purchaseProduct(function(purchase){}, function(error){}, "SKU");

e) Consume consumable SKUs in order to be able to purchase it again.

openiab.consume(function(purchase){}, function(error){}, "SKU");
  1. Use additional methods to get information about SKUs and purchases.

a) Can be used any time after init is finished.

openiab.getPurchases(function(purchaseList){}, function(error){});

b) Get details of the single SKU.

openiab.getSkuDetails(function(skuDetails){}, function(error){}, "SKU");

c) Get details of the SKU list.

openiab.getSkuListDetails(function(skuDetailsList){}, function(error){}, ["SKU1", "SKU2", "SKU3"]);

Also consider to check sample application for cordova or xdk.

Data Structures

purchase =
{
    itemType:'',
    orderId:'',
    packageName:'',
    sku:'',
    purchaseTime:0,
    purchaseState:0,
    developerPayload:'',
    token:'',
    originalJson:'',
    signature:'',
    appstoreName:''
}

skuDetails =
{
  	itemType:'',
    sku:'',
    type:'',
    price:'',
    title:'',
    description:'',
    json:''
}

error =
{
    code:-1,
	message:''
}