Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cordova-plugin-onestore

but0n22Apache-20.1.1

 cordova plugin add cordova-plugin-onestore

cordova, plugin, onestore, purchase, ecosystem:cordova, cordova-android

readme

Potato Engine Cordova ONEStore Plugin

Install

cordova plugin add cordova-plugin-onestore

You need manually replace the PUBLIC_KEY in src/android/Hello.java with your application's public key. (PR is welcome!)

Usage

Initialization

hello.init(
    () => {alert('init success')},
    e => {alert('init failed: ' + e)}
)

Purchase

hello.purchase(
    'uid',
    'pid',
    data => {
        // let purchaseData = JSON.parse(data);
        alert(data);
    },
    error => {
        alert(error);
    }
)