device_session_id

Creator: coderz1093

Last updated:

0 purchases

device_session_id Image
device_session_id Images

Languages

Categories

Add to Cart

Description:

device session id

Openpay Device Session ID #
This package integrates the Openpay iOS and Openpay Android libraries to generate the Device Session ID used in the Openpay Anti-Fraud System for the card payments through their API.

Future<void> initDeviceSession() async {
String deviceID;
const String merchantID =
'<<MERCHANT_ID>>'; // REPLACE THIS WITH YOUR MERCHANT ID
const String apiKey = '<<API_KEY>>'; // REPLACE THIS WITH YOUR API KEY
const bool productionMode =
true; // REPLACE THIS IF YOU ARE NOT ON PRODUCTION MODE
try {
deviceID = await DeviceSessionId.getDeviceID(
merchantID, apiKey, productionMode) ??
'Error getting the device session id'; // THE DEVICE SESSION ID IS OBTAINED
} catch (e) {
deviceID = 'Error getting the device session id';
}
setState(() {
// THIS IS WHERE THE ID IS STORED
_deviceID = deviceID;
});
}
copied to clipboard
You can use this ID in your json to process the card payments.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.