Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-apple-receipt-verify

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-apple-receipt-verify - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

4

package.json
{
"name": "node-apple-receipt-verify",
"description": "A Node.js module for In-App-Purchase receipt validation for iOS",
"version": "1.1.5",
"version": "1.1.6",
"homepage": "https://github.com/ladeiko/node-apple-receipt-verify",

@@ -61,3 +61,3 @@ "repository": {

},
"readme": "# node-apple-receipt-verify\r\n\r\n\u00A9 Siarhei Ladzeika < <sergey.ladeiko@gmail.com> >\r\n\r\nA Node.js module for In-App-Purchase receipt validation for iOS.\r\n\r\n### Changes\r\n\r\n#### v.1.1.5\r\n* Bugfix\r\n\r\n#### v.1.1.1\r\n* Add special EmptyError class\r\n* Add filter to remove duplicates from response (based on transaction id)\r\n* Now validate also returns Promise, callback is optional\r\n* Add 'extended' option key, if passed, then extra info will be added to every purchase description:\r\n * isTrialPeriod (presents only for subscriptions)\r\n * environment (is the same for all purchases in response)\r\n * originalPurchaseDate\r\n * applicationVersion (is the same for all purchases in response)\r\n * originalApplicationVersion (is the same for all purchases in response)\r\n\r\n#### v.1.0.19\r\n* Fix compilation on Mac OS when there is no openssl in standard paths and openssl was installed with brew.\r\n\r\n#### v.1.0.13\r\n* Fix validation error if UUID specified and running inside console.\r\n\r\n#### v.1.0.12\r\n* Added 'originalTransactionId' to purchase description. \r\n\r\n### Debug Logging\r\n\r\nThe module can optionally turn on verbose debug log.\r\n\r\nIn order to enable the verbose logging, give the following to `.config()`:\r\n\r\n```javascript\r\nvar appleReceiptVerify = require('node-apple-receipt-verify');\r\nappleReceiptVerify.config({\r\n verbose: true\r\n});\r\n```\r\n\r\n### Methods\r\n\r\n#### .config(options [object])\r\n\r\nInitializes module. Can be called more than once to reconfigure module.\r\n\r\n**options**: supports following keys:\r\n- `secret` [string] - Apple shared secret (See it in iTunes Connect: Go to My Apps > (select your app) > In-App Purchases > View or generate a shared secret) [optional]\r\n- `verbose` [boolean] - verbose logging switch, `false` by default. [optional]\r\n- `environment` [array of strings] - defines environments used for receipt validation on Apple servers. Supported environments: 'sandbox', 'production'. The sequence is important. Defaults to `['production']`. [optional]\r\n- `ignoreExpired` - if `true`, then expired purchases are skipped. Defaults to `true`. [optional]\r\n- `extended` - if `true`, then purchases contains extended information. Defaults to `false`. (since v1.1.1) [optional]\r\n\r\n\r\nNOTE: Shared password is required for iTunes subscription purchases.\r\n\r\n#### .validate(options [object], callback [function (err, purchasedProducts [array of objects ])])\r\n\r\nValidates an in-app-purchase receipt.\r\n\r\n**options**: supports keys:\r\n- `receipt` [string] - base64 encoded receipt. [required]\r\n- `device` - iOS vendor identifier. Example `438498A7-4850-41DB-BCBE-4E1756378E39`. If specified, then module will check if receipt belongs to vendor identifier. [optional]\r\n- `ignoreExpired` - if `true`, then expired purchases are skipped. Overrides global `ignoreExpired` specified in `.config()`. [optional]\r\n\r\n**callback**: receives error or list of purchased products embedded in receipt\r\n\r\nThe purchased products list has structure:\r\n\r\n```\r\n[\r\n{\r\n bundleId: <string>,\r\n transactionId: <string>,\r\n productId: <string>,\r\n purchaseDate: <number>,\r\n quantity: <number>,\r\n *expirationDate: <number>,\r\n *isTrialPeriod: <boolean>, \/\/ only for subscriptions and if extented = true\r\n *environment: <string>, \/\/ only if extented = true\r\n *originalPurchaseDate: <number>, \/\/ only if extented = true\r\n *applicationVersion: <string>, \/\/ only if extented = true\r\n *originalApplicationVersion: <string> \/\/ only if extented = true\r\n\r\n},\r\n...\r\n]\r\n```\r\n\r\n### How To Use It\r\n\r\nExample:\r\n\r\n```javascript\r\nvar appleReceiptVerify = require('node-apple-receipt-verify');\r\n\r\n\/\/ Common initialization, later you can pass options for every request in options\r\nappleReceiptVerify.config({\r\n secret: \"1234567890abcdef1234567890abcdef\",\r\n environment: ['sandbox']\r\n});\r\n\r\n\/\/ Callback version\r\nappleReceiptVerify.validate({ receipt: appleReceipt, device: '438498A7-4850-41DB-BCBE-4E1756378E39' }, function (err, products) {\r\n if (err) {\r\n return console.error(err);\r\n }\r\n \/\/ ok!\r\n});\r\n\r\n\/\/ Callback version without device\r\nappleReceiptVerify.validate({ receipt: appleReceipt }, function (err, products) {\r\n if (err) {\r\n return console.error(err);\r\n }\r\n \/\/ ok!\r\n});\r\n\r\n\/\/ Promise version\r\nappleReceiptVerify.validate({ receipt: appleReceipt, device: '438498A7-4850-41DB-BCBE-4E1756378E39' })\r\n .then(function (products) {\r\n \/\/ do something\r\n })\r\n .catch(function (err) {\r\n if (err instanceof appleReceiptVerify.EmptyError) {\r\n ...\r\n }\r\n else {\r\n ...\r\n }\r\n });\r\n```\r\n\r\n### Contact\r\n\r\nIf you have any questions, bugs, etc... - contact me.\r\n"
"readme": "# node-apple-receipt-verify\r\n\r\n\u00A9 Siarhei Ladzeika < <sergey.ladeiko@gmail.com> >\r\n\r\nA Node.js module for In-App-Purchase receipt validation for iOS.\r\n\r\n### Changes\r\n\r\n#### v.1.1.6\r\n* Bugfix\r\n\r\n#### v.1.1.1\r\n* Add special EmptyError class\r\n* Add filter to remove duplicates from response (based on transaction id)\r\n* Now validate also returns Promise, callback is optional\r\n* Add 'extended' option key, if passed, then extra info will be added to every purchase description:\r\n * isTrialPeriod (presents only for subscriptions)\r\n * environment (is the same for all purchases in response)\r\n * originalPurchaseDate\r\n * applicationVersion (is the same for all purchases in response)\r\n * originalApplicationVersion (is the same for all purchases in response)\r\n\r\n#### v.1.0.19\r\n* Fix compilation on Mac OS when there is no openssl in standard paths and openssl was installed with brew.\r\n\r\n#### v.1.0.13\r\n* Fix validation error if UUID specified and running inside console.\r\n\r\n#### v.1.0.12\r\n* Added 'originalTransactionId' to purchase description. \r\n\r\n### Debug Logging\r\n\r\nThe module can optionally turn on verbose debug log.\r\n\r\nIn order to enable the verbose logging, give the following to `.config()`:\r\n\r\n```javascript\r\nvar appleReceiptVerify = require('node-apple-receipt-verify');\r\nappleReceiptVerify.config({\r\n verbose: true\r\n});\r\n```\r\n\r\n### Methods\r\n\r\n#### .config(options [object])\r\n\r\nInitializes module. Can be called more than once to reconfigure module.\r\n\r\n**options**: supports following keys:\r\n- `secret` [string] - Apple shared secret (See it in iTunes Connect: Go to My Apps > (select your app) > In-App Purchases > View or generate a shared secret) [optional]\r\n- `verbose` [boolean] - verbose logging switch, `false` by default. [optional]\r\n- `environment` [array of strings] - defines environments used for receipt validation on Apple servers. Supported environments: 'sandbox', 'production'. The sequence is important. Defaults to `['production']`. [optional]\r\n- `ignoreExpired` - if `true`, then expired purchases are skipped. Defaults to `true`. [optional]\r\n- `extended` - if `true`, then purchases contains extended information. Defaults to `false`. (since v1.1.1) [optional]\r\n\r\n\r\nNOTE: Shared password is required for iTunes subscription purchases.\r\n\r\n#### .validate(options [object], callback [function (err, purchasedProducts [array of objects ])])\r\n\r\nValidates an in-app-purchase receipt.\r\n\r\n**options**: supports keys:\r\n- `receipt` [string] - base64 encoded receipt. [required]\r\n- `device` - iOS vendor identifier. Example `438498A7-4850-41DB-BCBE-4E1756378E39`. If specified, then module will check if receipt belongs to vendor identifier. [optional]\r\n- `ignoreExpired` - if `true`, then expired purchases are skipped. Overrides global `ignoreExpired` specified in `.config()`. [optional]\r\n\r\n**callback**: receives error or list of purchased products embedded in receipt\r\n\r\nThe purchased products list has structure:\r\n\r\n```\r\n[\r\n{\r\n bundleId: <string>,\r\n transactionId: <string>,\r\n productId: <string>,\r\n purchaseDate: <number>,\r\n quantity: <number>,\r\n *expirationDate: <number>,\r\n *isTrialPeriod: <boolean>, \/\/ only for subscriptions and if extented = true\r\n *environment: <string>, \/\/ only if extented = true\r\n *originalPurchaseDate: <number>, \/\/ only if extented = true\r\n *applicationVersion: <string>, \/\/ only if extented = true\r\n *originalApplicationVersion: <string> \/\/ only if extented = true\r\n\r\n},\r\n...\r\n]\r\n```\r\n\r\n### How To Use It\r\n\r\nExample:\r\n\r\n```javascript\r\nvar appleReceiptVerify = require('node-apple-receipt-verify');\r\n\r\n\/\/ Common initialization, later you can pass options for every request in options\r\nappleReceiptVerify.config({\r\n secret: \"1234567890abcdef1234567890abcdef\",\r\n environment: ['sandbox']\r\n});\r\n\r\n\/\/ Callback version\r\nappleReceiptVerify.validate({ receipt: appleReceipt, device: '438498A7-4850-41DB-BCBE-4E1756378E39' }, function (err, products) {\r\n if (err) {\r\n return console.error(err);\r\n }\r\n \/\/ ok!\r\n});\r\n\r\n\/\/ Callback version without device\r\nappleReceiptVerify.validate({ receipt: appleReceipt }, function (err, products) {\r\n if (err) {\r\n return console.error(err);\r\n }\r\n \/\/ ok!\r\n});\r\n\r\n\/\/ Promise version\r\nappleReceiptVerify.validate({ receipt: appleReceipt, device: '438498A7-4850-41DB-BCBE-4E1756378E39' })\r\n .then(function (products) {\r\n \/\/ do something\r\n })\r\n .catch(function (err) {\r\n if (err instanceof appleReceiptVerify.EmptyError) {\r\n ...\r\n }\r\n else {\r\n ...\r\n }\r\n });\r\n```\r\n\r\n### Contact\r\n\r\nIf you have any questions, bugs, etc... - contact me.\r\n"
}

@@ -9,3 +9,3 @@ # node-apple-receipt-verify

#### v.1.1.4
#### v.1.1.6
* Bugfix

@@ -12,0 +12,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc