Skip to content

Commit

Permalink
6.0.31
Browse files Browse the repository at this point in the history
6.0.31
  • Loading branch information
amit-kremer93 authored Oct 6, 2020
2 parents 1fab9af + f277500 commit 9c9b129
Show file tree
Hide file tree
Showing 15 changed files with 859 additions and 564 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ ios/Podfile.lock
.idea
.gradle
local.properties
android/gradlew
android/gradlew.bat
android/gradle

# node.js
#
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Versions

## 6.0.31
- In-App purchase validation
- Add parameters type check to public api
- Fix crash on null callbacks
- Install Referrer v2.1

## 6.0.30

- iOS SDK 6.0.3
Expand Down
42 changes: 41 additions & 1 deletion Docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- [setSharingFilter](#setSharingFilter)
- [disableCollectASA](#disableCollectASA)
- [disableAdvertisingIdentifier](#disableAdvertisingIdentifier)
- [validateAndLogInAppPurchase](#validateAndLogInAppPurchase)

---

Expand Down Expand Up @@ -737,4 +738,43 @@ Disables IDFA collecting
appsFlyer.disableAdvertisingIdentifier(true);
```
---
---
##### <a id="validateAndLogInAppPurchase"> **`validateAndLogInAppPurchase(purchaseInfo, successC, errorC): Response<string>`**
Receipt validation is a secure mechanism whereby the payment platform (e.g. Apple or Google) validates that an in-app purchase indeed occurred as reported.<br>
Learn more - https://support.appsflyer.com/hc/en-us/articles/207032106-Receipt-validation-for-in-app-purchases
Important! for iOS - set SandBox to ```true```<br>
```appsFlyer.setUseReceiptValidationSandbox(true);```
| parameter | type | description |
| ---------- |----------|------------------ |
| purchaseInfo | json | In-App Purchase parameters |
| successC | function | success callback (generated link)|
| errorC | function | error callback |
*Example:*
```javascript
let info = {};
if (Platform.OS == 'android') {
info = {
publicKey: 'key',
currency: 'biz',
signature: 'sig',
purchaseData: 'data',
price: '123',
additionalParameters: {'foo': 'bar'},
};
} else if (Platform.OS == 'ios') {
info = {
productIdentifier: 'identifier',
currency: 'USD',
transactionId: '1000000614252747',
price: '0.99',
additionalParameters: {'foo': 'bar'},
};
}
appsFlyer.validateAndLogInAppPurchase(info, res => console.log(res), err => console.log(err));
```
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ appsFlyer.initSdk(
devKey: 'K2***********99',
isDebug: false,
appId: '41*****44',
onInstallConversionDataListener: true,
},
(result) => {
console.log(result);
Expand All @@ -96,6 +97,7 @@ appsFlyer.initSdk(
| devKey | Your application [devKey](https://support.appsflyer.com/hc/en-us/articles/211719806-Global-app-settings-#sdk-dev-key) provided by AppsFlyer (required) |
| appId | Your iTunes [application ID](https://support.appsflyer.com/hc/en-us/articles/207377436-Adding-a-new-app#available-in-the-app-store-google-play-store-windows-phone-store) (iOS only) |
| isDebug | Debug mode - set to `true` for testing only |
|onInstallConversionDataListener| Set listener for SDK init response (Optional. default=false) |


## <a id="guides"> 📖 Guides
Expand Down
Loading

0 comments on commit 9c9b129

Please sign in to comment.