GitXplorerGitXplorer
s

iap-receipt-validator

public
98 stars
25 forks
38 issues

Commits

List of commits on branch master.
Verified
4354ef56fa5318771cf8fd81c7612493f07b26cb

Merge pull request #51 from sibelius/dependabot/add-v2-config-file

ssibelius committed 4 years ago
Verified
ec0495bf62b6ca9b2b8a47e83ccf1cc0f200879f

Upgrade to GitHub-native Dependabot

ddependabot-preview[bot] committed 4 years ago
Verified
75d8a091d0905deb6ba70dadd01226f0c07182f9

Merge pull request #22 from demoran23/patch-1

ssibelius committed 7 years ago
Verified
102a5bb8a7e33973fbe639e451f81843c55f8990

Update README.md

ddemoran23 committed 7 years ago
Verified
903f7048c2e773ec4df9c5ebde55c9d39b8833ec

Merge pull request #18 from squgeim/patch-1

ssibelius committed 7 years ago
Verified
015cc3b846761c6c4a3cd077c7e6eb98110ebbb9

Use application/json in content type header

ssqugeim committed 7 years ago

README

The README file for this repository.

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 isProduction = false; // true = prod, false = sandbox
const validateReceipt = iapReceiptValidator(password, isProduction);

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