capacitor-myket-billing
v0.0.1
Published
A Bridge Between Myket Billing Client SDK and Capacitor App
Readme
capacitor-myket-billing
A Bridge Between Myket Billing Client SDK and Capacitor App
Install
npm install capacitor-myket-billing
npx cap syncAPI
initialize(...)connect()getProducts(...)purchaseProduct(...)consumePurchase(...)getPurchases()disconnect()- Interfaces
initialize(...)
initialize(options: { publicKey: string; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------------- |
| options | { publicKey: string; } |
connect()
connect() => Promise<void>getProducts(...)
getProducts(options: { productIds: string[]; }) => Promise<ProductsResult>| Param | Type |
| ------------- | -------------------------------------- |
| options | { productIds: string[]; } |
Returns: Promise<ProductsResult>
purchaseProduct(...)
purchaseProduct(options: { productId: string; payload?: string; }) => Promise<PurchaseResult>| Param | Type |
| ------------- | ----------------------------------------------------- |
| options | { productId: string; payload?: string; } |
Returns: Promise<PurchaseResult>
consumePurchase(...)
consumePurchase(options: { purchaseToken: string; }) => Promise<void>| Param | Type |
| ------------- | --------------------------------------- |
| options | { purchaseToken: string; } |
getPurchases()
getPurchases() => Promise<PurchasesResult>Returns: Promise<PurchasesResult>
disconnect()
disconnect() => Promise<void>Interfaces
ProductsResult
| Prop | Type |
| -------------- | --------------------------- |
| products | MyketProduct[] |
MyketProduct
| Prop | Type |
| ----------------------- | ------------------- |
| productId | string |
| title | string |
| description | string |
| price | string |
| priceAmountMicros | number |
| priceCurrencyCode | string |
PurchaseResult
| Prop | Type |
| -------------- | ------------------------------------------------------- |
| success | boolean |
| purchase | MyketPurchase |
| error | string |
MyketPurchase
| Prop | Type |
| ---------------------- | -------------------- |
| orderId | string |
| packageName | string |
| productId | string |
| purchaseTime | number |
| purchaseToken | string |
| developerPayload | string |
| isAcknowledged | boolean |
PurchasesResult
| Prop | Type |
| --------------- | ---------------------------- |
| purchases | MyketPurchase[] |
