-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.js
29 lines (18 loc) · 845 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { NativeModules } from 'react-native';
const { RNSubscriptionsAndroid } = NativeModules;
class InAppBilling {
static initBilling(products, callback) {
return RNSubscriptionsAndroid.initBillingClient(products,callback);
}
static getProducts(callback) {
return RNSubscriptionsAndroid.loadSubscriptionProducts(callback);
}
static subscribeTo(oldProductId = null,productId,prorationMode = 1, callback) {
return RNSubscriptionsAndroid.subscribeTo(oldProductId,productId,prorationMode, callback);
}
static subscribeToPlan(oldProductId = null,productId,prorationMode = 1, callback) {
return RNSubscriptionsAndroid.subscribeToPlan(oldProductId,productId,prorationMode, callback);
}
}
module.exports = InAppBilling;
// export default RNSubscriptionsAndroid;