Implement the callback
Implement the tx_store_query_CB
callback based on the signature in the tx_store_report_extern.h file and pass this as a parameter of the tx_store_query
call. For more information on how to do this, see Implement callbacks.
Code example
void tx_store_query_CB(tx_store_query_response *p, void *echo_struct)
Allocate the request structure
Use tx_store_query_allocate
to allocate, initialize and return a tx_store_query_request
structure. Populate the request by performing string duplication.
If you want the data for later use, retain it, or it will be released automatically
Call the tx_store_query function
Use the tx_store_query
function to retrieve the tx_store_report
, which contains results from past transactions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
|
struct |
Struct that contains specific elements to retrieve a | |
|
void |
Pointer to a callback function you implemented which includes the | |
|
struct |
A POS-defined struct that is echoed back in the callback. Use this to share a POS data struct between the call to the library and the callback from the library. You can add any pointer to |
Handle the callback
The tx_store_query
callback returns a response which includes the tx_store_report
.
Parameters
Name | Description |
---|---|
|
The immediate response to the |
|
A pointer to a user-defined struct that is echoed back in the callback. Use this to share a POS data struct between the call to the library and the callback from the library. |
A pspReference
and authCode
will not be visible if the transaction was performed offline.