Get terminal information
To access detailed information about the terminal and the integrated SDK, such as the terminal's serial number or the SDK version, use the getInformation function from the SmartInformationTools class.
val informationTools = MPManager.smartInformationTools
informationTools.getInformation { response ->
response.doIfSuccess { smartInformation ->
// Handle device and integration information
val deviceSerialNumber = smartInformation.smartDevice.serialNumber
val brandName = smartInformation.smartDevice.brandName
val modelName = smartInformation.smartDevice.modelName
val paymentModuleVersion = smartInformation.smartDevice.paymentModuleVersion
val sdkVersion = smartInformation.integration.nativeSdkVersion
}.doIfError { error ->
// Handle error in information request
}
}
final SmartInformationTools smartInformationTools = MPManager.INSTANCE.getSmartInformationTools();
final Function1<MPResponse<SmartInformation>, Unit> callback = (final MPResponse<SmartInformation> response) -> {
if (response.getStatus() == ResponseStatus.SUCCESS) {
// Handle device and integration information
final String deviceSerialNumber = response.getData().getSmartDevice().getSerialNumber();
final String brandName = response.getData().getSmartDevice().getBrandName();
final String modelName = response.getData().getSmartDevice().getModelName();
final String paymentModuleVersion = response.getData().getSmartDevice().getPaymentModuleVersion();
final String sdkVersion = response.getData().getIntegration().getNativeSdkVersion();
} else {
// Handle error in information request
}
return Unit.INSTANCE;
};
smartInformationTools.getInformation(callback);
| Field | Description |
serialNumber | Terminal serial number. |
brandName | Terminal brand name. |
modelName | Terminal model name. |
paymentModuleVersion | SmartPos payment module version. |
nativeSdkVersion | Native SDK version for integrations. |