ElectronInAppPurchase.purchaseProduct method
ElectronInAppPurchase › purchaseProduct
Unofficial
Adds the specified product to the payment queue. You should listen for thetransactions-updated event as soon as possible and certainly before you call purchaseProduct. Signature:
purchaseProduct(productID: string, quantity?: number | undefined): Promise<boolean>Parameters:
| Parameter | Type | Description |
|---|---|---|
| productID | string | The identifier of the product to purchase. |
| quantity? | number | undefined | The number of items the user wants to purchase. |
Returns: Promise<boolean> — A promise that resolves with true if the product is valid and added to the payment queue.