5.0.1 • Published 11 months ago

capacitor-billing v5.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
11 months ago

billing

Capacitor billing plugin

I implemented this Plugin to use in-App purchases in Ionic Apps with Capacitor as bridge. It is customized for a single product with name "fullversion", so you would have to adjust this for your purposes.

Web is not implemented, so check for "web" like below to handle the case. Android and iOS should open the corresponding stores.

Usage:

import {Plugins} from '@capacitor/core';

Plugins.BillingPlugin.querySkuDetails().then((result: any) => {
    if (result) {
        if (result.value === "web") {
            setSkuInfos("web")
        } else {
            setSkuInfos({
                price: result.price,
                price_currency_code: result.price_currency_code,
                title: result.title,
                description: result.description
            });
        }
    } else {
        
    }
})

 Plugins.BillingPlugin.launchBillingFlow().then((result: any) => {
     createPurchase(result).then(purchase => {
         //success
     })
 }).catch(() => {
     
 })

Android:

Register in MainActivity.java

import de.carstenklaffke.billing.BillingPlugin;

this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
    add(BillingPlugin.class);
}});

iOS:

Add Capability for in-App purchases.

5.0.1

11 months ago

5.0.0

12 months ago

3.0.0

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.16

3 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.1

4 years ago