Error Handling

The errors that occur inside the library are returned to the caller via the Error class. Errors can be parsed with the code variable, and the description of the error returns with the message variable. Throwable variable contains the details of the error. The throwable must not be shown to the end user at any point.

Error Data

data class Error (
    val code: Int? = null
    val message: String? = null
    val throwable: Throwable? = null
)

Error Codes

NamesCodesDescriptionsActions

STOPPED

98

Transaction can be stopped for some reason.

Show a general error message to the user.

ERROR_OTHER_CARD

99

The transaction is declined because it can not read the card correctly.

Show a general error message to the user.

UNEXPECTED_ERROR

100

SDK can not handle error.

Show a thrown error message to the user.

Please contact Prophius Technical Team for the detail investigation.

KEYSTORE_NOT_INITIALIZED

102

Android Keystore could not be initialized.

Show a thrown error message to the user.

User should change the device.

KEYSTORE_KEYS_NOT_CREATED

103

Android Keystore keys could not be created.

Show a thrown error message to the user.

If the user continues to receive the same error, user should try again, and user should contact Prophius Technical Team.

NOT_BE_ENCRYPTED

104

Plaintext cloud not be encrypted.

Show a thrown error message to the user.

Please delete device’s local storage and then reinitialize the SDK. if some error is occurred, device is attested.

NOT_BE_DECRYPTED

105

Cipher text cloud not be decrypted.

Show a thrown error message to the user.

Please delete device’s local storage and reinitialize the SDK. if some error is occurred, device is attested.

NOT_BE_SIGNED

106

Message cloud not be signed.

Show a thrown error message to the user.

If the user continues to receive the same error, user should try again, and user should contact Prophius Technical Team.

NOT_BE_VERIFIED

107

Hash value cloud not be verified.

Show a thrown error message to the user.

If the user continues to receive the same error, user should try again, and user should contact Prophius Technical Team.

CONNECTION_ERROR

108

Network connection could not be established.

Please check the device's internet connection.

NOT_SECURE_DEVICE

109

Device could not be secured. Security vulnerabilities detected on the device.

Please contact Prophius Technical Team for the detail investigation.

PUBLIC_KEY_NOT_GOT

111

RSA Keypair could not be generated.

Show a thrown error message to the user.

If the user continues to receive the same error, user should try again.

SSL_CERTIFICATE_NOT_VERIFIED

112

SSL Certificate could not be verified.

Please contact Prophius Technical Team for the detail investigation.

SSL_CERTIFICATE_NOT_SUPPORTED

113

SSL Certificate could not be supported.

Please contact Prophius Technical Team for the detail investigation.

GOOGLE_PLAY_SERVICE_UPDATE_ERROR

115

Device does not have the updated Google Play Service version.

User should update the Google Play Service.

GOOGLE_PLAY_SERVICE_TOKEN_ERROR

116

Google Play Service’s token could not be generated.

Please contact Prophius Technical Team for the detail investigation.

NFC_NOT_SUPPORTED

117

Device does not have NFC.

User should use the device that has NFC.

NFC_NOT_ENABLED

118

NFC is not enabled.

User should turn on the NFC.

PERMISSIONS_NOT_BEEN_GRANTED

119

Read_Phone_State and Call_Phone permissions could not be granted.

User should grant permissions.

ACCESSIBILITY_SERVICE_NOT_ENABLED

120

Accessibility service could not be enabled.

User should enable the accessibility service.

SIM_STATE_ABSENT

121

Device does not have the SIM. Thus USSD payment can not perform on this device.

User should use the device that has SIM.

USSD_CODE_NOT_EXIST

122

USSD code could not be defined for this merchant.

Please contact Prophius Technical Team for the detail investigation.

DATABASE_KEY_NOT_CREATED

123

Database key could not be created.

Show a thrown error message to the user.

If the user continues to receive the same error, user should try again, and user should contact Prophius Technical Team.

NOT_INITIALIZED

127

Paycontactless Embed SDK is not initialized.

Call initialize function first. After getting the success response, the other functions of the SDK can be called.

Last updated