WalletCallback
Most methods return a callback when the SDK finishes, either with error or success
information. Methods for onSuccess and onError must be implemented for
WalletCallback. OnSuccess, the WalletCallback will in some cases include a data object,
documented under “Models” section. For more information on WalletSuccess and
WalletException, see Success and Error types sections.
Example
import com.aerahost.aerawalletssdk.external.model.callback.WalletCallback
import com.aerahost.aerawalletssdk.external.model.callback.success.WalletSuccess
import com.aerahost.aerawalletssdk.external.model.callback.exception.WalletException
val callback = object : WalletCallback {
override fun onSuccess(walletSuccess: WalletSuccess) {
Log.d("Wallets SDK: onSuccess”, walletSuccess.toString())
Log.d("Wallets SDK: onSuccess”, “${walletSuccess.type}, ${walletSuccess.message} ${walletSuccess.data}")
}
override fun onError(walletException: WalletException) {
Log.e("Wallets SDK: onSuccess”, walletException.toString())
Log.e("Wallets SDK: onError", “${walletException.type}, ${walletException.type.errorCode} ${walletException.message}”)
}
}
// ...
walletsSDK.myWalletsSDKMethod(sessionId, sessionKey, callback)Updated 2 months ago
