Exit the library before you turn the POS off.
The call and the callback are asynchronous to prevent the call from blocking the calling thread.
Implement the library_shutdown_CB
library_shutdown_CB callback function, pass a pointer of
library_shutdown_CB to the
exit_library function. For more information on how to do this, see Implement callbacks.
The callback function declaration is:
void library_shutdown_CB(void* none, void * echo_struct);
Exits the library when called with the
ADYEN_RESULT exit_result = exit_task(library_shutdown_CB, &state);
An enum that indicates if the Adyen payments platform has successfully received the request.
Result of the call to exit the library. Should be
This is not the final result of the call. The final result of the call is in a callback returned by the system to the library initialization call.
Pointer to the callback function in the POS that is called with the results of the exit call.
Pointer to a POS defined struct that can be set by the POS that is echoed back in the callback, it can be used to share a POS data struct between the call to the library and the callback from the library in response to the call.
Handle the callback
The POS must wait until the system returns the
library_shutdown_cb before continuing with other functions. This confirms that the library has been successfully discarded and all related resources are destroyed.
The SDK package contains a folder documentation/log_files/documentation. This folder contains log files of actual test runs that relate to the items discussed in this manual.
exit_task.log file that shows a live example of the library exit call and the related callback.