react-native-iap 8.0.9 → 8.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -51,7 +51,10 @@ class RNIapAmazonModule(reactContext: ReactApplicationContext?) :
|
|
|
51
51
|
var ii = 0
|
|
52
52
|
val skuSize = skuArr.size()
|
|
53
53
|
while (ii < skuSize) {
|
|
54
|
-
|
|
54
|
+
val sku = skuArr.getString(ii)
|
|
55
|
+
if (sku is String) {
|
|
56
|
+
productSkus.add(sku)
|
|
57
|
+
}
|
|
55
58
|
ii++
|
|
56
59
|
}
|
|
57
60
|
DoobooUtils.instance.addPromiseForKey(PROMISE_GET_PRODUCT_DATA, promise)
|
|
@@ -203,7 +203,10 @@ class RNIapModule(reactContext: ReactApplicationContext) :
|
|
|
203
203
|
override fun run(billingClient: BillingClient) {
|
|
204
204
|
val skuList = ArrayList<String>()
|
|
205
205
|
for (i in 0 until skuArr.size()) {
|
|
206
|
-
|
|
206
|
+
val sku = skuArr.getString(i)
|
|
207
|
+
if (sku is String) {
|
|
208
|
+
skuList.add(sku)
|
|
209
|
+
}
|
|
207
210
|
}
|
|
208
211
|
val params = SkuDetailsParams.newBuilder()
|
|
209
212
|
params.setSkusList(skuList).setType(type!!)
|
package/index.js.flow
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-iap",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.10",
|
|
4
4
|
"packageManager": "yarn@3.2.0",
|
|
5
5
|
"description": "React Native In App Purchase Module.",
|
|
6
6
|
"main": "index.js",
|
|
@@ -44,31 +44,31 @@
|
|
|
44
44
|
"dooboolab-welcome": "1.3.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@babel/core": "7.
|
|
48
|
-
"@babel/plugin-proposal-class-properties": "7.
|
|
49
|
-
"@babel/plugin-proposal-private-methods": "7.
|
|
50
|
-
"@babel/preset-env": "7.
|
|
51
|
-
"@babel/preset-react": "7.
|
|
52
|
-
"@babel/preset-typescript": "7.
|
|
53
|
-
"@dooboo/eslint-config": "1.
|
|
54
|
-
"@testing-library/jest-native": "4.0.
|
|
55
|
-
"@testing-library/react-native": "
|
|
56
|
-
"@types/eslint": "8.2
|
|
57
|
-
"@types/jest": "27.
|
|
58
|
-
"@types/react": "
|
|
59
|
-
"@types/react-native": "0.
|
|
60
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
47
|
+
"@babel/core": "7.18.2",
|
|
48
|
+
"@babel/plugin-proposal-class-properties": "7.17.12",
|
|
49
|
+
"@babel/plugin-proposal-private-methods": "7.17.12",
|
|
50
|
+
"@babel/preset-env": "7.18.2",
|
|
51
|
+
"@babel/preset-react": "7.17.12",
|
|
52
|
+
"@babel/preset-typescript": "7.17.12",
|
|
53
|
+
"@dooboo/eslint-config": "1.3.4",
|
|
54
|
+
"@testing-library/jest-native": "4.0.5",
|
|
55
|
+
"@testing-library/react-native": "9.1.0",
|
|
56
|
+
"@types/eslint": "8.4.2",
|
|
57
|
+
"@types/jest": "27.5.1",
|
|
58
|
+
"@types/react": "18.0.10",
|
|
59
|
+
"@types/react-native": "0.67.7",
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
61
61
|
"babel-core": "7.0.0-bridge.0",
|
|
62
|
-
"babel-jest": "
|
|
63
|
-
"eslint": "8.
|
|
64
|
-
"flow-bin": "0.
|
|
65
|
-
"flowgen": "1.
|
|
66
|
-
"jest": "
|
|
67
|
-
"metro-react-native-babel-preset": "0.
|
|
62
|
+
"babel-jest": "28.1.0",
|
|
63
|
+
"eslint": "8.16.0",
|
|
64
|
+
"flow-bin": "0.179.0",
|
|
65
|
+
"flowgen": "1.19.0",
|
|
66
|
+
"jest": "28.1.0",
|
|
67
|
+
"metro-react-native-babel-preset": "0.71.0",
|
|
68
68
|
"monolinter": "1.0.4",
|
|
69
|
-
"prettier": "2.
|
|
70
|
-
"react-native": "0.
|
|
71
|
-
"ts-jest": "
|
|
72
|
-
"typescript": "4.
|
|
69
|
+
"prettier": "2.6.2",
|
|
70
|
+
"react-native": "0.66.4",
|
|
71
|
+
"ts-jest": "28.0.3",
|
|
72
|
+
"typescript": "4.7.2"
|
|
73
73
|
}
|
|
74
74
|
}
|
package/src/iap.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ export declare const requestPurchaseWithQuantityIOS: (sku: string, quantity: num
|
|
|
79
79
|
* @param {string} developerPayloadAndroid Android developerPayload.
|
|
80
80
|
* @returns {Promise<string | void> }
|
|
81
81
|
*/
|
|
82
|
-
export declare const finishTransaction: (purchase: InAppPurchase | ProductPurchase, isConsumable?: boolean
|
|
82
|
+
export declare const finishTransaction: (purchase: InAppPurchase | ProductPurchase, isConsumable?: boolean, developerPayloadAndroid?: string) => Promise<string | void>;
|
|
83
83
|
/**
|
|
84
84
|
* Clear Transaction (iOS only)
|
|
85
85
|
* Finish remaining transactions. Related to issue #257 and #801
|
|
@@ -99,7 +99,7 @@ export declare const clearProductsIOS: () => Promise<void>;
|
|
|
99
99
|
* @param {string} token The product's token (on Android)
|
|
100
100
|
* @returns {Promise<PurchaseResult | void>}
|
|
101
101
|
*/
|
|
102
|
-
export declare const acknowledgePurchaseAndroid: (token: string, developerPayload?: string
|
|
102
|
+
export declare const acknowledgePurchaseAndroid: (token: string, developerPayload?: string) => Promise<PurchaseResult | void>;
|
|
103
103
|
/**
|
|
104
104
|
* Deep link to subscriptions screen on Android. No-op on iOS.
|
|
105
105
|
* @param {string} sku The product's SKU (on Android)
|
|
@@ -140,7 +140,7 @@ export declare const requestPurchaseWithOfferIOS: (sku: string, forUser: string,
|
|
|
140
140
|
* @param {boolean} isTest whether this is in test environment which is sandbox.
|
|
141
141
|
* @returns {Promise<Apple.ReceiptValidationResponse | false>}
|
|
142
142
|
*/
|
|
143
|
-
export declare const validateReceiptIos: (receiptBody: Record<string, unknown>, isTest?: boolean
|
|
143
|
+
export declare const validateReceiptIos: (receiptBody: Record<string, unknown>, isTest?: boolean) => Promise<Apple.ReceiptValidationResponse | false>;
|
|
144
144
|
/**
|
|
145
145
|
* Validate receipt for Android. NOTE: This method is here for debugging purposes only. Including
|
|
146
146
|
* your access token in the binary you ship to users is potentially dangerous.
|
|
@@ -152,7 +152,7 @@ export declare const validateReceiptIos: (receiptBody: Record<string, unknown>,
|
|
|
152
152
|
* @param {boolean} isSub whether this is subscription or inapp. `true` for subscription.
|
|
153
153
|
* @returns {Promise<object>}
|
|
154
154
|
*/
|
|
155
|
-
export declare const validateReceiptAndroid: (packageName: string, productId: string, productToken: string, accessToken: string, isSub?: boolean
|
|
155
|
+
export declare const validateReceiptAndroid: (packageName: string, productId: string, productToken: string, accessToken: string, isSub?: boolean) => Promise<Android.ReceiptType>;
|
|
156
156
|
/**
|
|
157
157
|
* Validate receipt for Amazon. NOTE: This method is here for debugging purposes only. Including
|
|
158
158
|
* your developer secret in the binary you ship to users is potentially dangerous.
|
|
@@ -179,7 +179,7 @@ export declare const purchaseErrorListener: (listener: (errorEvent: PurchaseErro
|
|
|
179
179
|
* @param {forceRefresh?:boolean}
|
|
180
180
|
* @returns {Promise<string>}
|
|
181
181
|
*/
|
|
182
|
-
export declare const getReceiptIOS: (forceRefresh?: boolean
|
|
182
|
+
export declare const getReceiptIOS: (forceRefresh?: boolean) => Promise<string>;
|
|
183
183
|
/**
|
|
184
184
|
* Get the pending purchases in IOS.
|
|
185
185
|
* @returns {Promise<ProductPurchase[]>}
|