Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cozycodegh/cordova-plugin-inapppurchases_testapp
Cordova Test App for testing in-app purchases on Android and iOS
https://github.com/cozycodegh/cordova-plugin-inapppurchases_testapp
app app-store billing cordova cordova-plugin google-play inapp library purchase storekit subscription testing-tool
Last synced: 17 days ago
JSON representation
Cordova Test App for testing in-app purchases on Android and iOS
- Host: GitHub
- URL: https://github.com/cozycodegh/cordova-plugin-inapppurchases_testapp
- Owner: cozycodegh
- License: mit
- Created: 2023-01-14T22:48:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T06:38:26.000Z (almost 2 years ago)
- Last Synced: 2024-10-16T19:04:31.462Z (2 months ago)
- Topics: app, app-store, billing, cordova, cordova-plugin, google-play, inapp, library, purchase, storekit, subscription, testing-tool
- Language: JavaScript
- Homepage:
- Size: 848 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cordova-Plugin-InAppPurchases Testing App
This a full app to test in-app purchases and subscriptions with [**Cordova**](https://cordova.apache.org/) and [**cordova-plugin-inapppurchases**](https://github.com/cozycodegh/cordova-plugin-inapppurchases#Cordova-Plugin-InAppPurchases) by [cozycode.ca](cozycode.ca).
How to test in-app purchases with cordova:
1. Have your app identifier string (eg. `io.cordova.hellocordova`)
Log into App Store Connect and Google Play to create your apps, make a "bundle identifier" (aka widget id, or app identifier)
2. Have your product ids,
[See testing tips to create in-app products and subscriptions](https://github.com/cozycodegh/cordova-plugin-inapppurchases#testing-tips)
3. Create a cordova project to test in:
```
cordova create new_test_dir app.bundle.identifier.to.test
```
4. Add the in-app purchases plugin by `codecodegh`:
```
cd new_test_dir
cordova plugin add cordova-plugin-inapppurchases
cd ..
```
4. Download this repository:
```
git clone https://github.com/cozycodegh/cordova-plugin-inapppurchases_TESTAPP
```
5. Move the files into the cordova project test directory:
```
cp -r cordova-plugin-inapppurchases_TESTAPP/* new_test_dir/
```
6. Edit the `www/js/index.js` file to include your product ids:
```js
var product_id_1 = "ca.cozycode.non_consumable_product";
var product_id_2 = "";
var product_id_3 = "";
```
* For Android, also create a `www/manifest.json` file with the `base64 billing key` in this test project:
```js
{ "play_store_key": "" }
```
7. Run the test app on different platforms:
```
cordova platform add ios
cordova build ios
open platforms/ios/APPNAME.xcworkspace/
cordova platform add android
cordova run --device android
```# Test App Preview:
Android and iOS: