{"title":"Get transaction data from tx_store_report - C","category":"default","creationDate":1776961627,"content":"<h2 id=\"implement-the-callback\">Implement the callback<\/h2>\n<p>Implement the\u00a0<code>tx_store_query_CB<\/code>\u00a0callback based on the signature in the <span translate=\"no\"><strong>tx_store_report_extern.h<\/strong><\/span> file and\u00a0\u00a0pass this as a parameter of the\u00a0<code>tx_store_query<\/code>\u00a0call. For more information on how to do this, see\u00a0<a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/calls-and-callbacks-c-library\/implement-callbacks\">Implement callbacks<\/a>.<\/p>\n<h3 id=\"code-example\">Code example<\/h3>\n<pre><code class=\"language-cpp\">void tx_store_query_CB(tx_store_query_response *p, void *echo_struct)<\/code><\/pre>\n<h2 id=\"allocate-the-request-structure\">Allocate the request structure<\/h2>\n<p>Use <code>tx_store_query_allocate<\/code> to allocate, initialize and return a\u00a0<code>tx_store_query_request<\/code>\u00a0structure. Populate the request by performing string duplication.<\/p>\n<p>If you want the data for later use, retain it, or it will be released automatically<\/p>\n<h2 id=\"call-the-tx_store_query-function\">Call the tx_store_query function<\/h2>\n<p>Use the <code>tx_store_query<\/code> function\u00a0to retrieve the\u00a0<code>tx_store_report<\/code>, which contains results from past transactions.<\/p>\n<h3 id=\"parameters\">Parameters<\/h3>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 21%\"><col style=\"width: 4%\"><col style=\"width: 6%\"><col style=\"width: 68%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th><p>Type<\/p><\/th><th><p>Required<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>tx_store_query_request<\/code><\/p>\n<\/td><td>\n<p>struct<\/p>\n<\/td><td>\n<p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p>\n<\/td><td>\n<p>Struct that contains specific elements to retrieve a <code>tx_store_report<\/code>. For parameters and more information, see the <code>tx_store_query_request<\/code> page<\/p>\n<\/td><\/tr><tr><td>\n<p><code>tx_store_query_CB<\/code><\/p>\n<\/td><td>\n<p>void<\/p>\n<\/td><td>\n<p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p>\n<\/td><td>\n<p>Pointer to a callback function you implemented which includes the <code>tx_store_query_response<\/code>.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>echo_struct<\/code><\/p>\n<\/td><td>\n<p>struct<\/p>\n<\/td><td>\n<p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p>\n<\/td><td>\n<p>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\u00a0<code>echo_struct<\/code>, and this will be returned on its specific callback.<\/p>\n<\/td><\/tr><\/tbody><\/table>\n<h2 id=\"handle-the-callback\">Handle the callback<\/h2>\n<p>The <code>tx_store_query<\/code> callback returns a response which includes the\u00a0\u00a0<code>tx_store_report<\/code>.<\/p>\n<h3 id=\"parameters-1\">Parameters<\/h3>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 8%\"><col style=\"width: 91%\"><\/colgroup><thead><tr class=\"header\"><th>Name<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>tx_store_query_response<\/code><\/p>\n<\/td><td>\n<p>The immediate response to the<code> tx_store_query<\/code> call, which includes the result of the call. This includes the \u00a0<code>tx_store_report<\/code>\u00a0object.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>echo_struct<\/code><\/p>\n<\/td><td>\n<p>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.<\/p>\n<\/td><\/tr><\/tbody><\/table>\n<div class=\"sc-notice warning\"><div>\n<p>A <code>pspReference<\/code> and <code>authCode<\/code> will not be visible if the transaction was performed offline.<\/p>\n<\/div><\/div>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library\/get-transaction-data-from-tx_store_report-c","articleFields":{"id":"28871164","type":"page","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library\/get-transaction-data-from-tx_store_report-c","title":"Get transaction data from tx_store_report - C","content":"Implement the callback\nImplement the\u00a0tx_store_query_CB\u00a0callback based on the signature in the tx_store_report_extern.h file and\u00a0\u00a0pass this as a parameter of the\u00a0tx_store_query\u00a0call. For more information on how to do this, see\u00a0Implement callbacks.\nCode example\nvoid tx_store_query_CB(tx_store_query_response *p, void *echo_struct)\nAllocate the request structure\nUse tx_store_query_allocate to allocate, initialize and return a\u00a0tx_store_query_request\u00a0structure. Populate the request by performing string duplication.\nIf you want the data for later use, retain it, or it will be released automatically\nCall the tx_store_query function\nUse the tx_store_query function\u00a0to retrieve the\u00a0tx_store_report, which contains results from past transactions.\nParameters\nNameTypeRequiredDescription\ntx_store_query_request\n\nstruct\n\n\n\nStruct that contains specific elements to retrieve a tx_store_report. For parameters and more information, see the tx_store_query_request page\n\ntx_store_query_CB\n\nvoid\n\n\n\nPointer to a callback function you implemented which includes the tx_store_query_response.\n\necho_struct\n\nstruct\n\n\n\nA 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\u00a0echo_struct, and this will be returned on its specific callback.\n\nHandle the callback\nThe tx_store_query callback returns a response which includes the\u00a0\u00a0tx_store_report.\nParameters\nNameDescription\ntx_store_query_response\n\nThe immediate response to the tx_store_query call, which includes the result of the call. This includes the \u00a0tx_store_report\u00a0object.\n\necho_struct\n\nA 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.\n\n\nA pspReference and authCode will not be visible if the transaction was performed offline.\n","type":"page","locale":"pt","boost":14,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"C library integration","lvl5":"Extras","lvl6":"Get transaction data from tx_store_report - C"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/point-of-sale","lvl2":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation","lvl3":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations","lvl4":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration","lvl5":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library","lvl6":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library\/get-transaction-data-from-tx_store_report-c"},"levels":7,"category":"In-person payments","category_color":"green","tags":["transaction","tx_store_report"]}}
