Ir para o conteúdo

Synchronization


Synchronizes local data with the server

synchronize()

In some situations where it is not possible to receive a response from the server, it is necessary to synchronize the local data with that of the server so that the transactional status is uniform. Generally this method can be called when starting the application or before calling the create billing, return or query functions.

val callback = object  : PixClient.SyncDataCallback {
    override fun onSuccess(response: String?) {
        println("Response $response")
    }

    override fun onError(response: String?) {
        println("Response $response")
    }
}
pixClient.synchronize(callback)

Parameters

Name Type Required Description
callback SyncDataCallback Yes Interface to be executed for success or error notifications of the PIX process.

Parameter Details

callback (SyncDataCallback)

Name Type Required Description
onSuccess String Yes Method for notification in case of success. The returned response will be a JSON string containing fields shown in the PixResponse class
onError String Yes Method for notification in case of error. The returned response will be a JSON string containing fields shown in the PixErrorResponse class

onSuccess.response

{
    "result": true
}