{"_id":"@courthoang/nativescript-in-app-purchase","_rev":"4-0e8c83e254743103a06f73a4bfdfa607","name":"@courthoang/nativescript-in-app-purchase","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.1":{"name":"@courthoang/nativescript-in-app-purchase","version":"1.0.1","description":"NativeScript plugin to handle in app purchases and subscriptions on Android and iOS.","main":"in-app-purchase","typings":"index.d.ts","nativescript":{"platforms":{"android":"6.0.0","ios":"6.0.1"}},"repository":{"type":"git","url":"git+https://github.com/choang10/nativescript-in-app-purchase.git"},"scripts":{"tsc":"npm i && tsc","build":"npm run tsc && npm run build.native","build.native":"node scripts/build-native.js","tslint":"cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"","ci.tslint":"npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/platforms/**'","prepack":"npm run build.native","demo.ios":"npm i && cd ../demo && tns run ios","demo.ios.debug":"npm i && cd ../demo && tns debug ios","demo.android":"npm i && cd ../demo && tns run android","demo.android.debug":"npm i && cd ../demo && tns debug android","demo.reset":"cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json","plugin.prepare":"npm run build && cd ../demo && tns plugin remove nativescript-in-app-purchase && tns plugin add ../src && cd ../demo && tns plugin remove nativescript-in-app-purchase && tns plugin add ../src","clean":"npm run demo.reset && npx rimraf -- node_modules package-lock.json && npm i"},"keywords":["NativeScript","JavaScript","Android","iOS"],"author":{"name":"Superfusion Mobile","email":"superfusion.mobile@googlemail.com"},"bugs":{"url":"https://github.com/daniele-pecora/nativescript-in-app-purchase/issues"},"license":"Apache-2.0","homepage":"https://github.com/daniele-pecora/nativescript-in-app-purchase","devDependencies":{"tns-core-modules":"^6.0.0","tns-platform-declarations":"^6.0.0","typescript":"~3.4.5","prompt":"^1.0.0","rimraf":"^2.6.3","tslint":"^5.12.1","semver":"^5.6.0"},"dependencies":{},"bootstrapper":"nativescript-plugin-seed","_resolved":"","_integrity":"","_from":"file:courthoang-nativescript-in-app-purchase-1.0.1.tgz","_id":"@courthoang/nativescript-in-app-purchase@1.0.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-81NeUWjHOTWrw+Ut3t0fmhu8oM8Kj0XSy9Qw0yv6cqgqNK9zDF+p95pIjyudwDp/tcT8yKkH3S29WzminKW48A==","shasum":"8e0aa83f264453cf4ac82e2991a0e8195ab173bb","tarball":"https://registry.npmjs.org/@courthoang/nativescript-in-app-purchase/-/nativescript-in-app-purchase-1.0.1.tgz","fileCount":19,"unpackedSize":118509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLaT8CRA9TVsSAnZWagAAsYIP/R1HI35jsT5jnCB0wuTR\ndI4549qnhiEvNLpWvM3BCEiVZhSYMs2T/y6qgLRCbeP98el0LnyQcDkvuqml\nTfYXeovipchv69G1VqRQxbfyr8+S8zlpUympydPsjWek6GAPUCDdnZsw4B77\nDyR32wVYH4o2aQKZmfb+VhlknvU2xyF/K3UUpEpVE4/Frp4T8a0JlFX+z+Ge\nXBUlJa+4DzZDTPWg18Lbhrw39HLdyvHwRF0JAWjjc03jrLrE4G61gQ31iFC9\njdivBHJgbEwda1N0jTN54W1BcYrVRADA5vK9AyCLa8F9L4G3RS0rZwzY6ksJ\nbfkePDMDZkWeocHebmb/xLDaPqA+EnEI8FzQlZxBftF1iTGpn3lngMq45mHZ\nHqhABtjk1vP95t/EVm0iGvfE6e6y3wg/BX+u7TJdrXEHtNPcmJFDY72n4zdS\nCvniIE/Zo05GV82dPScsG913WvI5k+Js8qSZnoF4IIt1UGPWpxzkk0Ja5uE1\n2gKWcaVahi+NARRwCr5BE1Q7CNjr0dh+qL7rntA4t+4dJQnA0c91sW+yo74d\nlcV9G4Mowxx297qPOoAGu82X0OrIvT17CT4vxbHixejHfLYu/MZQoVQQX3o2\nsQedG5DX0yCZ64O7RPVXSlKEHoXktysSCmQ9mpv+cEDxgqleXDngHjr+wytU\nXY4B\r\n=aO17\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5la2hp4PbFgqflTZwFQWLenAG7KxLxIPmPS+37zG44wIhAKaAT+c+eDrYS6hko1K22InlyBWWlENp741XXseJ5UOI"}]},"maintainers":[{"name":"courthoang","email":"court@biju.io"}],"_npmUser":{"name":"courthoang","email":"court@biju.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nativescript-in-app-purchase_1.0.1_1596826876254_0.08077394536233617"},"_hasShrinkwrap":false},"1.0.2":{"name":"@courthoang/nativescript-in-app-purchase","version":"1.0.2","description":"NativeScript plugin to handle in app purchases and subscriptions on Android and iOS.","main":"in-app-purchase","typings":"index.d.ts","nativescript":{"platforms":{"android":"6.0.0","ios":"6.0.1"}},"repository":{"type":"git","url":"git+https://github.com/choang10/nativescript-in-app-purchase.git"},"scripts":{"tsc":"npm i && tsc","build":"npm run tsc && npm run build.native","build.native":"node scripts/build-native.js","tslint":"cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"","ci.tslint":"npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/platforms/**'","prepack":"npm run build.native","demo.ios":"npm i && cd ../demo && tns run ios","demo.ios.debug":"npm i && cd ../demo && tns debug ios","demo.android":"npm i && cd ../demo && tns run android","demo.android.debug":"npm i && cd ../demo && tns debug android","demo.reset":"cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json","plugin.prepare":"npm run build && cd ../demo && tns plugin remove nativescript-in-app-purchase && tns plugin add ../src && cd ../demo && tns plugin remove nativescript-in-app-purchase && tns plugin add ../src","clean":"npm run demo.reset && npx rimraf -- node_modules package-lock.json && npm i"},"keywords":["NativeScript","JavaScript","Android","iOS"],"author":{"name":"Superfusion Mobile","email":"superfusion.mobile@googlemail.com"},"bugs":{"url":"https://github.com/daniele-pecora/nativescript-in-app-purchase/issues"},"license":"Apache-2.0","homepage":"https://github.com/daniele-pecora/nativescript-in-app-purchase","devDependencies":{"tns-core-modules":"^6.0.0","tns-platform-declarations":"^6.0.0","typescript":"~3.4.5","prompt":"^1.0.0","rimraf":"^2.6.3","tslint":"^5.12.1","semver":"^5.6.0"},"dependencies":{},"bootstrapper":"nativescript-plugin-seed","_resolved":"","_integrity":"","_from":"file:courthoang-nativescript-in-app-purchase-1.0.2.tgz","_id":"@courthoang/nativescript-in-app-purchase@1.0.2","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-gOXvP0N+f7WqpY9dUuRaMGcSqZuTNU92wvaDbmejurG9XRkrO0YUSaAd6zdD6B0OoidgAW9h8VLqC2AEDHGb1A==","shasum":"839bd22cc14749d6d3150fe6565a7954a4545431","tarball":"https://registry.npmjs.org/@courthoang/nativescript-in-app-purchase/-/nativescript-in-app-purchase-1.0.2.tgz","fileCount":19,"unpackedSize":118495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLaXCCRA9TVsSAnZWagAAt9UP/3/sn2KiT7j4tnKY0dLL\nc4YdSrW5WqqNm9iNfKR3Vu99qjXzZjUtNKQJmlQbrsmGR819UVREoSQZl+kF\noId4VIw8JAJ2BSvggLv3mz4XusKMeDz0ZQ86wEF2SLWwZ0aE/yQDO1ofya8/\naF7RN3b9jLmzXbFLpyqlZtAHGxWRFbiVv5KcYGhzQf2ezNwpJYy9i1vm3JXx\n2ew8JErr3QB5VGJ0q20WbYLiZ1OQbq3l0wvfOHb9aHX0wo+5LPjK683Wg+AC\nTUAvsfQZ+/36atfcMlr7N9nG4i0dHiOEEfLHPHrngJgTyL+zuIITg3z3ddAU\nrgMmqrEWx39JSKHfwTPsm0S8KOpDWw3uD5+ghys6n2Jz7Wqq62cZ5qP6pR3C\nPWmlznHzrGJZuoVrN2shEusBs5nEv6lNRMa9VcwgqcKEzOQZc96Z0FEUgHOa\nyDrjCdPG/5apVJ091eim2z14rrq52+uShmp8oNOX5xSNT3qre+kXfC0bBsb3\nczzUmo3nS8TY/JPzdK11w+xtbCrGtpRBrEmIV31SdnTunP0r4wkKLa2F2C2U\nQubRPG7mIYysOpQBs2WjM7i2gGT2VkR3iQZnuvBw7rO9TEqe1JGNnAZ3IBml\ntdqd6eQn409RshXzJ9jpKWzqOE1agnkLaW/EwRMyzL67vi+8gTkqUkqGWzql\na+Ta\r\n=2PIt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE3MS/fS6ea1KEY0F3Vor5RIEJeraOZcy5MEOMaNjWZgIhAOo+UbkILdCTyivJkFq3EA+d3cKox44Fr5pGgJ7vcHDF"}]},"maintainers":[{"name":"courthoang","email":"court@biju.io"}],"_npmUser":{"name":"courthoang","email":"court@biju.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nativescript-in-app-purchase_1.0.2_1596827074487_0.7836180192069888"},"_hasShrinkwrap":false},"1.0.3":{"name":"@courthoang/nativescript-in-app-purchase","version":"1.0.3","description":"NativeScript plugin to handle in app purchases and subscriptions on Android and iOS.","main":"in-app-purchase","typings":"index.d.ts","nativescript":{"platforms":{"android":"6.0.0","ios":"6.0.1"}},"repository":{"type":"git","url":"git+https://github.com/choang10/nativescript-in-app-purchase.git"},"scripts":{"tsc":"npm i && tsc","build":"npm run tsc && npm run build.native","build.native":"node scripts/build-native.js","tslint":"cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"","ci.tslint":"npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/platforms/**'","prepack":"npm run build.native","demo.ios":"npm i && cd ../demo && tns run ios","demo.ios.debug":"npm i && cd ../demo && tns debug ios","demo.android":"npm i && cd ../demo && tns run android","demo.android.debug":"npm i && cd ../demo && tns debug android","demo.reset":"cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json","plugin.prepare":"npm run build && cd ../demo && tns plugin remove nativescript-in-app-purchase && tns plugin add ../src && cd ../demo && tns plugin remove nativescript-in-app-purchase && tns plugin add ../src","clean":"npm run demo.reset && npx rimraf -- node_modules package-lock.json && npm i","setup":"npm i && ts-patch install"},"keywords":["NativeScript","JavaScript","Android","iOS"],"author":{"name":"Superfusion Mobile","email":"superfusion.mobile@googlemail.com"},"bugs":{"url":"https://github.com/daniele-pecora/nativescript-in-app-purchase/issues"},"license":"Apache-2.0","homepage":"https://github.com/daniele-pecora/nativescript-in-app-purchase","devDependencies":{"@nativescript/core":"~7.0.0","@nativescript/types":"~7.0.0","@nativescript/webpack":"~3.0.0","typescript":"~3.9.0","prompt":"^1.0.0","rimraf":"^2.6.3","ts-patch":"^1.3.1","tslint":"^5.12.1","semver":"^5.6.0"},"dependencies":{"ts-node":"^9.1.1"},"bootstrapper":"nativescript-plugin-seed","_resolved":"","_integrity":"","_from":"file:courthoang-nativescript-in-app-purchase-1.0.3.tgz","_id":"@courthoang/nativescript-in-app-purchase@1.0.3","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Wa3oArhKGilAcF385/Klx5UWIBQ6moenDEtZKfVesw3R9gLJP9Z4mQcU862da8GKnG6hjVEppAOn8fzRh7aZBA==","shasum":"5b111cd61b04e0655797eb94ec589c0afbd34cd2","tarball":"https://registry.npmjs.org/@courthoang/nativescript-in-app-purchase/-/nativescript-in-app-purchase-1.0.3.tgz","fileCount":19,"unpackedSize":125044,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCYwECRA9TVsSAnZWagAAYtMP/ikejuIBrjr2kAOQCv2p\nunf9Fx04Nl8oz2mctHAXox3Hj2oiHfk/vqsHh3VsE5N8kK9DGV3Yq35tH1u9\nXoTuKmKlehk6LK7pZMB3VQjf4ubDyuukcIz8Ie0Kxp/t57yrCJ8PYVK59l0X\n0FSFXgfd8faIvjW6n+e/aanEdQDJo3Zo7B3Tst7j940kXsF/X3Tdhfr//An1\n8lsrhzsq+HPclAHRdGrJpqMW5z144DtvC8wdFkYID0srsLYIwMPmcWHf5wyW\nEp3hY3cK/6Zb/QAgLAEMX3MIz6/3h/H5eCnrYLM0PUkDbryNqkhkxDNxV00w\nWohNeeFafCQ6am1aIplinHUzwY51kbN9Ei436ZRt2EYLYiI4o/Zc9CypIMON\nlX8kYv3lN5TfJeCUUnjIJfYBjSZaBlC1no6vd31I6TcrsZJulHRoAHzXwZpB\nY89IhSntXmlQo7QtRCq4hPQEOoiG4p3uZjP8QAuCMd+PyTKAOnPaXvkX4XXe\nIYEv0Dlu79jueuNbhWTOmUEPqjaGw9KrXvYNyQxljhnGXdnqtrHIdBFsjPYC\n/E5edq2zFv7geIxlfuCH/7i5avqVG4X+NUscGxJx2W4elYvJ8dfVDkfeKMas\nwYtD9DXaWdgRjwtO6tbcl4ifyYlwOInp+wrBViQXusH1yFjWAon0F/Y26AFO\nSoud\r\n=+wGw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/WI9ZpB5KnBjHzZzjKrxuKSi9KN44M4ZUBHWJm5k9pgIgPVNZJSup6HVQUbWSf18tCHGcDVNBCM5pDR0168mPl/0="}]},"_npmUser":{"name":"courthoang","email":"court@biju.io"},"directories":{},"maintainers":[{"name":"courthoang","email":"court@biju.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nativescript-in-app-purchase_1.0.3_1611238403661_0.4526107168481903"},"_hasShrinkwrap":false},"1.0.4":{"name":"@courthoang/nativescript-in-app-purchase","version":"1.0.4","description":"NativeScript plugin to handle in app purchases and subscriptions on Android and iOS.","main":"in-app-purchase","typings":"index.d.ts","nativescript":{"platforms":{"android":"6.0.0","ios":"6.0.1"}},"repository":{"type":"git","url":"git+https://github.com/choang10/nativescript-in-app-purchase.git"},"scripts":{"tsc":"npm i && tsc","build":"npm run tsc && npm run build.native","build.native":"node scripts/build-native.js","tslint":"cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"","ci.tslint":"npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/platforms/**'","prepack":"npm run build.native","demo.ios":"npm i && cd ../demo && tns run ios","demo.ios.debug":"npm i && cd ../demo && tns debug ios","demo.android":"npm i && cd ../demo && tns run android","demo.android.debug":"npm i && cd ../demo && tns debug android","demo.reset":"cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json","plugin.prepare":"npm run build && cd ../demo && tns plugin remove nativescript-in-app-purchase && tns plugin add ../src && cd ../demo && tns plugin remove nativescript-in-app-purchase && tns plugin add ../src","clean":"npm run demo.reset && npx rimraf -- node_modules package-lock.json && npm i","setup":"npm i && ts-patch install"},"keywords":["NativeScript","JavaScript","Android","iOS"],"author":{"name":"Superfusion Mobile","email":"superfusion.mobile@googlemail.com"},"bugs":{"url":"https://github.com/daniele-pecora/nativescript-in-app-purchase/issues"},"license":"Apache-2.0","homepage":"https://github.com/daniele-pecora/nativescript-in-app-purchase","devDependencies":{"@nativescript/core":"~7.0.0","@nativescript/types":"~7.0.0","@nativescript/webpack":"~3.0.0","typescript":"~3.9.0","prompt":"^1.0.0","rimraf":"^2.6.3","ts-patch":"^1.3.1","tslint":"^5.12.1","semver":"^5.6.0"},"dependencies":{"ts-node":"^9.1.1"},"bootstrapper":"nativescript-plugin-seed","_resolved":"","_integrity":"","_from":"file:courthoang-nativescript-in-app-purchase-1.0.4.tgz","_id":"@courthoang/nativescript-in-app-purchase@1.0.4","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-od1BrFB0bXXt/qPhida7mES7fr8MgtIA+x4C6Pwy9E/Mw2CcCAeCYVcmRhAAFBPvyvoSq+kBFBsVPBZeiNwq5Q==","shasum":"b7a199115c490ddf498bcaf4251d5f51f92a3a13","tarball":"https://registry.npmjs.org/@courthoang/nativescript-in-app-purchase/-/nativescript-in-app-purchase-1.0.4.tgz","fileCount":19,"unpackedSize":125044,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNsXVCRA9TVsSAnZWagAAKQwP/0NEj1RrLT0+J6oDstEO\nHEGMvv+yRiFHSR7Thj+7LUOVDMOVso3ok1DdPk+5LSglScIrHkJbHcBtpmOw\nhw8i3sZrzVMntqjFRCuw5zKSIQbjUgkFV2rEAYqywexwP5UtLhyHOeGqkNG3\npA8IDT2os9JmLKNBPHUVvcR/E2Y+kr1B3Qj3f4oADk7/wIbYrxI6S+kifA8r\nOlRJFGlVQuoJUUJjyGmcL8Obad8QXOQNfXg8kn0bB71LrBg11sUQcMYjHvYH\n3r8vTJ4nUmRwCsXQ8Avb21DLLRXz+4dp5Va221yVM1VPiHS6+HJUqSd28cqt\nT+X1XGAfDHbPKi6790YyTS7+XxMnw3UGb+4of5iwvBunYCxeg2tn8eX/8buW\nIudrsAU0URXsYa//8LPpq8VWRab3dvDrBAQkDzx33GxQmqssqThfhrZShmNe\nZR7sV9wGybFedrp+amFy+etbu8rzow6iZQ9+i07evg2x7PngPdezFi5IeZDl\nrDOrJ0cJ0898dZdRU/aTzyPO/P8BrSo0x6CATnjjsMdKibmyGyohK19D2TRC\n9m8iZC7sMaZkp7CYX4IhiN8gD6q04f3RFCYHkhD/VDJjkBpGbiySZuYpSWvt\nchnA+3kQ52yGul26bo/0V2obiGqV6tinNsWuNTI6acnePy5/oy2IHJ0w7Ltw\nI9jN\r\n=HTOX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB5KhOLsyu121sCDImJwlmzaquGZNkZD2jAU8YvrL8JfAiEAqQ9nOy1slFq/YShkGUERFz7IkwK/jp+3lt3jfz9JUaI="}]},"_npmUser":{"name":"courthoang","email":"court@biju.io"},"directories":{},"maintainers":[{"name":"courthoang","email":"court@biju.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nativescript-in-app-purchase_1.0.4_1614202324945_0.28781256656491605"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-07T19:01:16.222Z","1.0.1":"2020-08-07T19:01:16.365Z","modified":"2022-04-05T01:28:17.201Z","1.0.2":"2020-08-07T19:04:34.661Z","1.0.3":"2021-01-21T14:13:23.797Z","1.0.4":"2021-02-24T21:32:05.144Z"},"maintainers":[{"name":"courthoang","email":"court@biju.io"}],"description":"NativeScript plugin to handle in app purchases and subscriptions on Android and iOS.","homepage":"https://github.com/daniele-pecora/nativescript-in-app-purchase","keywords":["NativeScript","JavaScript","Android","iOS"],"repository":{"type":"git","url":"git+https://github.com/choang10/nativescript-in-app-purchase.git"},"author":{"name":"Superfusion Mobile","email":"superfusion.mobile@googlemail.com"},"bugs":{"url":"https://github.com/daniele-pecora/nativescript-in-app-purchase/issues"},"license":"Apache-2.0","readme":"# nativescript-in-app-purchase\n\nNativeScript plugin to handle in app purchases and subscriptions on Android and iOS.\n\n## (Optional) Prerequisites / Requirements\n\nRefer to the mobile ecosystem provider on how to  \ntest in app purchases.\n\nFor [Apple](https://developer.apple.com/in-app-purchase/)\n head to [developer.apple.com](https://developer.apple.com/in-app-purchase/)\n\nFor Android [Google Play Store](https://developer.android.com/google/play/billing/billing_testing) head over to [developer.android.com](https://developer.android.com/google/play/billing/billing_testing)\n## Installation\n\nInstalling the plugin\n\n```javascript\ntns plugin add nativescript-in-app-purchase\n```\n\n## Usage \n\nUse this typings definition for Typescript and adding _IntelliSense_ support.\n```\n    /// <reference path=\"./node_modules/nativescript-in-app-purchase/index.d.ts\" />\n```\n\n#### Initialization\t\n\nFirst of all it is required to create an instance of `InAppPurchaseManager`.  \n\n```typescript\n    import { OnInit } from '@angular/core'\n    import { InAppPurchaseManager, InAppPurchaseResultCode, InAppPurchaseStateUpdateListener, InAppPurchaseTransactionState, InAppPurchaseType } from 'nativescript-in-app-purchase'\n    export class Test implements OnInit {\n        private inAppPurchaseManager: InAppPurchaseManager\n        constructor() { }\n        ngOnInit(): void {\n            const purchaseStateUpdateListener: InAppPurchaseStateUpdateListener = {\n                onUpdate: (purchaseTransactionState: InAppPurchaseTransactionState): void => {\n                    if (purchaseTransactionState.resultCode === InAppPurchaseResultCode.Purchased) {\n                        // Item has been purchased, sync local items list ...\n                    }\n                },\n                onUpdateHistory: (purchaseTransactionState: InAppPurchaseTransactionState): void => {\n                    if (purchaseTransactionState.resultCode === InAppPurchaseResultCode.Restored) {\n                        // Item has been  restored, sync local items list ...\n                    }\n                }\n            }\n            InAppPurchaseManager.bootStrapInstance(purchaseStateUpdateListener).then(inAppPurchaseManager => {\n                this.inAppPurchaseManager = inAppPurchaseManager\n            })\n        }\n    }\n```\n\n#### Product list\t\n\nGet the list of in app products.  \nTo retrieve the list of in app products you must query a known amount of product IDs.  \n\n```typescript\n    // additional imports required\n    import { InAppPurchaseType, InAppListProductsResult, InAppProduct } from 'nativescript-in-app-purchase'\n\n    // query products\n    queryProducts() {\n        const myProductIds = ['product_1', 'product_2']\n        // For subscriptions change to `InAppPurchaseType.Subscription`\n        const myProductType = InAppPurchaseType.InAppPurchase \n\n        this.inAppPurchaseManager.list(myProductIds, myProductType)\n            .then((result: InAppListProductsResult) => {\n                const products: InAppProduct[] = result.products\n                for (const product of products) {\n                    // get the products ...\n                    console.log(product.title, product)\n                }\n            })\n    }\n```\n\n#### Buy a product\n\nWhen buying a product the result `InAppOrderResult` is only related to the order transaction it self.  \nThe purchase state of the product will be called on the `InAppPurchaseStateUpdateListener#onUpdate` method.  \nThis is where you have to **confirm the purchase** to finish the whole purchasing transaction.  \nThe App Store and Google Play Store **will automatically refund orders** that haven't been confirmed.\n\nBuying a product   \n```typescript\n    // additional imports required\n    import { InAppOrderResult } from 'nativescript-in-app-purchase'\n\n    // by product\n    buy() {\n        const myProducts: InAppProduct[] = []//...\n\n        const productToBuy: InAppProduct = myProducts[0]\n        this.inAppPurchaseManager.order(productToBuy)\n            .then((result: InAppOrderResult) => {\n                if (result.success) {\n                    // order has been processed\n                    // ... expecting confirmation ...\n                    // handle confirmation in `InAppPurchaseStateUpdateListener.onUpdate(...)`\n                }\n            })\n    }\n```\n\nConfirming a product   \n```typescript\n    // additional imports required\n    import { InAppOrderConfirmResult } from 'nativescript-in-app-purchase'\n\n    ngOnInit(): void {\n        const purchaseStateUpdateListener: InAppPurchaseStateUpdateListener = {\n            onUpdate: (purchaseTransactionState: InAppPurchaseTransactionState): void => {\n                if (purchaseTransactionState.resultCode === InAppPurchaseResultCode.Purchased) {\n                    // Item has been purchased, sync local items list ...\n                    this.confirmOrder(purchaseTransactionState)\n                }\n            },\n            onUpdateHistory: (purchaseTransactionState: InAppPurchaseTransactionState): void => {\n                if (purchaseTransactionState.resultCode === InAppPurchaseResultCode.Restored) {\n                    // Item has been  restored, sync local items list ...\n                }\n            }\n        }\n        // ...\n    }\n\n    confirmOrder(purchaseTransactionState: InAppPurchaseTransactionState) {\n        const isConsumable = (productId: string): boolean => { \n            /* determine if is consumable and can be purchased more then once */\n            return false }\n\n        // only purchased products can be confirmed\n        if (purchaseTransactionState.resultCode === InAppPurchaseResultCode.Purchased) {\n            const consumable: boolean = isConsumable(purchaseTransactionState.productIdentifier)\n            this.inAppPurchaseManager.orderConfirm(purchaseTransactionState, consumable)\n                .then((result: InAppOrderConfirmResult) => {\n                    if (result.success) {\n                        // order confirmation has been processed\n                    }\n                })\n\n        }\n    }\n\n```\n\n#### Restore purchases\n\nRestore purchases will get you all items the user already purchased.   \nThe purchase state of the restored product will be called on the `InAppPurchaseStateUpdateListener#onUpdateHistory` method.  \n\n```typescript\n    // additional imports required\n    import { InAppOrderHistoryResult } from 'nativescript-in-app-purchase'\n\n    restoreProducts() {\n        this.inAppPurchaseManager.purchaseHistory()\n            .then((result: InAppOrderHistoryResult) => {\n                if (result.success) {\n                    // purchase history requested\n                    // handle it in `InAppPurchaseStateUpdateListener.onUpdateHistory(...)`\n                }\n            })\n    }\n```\n\n## API\n\n\n- `list(productIds: string[], productType?: InAppPurchaseType): Promise<InAppListProductsResult>`  \nList all products\n- `order(product: InAppProduct): Promise<InAppOrderResult>`  \nOrder a product\n- `orderConfirm(purchaseTransaction: InAppPurchaseTransactionState, consumable: boolean): Promise<InAppOrderConfirmResult>`  \nConfirm the buy of a product to make it final\n- `purchaseHistory(): Promise<InAppOrderHistoryResult>`  \nLoad user's owened products\n- `canMakePayment(): boolean`  \nCheck wether billing is enabled or not\n- `static bootStrapInstance(purchaseStateUpdateListener?: InAppPurchaseStateUpdateListener): Promise<InAppPurchaseManager>`  \nCreate a new instance of the in app purchase manager\n- `shutdown()`  \nClose connection to the unerlying OS billing API\n\n## DEMO App\n\nThere is a demo angular app project included.   \nCheckout this repo and read the [DEMO Readme](./DEMO.md)\n\n## License\n\nApache License Version 2.0, January 2020\n\n## Donation\n\nDonate with Bitcoin   \n**[3GFxvCK4nnTvHcLpVtFDQhdjANzRGBV6G6](bitcoin:3GFxvCK4nnTvHcLpVtFDQhdjANzRGBV6G6)**  \n[![Open in Wallet](https://chart.apis.google.com/chart?chs=200x200&cht=qr&chld=L&chl=bitcoin%3A3GFxvCK4nnTvHcLpVtFDQhdjANzRGBV6G6)](bitcoin:3GFxvCK4nnTvHcLpVtFDQhdjANzRGBV6G6)  \n**[Open in Wallet](bitcoin:3GFxvCK4nnTvHcLpVtFDQhdjANzRGBV6G6)**   ","readmeFilename":"README.md"}