Fraud Detection
Our Location Fraud Detection system analyzes environmental signals and detects fraudulent behaviors like phishing, sim swapping or synthetic identity with unspoofable location.
Supported versions
Platform | Supported versions |
---|---|
iOS | 13.0.0+ |
Android | 5.0.0+ |
Getting Started
Add this to your package's pubspec.yaml file:
dependencies:
ironchip_lbfraud: ^2.0.16
Android
In order to use fraud detection in Android, some permissions are advised. Although the plugin will still work without the permisions, the accuracy will be decreased. We advise to place the permissions in your applications to get the full potential.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
Remember that the user has to accept the permissions in order for them to take effect.
iOS
To be able to use Ironchip LBFraud you will need to add to the target of your app a capability so go to Singing and Capabilities and add access Wifi Information. And to use it in iOS, you have to add this permission in Info.plist :
Privacy - Location Always and When In Use Usage Description, and insert the description as string
Privacy - Location When In Use Usage Description, and insert the description as string
Privacy - Location Always Usage Description, and insert the description as string
LSApplicationQueriesSchemes, and insert the description (this permission is to be able to know if the device is jailbroken)
Usage
Then you just have to import the package with
import 'package:ironchip_lbfraud_plugin/ironchip_lbfraud_plugin.dart';
In order to send transaction, you must first initialize the sdk by providing a valid api key.
// Replace APIKEY with the desired generated api key.
// By default our SDK target to the production environment.
// In case you desire to target a diferent enviroment:
// LBFraudSDK fraud = new LbfraudFlutterPlugin.initFraudSDK("APIKEY", env: Environment.testing);
await _lbfraudPlugin.initFraudSDK(apiKey);
Once the service has been initialized, you can now perform transactions:
try {
// TransactionID (required,unique): transaction identifier request for fraud results
// UserID (required): User identifier
// extraData (optional): extra information for analysis
// You can omit the await in case the result of the action isn't necessary
var result =
await _lbfraudPlugin.sendTransaction(transactionID, userID, {});
_showResult = result!;
_resultError = false;
} catch (e) {
_showResult = e.toString();
_resultError = true;
}
Although the sendTransaction is async, it's not necessary to perform an 'await' unless you want to check the actual result of the action. In addition, if you want to use a specific proxy when performing a transaction, you can configure it using:
try {
var result =
await _lbfraudPlugin.setProxy(host, port);
} catch (e) {
}