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

cc.fovea.cordova.purchase

v10.5.3

Published

Cordova Purchase plugin for iOS, Android, Windows (AppStore, Play, UWP)

Downloads

726

Readme

Cordova Purchase Plugin

In-App Purchases for Cordova

Build Status


Need professional help and support? Contact Me.

I dedicate a considerable amount of my free time to developing and maintaining this Cordova plugin, along with my other Open Source software. To help ensure this plugin is kept updated, new features are added and bugfixes are implemented quickly, please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. Please consider donating if you're using this plugin in an app that makes you money, if you're being paid to make the app, if you're asking for new features or priority bug fixes. Thank you!

Summary

This plugin allows In-App Purchases to be made from Cordova, PhoneGap and Ionic applications.

It lets you handle in-app purchases on many platforms with a single codebase.

Features

| | ios | android | win-8 | win-10/uwp | mac | |--|--|--|--|--|--| | consumables | ✅ | ✅ | ✅ | ✅ | ✅ | | non consumables | ✅ | ✅ | ✅ | ✅ | ✅ | | subscriptions | ✅ | ✅ | ✅ | ✅ | ✅ | | restore purchases | ✅ | ✅ | ✅ | ✅ | ✅ | | receipt validations | ✅ | ✅ | | ✅ | ✅ | | downloadable content | ✅ | | | | ✅ | | introductory prices | ✅ | ✅ | | ✅ | ✅ |

Supported platforms

  • iOS version 6.0 or higher.
  • Android version 2.2 (API level 8) or higher
    • with Google Play client version 3.9.16 or higher
  • Windows Store/Phone 8.1 or higher
  • Windows 10 Mobile
  • macOS version 10
  • Xbox One
    • (and any platform supporting Microsoft's UWP)

Installation

Install the plugin (Cordova)

cordova plugin add cordova-plugin-purchase

Install the plugin (PhoneGap)

Add the following to your config.xml file:

<gap:plugin name="cordova-plugin-purchase" source="npm" version="9.0.0"></gap:plugin>

Install recommended plugins

Sometimes, the plugin cannot connect to the app store because it has no network connection. It will then retry either:

  • periodically after a certain amount of time;
  • when the device fires an 'online' event.

The cordova-plugin-network-information plugin is required in order for the 'online' event to be properly received in the Cordova application. Without it, this plugin will only be able to use the periodic check to determine if the device is back online.

Setup your Application

See Setup iOS Applications and Setup Android Applications.

Getting Started

If you don't know much about In-App Purchases, you'll find a good overview on the subject from those guys:

They all share the same concepts, so they are a good reads in all cases, with some advice that apply to all platforms.

To ease the beggining of your journey into the intimidating world of In-App Purchase with Cordova, we wrote a guide which hopefully will help you get things done: https://purchase.cordova.fovea.cc/

In short, you'll have two main tasks to accomplish:

  1. Setup your application and In-App Products on AppStore, Play or Azure platforms using their respective web interfaces.
  2. Add In-App Purchase code to your application.

For platform setup, the wiki contains good information.

For the code itself, the API Documentation is a definitely a recommended read.

Documentation

Extra Resources

For iOS

Extensions

Have a very simple need? Maybe this will help.

Subscriptions

For proper subscription support, you need a receipt validation server. You can implement your own or use Fovea's receipt validation service.

Contribute

Contributors:

  • Jean-Christophe Hoelt, Author
  • Josef Fröhle, Support
  • Guillaume Charhon, (now defunct) v1 for android
  • Matt Kane, initial iOS code
  • Mohammad Naghavi, original unification attempt
  • Dave Alden @dpa99c (Apple-hosted IAPs for iOS)

Sponsors

  • For sponsoring most of JC's work on the plugin.
  • Ionic Framework Team (http://ionicframework.com/)
  • For sponsoring the UWP platform.
  • Maxwell C. Moore (MCM Consulting, LLC)
  • Justin Noel @calendee
  • Those guys

Licence

The MIT License

Copyright (c) 2014-2019, Jean-Christophe Hoelt and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.