0.1.1 • Published 4 years ago

cordova-plugin-onestore v0.1.1

Weekly downloads
5
License
Apache-2
Repository
github
Last release
4 years ago

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