insert-affiliate-react-native-sdk 1.0.2 → 1.0.5
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/package.json +1 -1
- package/readme.md +5 -5
- package/src/DeepLinkIapProvider.tsx +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "insert-affiliate-react-native-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "A package that will give context having implementation of react-native-branch and react-native-iap and iaptic validate api.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
package/readme.md
CHANGED
|
@@ -41,7 +41,7 @@ import { DeepLinkIapProvider } from 'insert-affiliate-react-native-sdk';
|
|
|
41
41
|
|
|
42
42
|
- Replace `{{ your_iaptic_app_id }}` with your **Iaptic App ID**. You can find this [here](https://www.iaptic.com/account).
|
|
43
43
|
- Replace `{{ your_iaptic_app_name }}` with your **Iaptic App Name**. You can find this [here](https://www.iaptic.com/account).
|
|
44
|
-
- Replace `{{
|
|
44
|
+
- Replace `{{ your_iaptic_public_key }}` with your **Iaptic Public Key**. You can find this [here](https://www.iaptic.com/settings).
|
|
45
45
|
|
|
46
46
|
Here's the code with placeholders for you to swap out:
|
|
47
47
|
|
|
@@ -52,7 +52,7 @@ const App = () => {
|
|
|
52
52
|
iapSkus={IAP_SKUS}
|
|
53
53
|
iapticAppId="{{ your_iaptic_app_id }}"
|
|
54
54
|
iapticAppName="{{ your_iaptic_app_name }}"
|
|
55
|
-
|
|
55
|
+
iapticPublicKey="{{ your_iaptic_public_key }}">
|
|
56
56
|
<Child />
|
|
57
57
|
</DeepLinkIapProvider>
|
|
58
58
|
);
|
|
@@ -112,9 +112,9 @@ const App = () => {
|
|
|
112
112
|
// Wrapped application code from the previous step...
|
|
113
113
|
<DeepLinkIapProvider
|
|
114
114
|
iapSkus={IAP_SKUS}
|
|
115
|
-
iapticAppId="
|
|
116
|
-
iapticAppName="
|
|
117
|
-
|
|
115
|
+
iapticAppId="your_iaptic_app_id"
|
|
116
|
+
iapticAppName="your_iaptic_app_name"
|
|
117
|
+
iapticPublicKey="your_iaptic_public_key">
|
|
118
118
|
<Child />
|
|
119
119
|
</DeepLinkIapProvider>
|
|
120
120
|
);
|
|
@@ -18,7 +18,7 @@ type T_DEEPLINK_IAP_PROVIDER = {
|
|
|
18
18
|
iapSkus: string[];
|
|
19
19
|
iapticAppId: string;
|
|
20
20
|
iapticAppName: string;
|
|
21
|
-
|
|
21
|
+
iapticPublicKey: string;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
type T_DEEPLINK_IAP_CONTEXT = {
|
|
@@ -55,7 +55,7 @@ const DeepLinkIapProvider: React.FC<T_DEEPLINK_IAP_PROVIDER> = ({
|
|
|
55
55
|
iapSkus,
|
|
56
56
|
iapticAppId,
|
|
57
57
|
iapticAppName,
|
|
58
|
-
|
|
58
|
+
iapticPublicKey,
|
|
59
59
|
}) => {
|
|
60
60
|
// LOCAL STATES
|
|
61
61
|
const [iapLoading, setIapLoading] = useState<boolean>(false);
|
|
@@ -231,7 +231,7 @@ const DeepLinkIapProvider: React.FC<T_DEEPLINK_IAP_PROVIDER> = ({
|
|
|
231
231
|
method: "POST",
|
|
232
232
|
headers: {
|
|
233
233
|
Authorization: `Basic ${btoa(
|
|
234
|
-
iapticAppName + ":" +
|
|
234
|
+
iapticAppName + ":" + iapticPublicKey
|
|
235
235
|
)}`,
|
|
236
236
|
},
|
|
237
237
|
data: {
|
|
@@ -251,7 +251,7 @@ const DeepLinkIapProvider: React.FC<T_DEEPLINK_IAP_PROVIDER> = ({
|
|
|
251
251
|
method: "POST",
|
|
252
252
|
headers: {
|
|
253
253
|
Authorization: `Basic ${btoa(
|
|
254
|
-
iapticAppName + ":" +
|
|
254
|
+
iapticAppName + ":" + iapticPublicKey
|
|
255
255
|
)}`,
|
|
256
256
|
},
|
|
257
257
|
data: {
|