myket_validation
v1.0.1
Published
A simple npm module for validate https://myket.ir/ payments
Downloads
4
Maintainers
Readme
Myekt Validation
A simple npm module for validate https://myket.ir/ payments
Installation
This is a Node.js module available through the npm registry. Before installing, download and install Node.js.
Installation is done using the
npm install
command:
$ npm install myket_validation
Instantiate module
const myket = require('myket_validation')(access_token, package_name);
Validate Payment
let res = await myket.validate(sku, token);
Success Example:
{
"status": 200,
"data": {
"kind": "androidpublisher#productPurchase",
"purchaseTime": 1586706741000,
"developerPayload": "",
"purchaseState": 0,
"consumptionState": 1
}
}
Error Example:
{
"status": 404,
"data": {
"code": 404,
"messageCode": "SkuIdNotFound",
"translatedMessage": "محصول درون برنامه ای یافت نشد"
}
}