Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
cordova-plugin-purchase
Advanced tools
Cordova Purchase plugin for iOS, Android, Windows (AppStore, Play, UWP)
In-App Purchases for Cordova
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!
This plugin allows In-App Purchases to be made from Cordova, Ionic and Capacitor applications.
It lets you handle in-app purchases on many platforms with a single codebase.
AppStore (iOS / macOS) | Google Play | Windows 8 | Windows 10 / UWP | Braintree (iOS / Android) | |
---|---|---|---|---|---|
consumables | ✅ | ✅ | |||
non consumables | ✅ | ||||
subscriptions | ✅ | ||||
restore purchases | ✅ | ✅ | |||
receipt validations | ✅ | ✅ | |||
custom payments | ✅ |
cordova plugin add "https://github.com/j3k0/cordova-plugin-purchase.git#v13"
Sometimes, the plugin cannot connect to the app store because it has no network connection. It will then retry either:
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.
When making receipt validation requests, the purchase plugin uses, by default, the browser's ajax capabilities. This sometime causes issues with CORS restriction. CORS also imposes an extra back-and-forth with the server (the CORS preflight request) to ensure the server allows for such request to be made. By installing the advanced-http plugin, you get rid of those issue and benefit from the extra feature of the the plugin, like advanced authentication option. Read the advanced-http plugin documentation for details.
See Setup iOS Applications and Setup Android Applications.
If you wish to learn more about In-App Purchases (IAP), you'll find a good overview on the subject from the various platforms documentation:
All platforms share the same concepts, so they are a good reads in all cases.
To ease the beginning 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: Guide: Cordova In-App Purchase Plugin - v13.0
In short, you'll have two main tasks to accomplish:
For platform setup, the wiki is a good starting point. There's a specific page for the [version 13] release(./wiki/Version-13).
For proper subscription support, you need a receipt validation server. You can implement your own or use Iaptic's receipt validation service.
The MIT License
Copyright (c) 2014-, 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.
FAQs
Cordova Purchase plugin for iOS, Android, Windows (AppStore, Play, UWP)
The npm package cordova-plugin-purchase receives a total of 7,149 weekly downloads. As such, cordova-plugin-purchase popularity was classified as popular.
We found that cordova-plugin-purchase demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.