0.0.1 • Published 4 years ago

capacitor-iap v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Capacitor Camera Preview

Capacitor plugin that allow to use in app purchase.

Installation

yarn add capacitor-iap

or 

npm i capacitor-iap

iOS Quirks

Create a Products.plist file on ios/App/App with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<string><!-- product id 1--></string>
	<string><!-- product id 2--></string>
</array>
</plist>

Web Quirks

Add import 'capacitor-iap' to you entry script.

Methods

canMakePayments()

Checks if can make payments

return

keytypedescription
canMakePaymentsbooleanIndicates id can make payments

getProducts()

Retrive products information

return

keytypedescription
productsarrayA list of store products

eg.

[{
    "currency": "USD",
    "description": "Some description - localized",
    "price": 49.99,
    "productIdentifier": "<product identifier>",
    "title": "Product title - localized"
}]