insert-affiliate-react-native-sdk 1.4.9 → 1.5.0
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/dist/DeepLinkIapProvider.js +1 -1
- package/package.json +1 -1
- package/readme.md +13 -0
- package/src/DeepLinkIapProvider.tsx +1 -1
|
@@ -158,7 +158,7 @@ const DeepLinkIapProvider = ({ children, }) => {
|
|
|
158
158
|
const isShortCode = (referringLink) => {
|
|
159
159
|
// Short codes are less than 10 characters
|
|
160
160
|
const isValidCharacters = /^[a-zA-Z0-9]+$/.test(referringLink);
|
|
161
|
-
return isValidCharacters && referringLink.length <
|
|
161
|
+
return isValidCharacters && referringLink.length < 25 && referringLink.length > 3;
|
|
162
162
|
};
|
|
163
163
|
function setShortCode(shortCode) {
|
|
164
164
|
return __awaiter(this, void 0, void 0, function* () {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -131,6 +131,7 @@ React.useEffect(() => {
|
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
### Option 2: Iaptic Integration
|
|
134
|
+
#### 1. Code Setup
|
|
134
135
|
First, complete the [Iaptic account setup](https://www.iaptic.com/signup) and code integration.
|
|
135
136
|
|
|
136
137
|
Then after setting up the in app purchase (IAP) with Iaptic, call Insert Affiliate's ```validatePurchaseWithIapticAPI``` on purchase.
|
|
@@ -208,6 +209,18 @@ export default App;
|
|
|
208
209
|
- Replace `{{ your_iaptic_public_key }}` with your **Iaptic Public Key**. You can find this [here](https://www.iaptic.com/settings).
|
|
209
210
|
- Replace `{{ your_company_code }}` with the unique company code associated with your Insert Affiliate account. You can find this code in your dashboard under [Settings](http://app.insertaffiliate.com/settings).
|
|
210
211
|
|
|
212
|
+
#### 2. Webhook Setup
|
|
213
|
+
1. Open the [Insert Affiliate settings](https://app.insertaffiliate.com/settings):
|
|
214
|
+
- Navigate to the Verification Settings section
|
|
215
|
+
- Set the In-App Purchase Verification method to `Iaptic`
|
|
216
|
+
- Copy the `Iaptic Webhook URL` and the `Iaptic Webhook Sandbox URL`- you'll need it in the next step.
|
|
217
|
+
2. Go to the [Iaptic Settings](https://www.iaptic.com/settings)
|
|
218
|
+
- Paste the copied `Iaptic Webhook URL` into the `Webhook URL` field
|
|
219
|
+
- Paste the copied `Iaptic Webhook Sandbox URL` into the `Sandbox Webhook URL` field
|
|
220
|
+
- Click **Save Settings**.
|
|
221
|
+
3. Check that you have completed the [Iaptic setup for the App Store Server Notifications](https://www.iaptic.com/documentation/setup/ios-subscription-status-url)
|
|
222
|
+
4. Check that you have completed the [Iaptic setup for the Google Play Notifications URL](https://www.iaptic.com/documentation/setup/connect-with-google-publisher-api)
|
|
223
|
+
|
|
211
224
|
### Option 3: App Store Direct Integration
|
|
212
225
|
|
|
213
226
|
Our direct App Store integration is currently in beta and currently supports subscriptions only. **Consumables and one-off purchases are not yet supported** due to App Store server-to-server notification limitations.
|
|
@@ -192,7 +192,7 @@ const DeepLinkIapProvider: React.FC<T_DEEPLINK_IAP_PROVIDER> = ({
|
|
|
192
192
|
const isShortCode = (referringLink: string): boolean => {
|
|
193
193
|
// Short codes are less than 10 characters
|
|
194
194
|
const isValidCharacters = /^[a-zA-Z0-9]+$/.test(referringLink);
|
|
195
|
-
return isValidCharacters && referringLink.length <
|
|
195
|
+
return isValidCharacters && referringLink.length < 25 && referringLink.length > 3;
|
|
196
196
|
};
|
|
197
197
|
|
|
198
198
|
async function setShortCode(shortCode: string): Promise<void> {
|