iap-receipt-validator
Validates In App Purchases receipts on App Store
Last updated 3 years ago by sibelius .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install iap-receipt-validator 
SYNC missed versions from official npm registry.

iap-receipt-validation - In-App Purchase Receipts validation on App Store

This package provides a simple function to validate IAP Receipts on App Store

installation

npm i --save iap-receipt-validator

usage

import iapReceiptValidator from 'iap-receipt-validator';

const password = 'b212549818ff42ecb65aa45c'; // Shared Secret from iTunes connect
const production = false; // use sandbox or production url for validation
const validateReceipt = iapReceiptValidator(password, production);

async validate(receiptData) {
    try {
        const validationData = await validateReceipt(receiptData);

        // check if Auto-Renewable Subscription is still valid
        // validationData['latest_receipt_info'][0].expires_date > today
    } catch(err) {
        console.log(err.valid, err.error, err.message)
    }
}

kickstarted by npm-boom

Current Tags

  • 1.0.6                                ...           latest (3 years ago)

6 Versions

  • 1.0.6                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 8
Dependencies (1)
Dev Dependencies (8)

Copyright 2014 - 2017 © taobao.org |