Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/but0n/cordova-plugin-onestore

a cordova plugin for onestore in-app purchase
https://github.com/but0n/cordova-plugin-onestore

Last synced: 2 days ago
JSON representation

a cordova plugin for onestore in-app purchase

Awesome Lists containing this project

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 if you know other way!)

## Usage

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

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