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

emi-indo-cordova-plugin-iap

v0.0.7

Published

Cordova Plugin cordova plugin In App Purchase

Downloads

5

Readme

emi-indo-cordova-plugin-iap

Cordova Plugin cordova plugin In App Purchase

Support ( Consumable | Non-consumable | Subscriptions )

SDK (billing_version = 6.0.0) Release Notes:

Note

  • It's Not a fork, it's purely rewritten, clean of 3rd party code.

💰Sponsor this project

PayPal

Features

As per original sample:

  • SDK Initialize a BillingClient
  • Show products available to buy
  • Launch the purchase flow
  • Processing purchases
  • Fetching purchases
  • Fetching purchase history

Plugin Installation

cordova plugin add emi-indo-cordova-plugin-iap

Or

cordova plugin add https://github.com/EMI-INDO/emi-indo-cordova-plugin-iap

Remove

cordova plugin rm emi-indo-cordova-plugin-iap

Tabel Response Code = number

| Code | Description | | :------- | :-------------------------------- | | 0 | OK | | 1 | USER_CANCELED | | 2 | SERVICE_UNAVAILABLE | | 3 | BILLING_UNAVAILABLE | | 4 | ITEM_UNAVAILABLE | | 5 | DEVELOPER_ERROR | | 6 | ERROR | | 7 | ITEM_ALREADY_OWNED | | 8 | ITEM_NOT_OWNED | | -1 | SERVICE_DISCONNECTED | | -2 | FEATURE_NOT_SUPPORTED | | 12 | NETWORK_ERROR |

Initialize

cordova.plugins.emiInAppPurchase.initialize(

(result) => { 

  alert(result) // = 0
  
},
 (error) => { 
 
 alert(error) // = Check the table

)

purchase Products

Note

  • isConsumable = boolean
  • if true (consumable) Products can be bought back, productType must be Non-consumable
  • if false Product cannot be repurchased, productType: Non-consumable | Subscriptions
    cordova.plugins.emiInAppPurchase.purchaseProducts(
    
    productType = "Non-consumable", // string (Non-consumable | Subscriptions)
    productId = "id",
    isConsumable = true, // boolean
    title = "title",
    description = "description",
    
    (result) => { 
    
    if (result === 0){
    console.log("Give content to the user.")
    }
    alert(result) // = 0
    }
    },
    (error) => { 
    // 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -1 | -2 | 12 
   
     switch (error) {
      case 1:
      console.log("Check the table Description")
      break
      case 2:
      console.log("Check the table Description")
      break
      case 7:
      console.log("Call Restore purchase")
      break
      // and so on
     }
    // alert(error)
    
    })

Get Product Detail

Note

  • position = String
  • value = ProductId | Title | Description | Item_Price | Any
cordova.plugins.emiInAppPurchase.getProductDetail(

    productType = "Non-consumable", // string (Non-consumable | Subscriptions)
    productId = "id",
    position = "ProductId", 
    (result) => { alert(result) },
    (error) => { alert(error)

    });

Get Purchase History

Note

  • position = String
  • value = Purchase_Token | Original_Json | Quantity | Signature | Developer_Payload | Products | Purchase_Time | Any
cordova.plugins.emiInAppPurchase.getPurchaseHistory(

    productType = "Non-consumable", // string (Non-consumable | Subscriptions)
    position = "Purchase_Token", 
    (result) => { alert(result) },
    (error) => { alert(error)

    });

Restore Purchases

Note

  • position = String
  • value = OrderId | Purchase_Token | Package_Name | Purchase_Time | Purchase_State | Quantity | Signature | Original_Json | ProductId | Any
cordova.plugins.emiInAppPurchase.restorePurchases(

    productType = "Non-consumable", // string (Non-consumable | Subscriptions)
    position = "OrderId", 
    (result) => { alert(result) },
    (error) => { alert(error)

    });

Support Platform ( Android )

Coming soon Plugin ( Store user purchase data )

  • Firebase Authentication
  • Firebase Realtime Database

💰Sponsor this project

PayPal