Usar en una aplicación

Para aprovechar todo el potencial del sdk, es necesario conceder el permiso ACCESS_FINE_LOCATION.

Como solicitar permisos

import com.ironchip.ironchiplbfraudandroidsdk.LBFraudSDK;
...

// Reemplace APIKEY con la clave API generada deseada.
LBFraudSDK fraud = new LBFraudSDK(this, "APIKEY");
// Por defecto nuestro SDK apunta al entorno de producción.
// En caso de que desee apuntar a un entorno diferente:
// LBFraudSDK fraud = new LBFraudSDK(this, "APIKEY", LBFraudSDK.Environment.Testing);

//public enum Environment {
//    Production,
//    Testing,
//    Development
//}

Map<String, Object> extraData = new HashMap<>();
extraData.put("concept", "Book august");
extraData.put("amount", new Integer(30));
extraData.put("operation", "booking");

// TransactionID (required,unique): transaction identifier request for fraud results
// UserID (required): User identifier
// ExtraData (optional): extra information for analysis
// The sendTransaction can be provided with 2 callbacks, one is executed when the transaction is finished
// and the other one is called in case an error did occure during the transaction process.
ironchipLBFraud.sendTransaction("random_identifier_generated", "john.doe@gmail.com", extraData, () -> {
        // Add here any code you want to be executed after the transaction
        // has finished.
    }, exception -> {
        // Add here any code you want to perform in case of an error
        // during the transaction.
        // exception.printStackTrace()
});