cordova-plugin-onestore

``` cordova plugin add cordova-plugin-onestore ```

Usage no npm install needed!

<script type="module">
  import cordovaPluginOnestore from 'https://cdn.skypack.dev/cordova-plugin-onestore';
</script>

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);
    }
)