{"title":"Handle and extract data from Callbacks","category":"default","creationDate":1776961627,"content":"<p>Declare and initialize the variables in your cash register application, and pass them as arguments with the COM extension methods.<\/p>\n<p>The COM extension assigns values to these variables. The cash register can use these variables to access, store, and process the data returned from the library through the COM.<\/p>\n<p>The additional data construct provides this data in the <code>responseHeader<\/code>. We provide a helper method to aid processing this in your cash register application<\/p>\n<h2 id=\"variable\">Variable<\/h2>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 12%\"><col style=\"width: 87%\"><\/colgroup><thead><tr class=\"header\"><th>Name<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Any, for example: <code>intCallResult<\/code><\/td><td><p>Variable used to demonstrate passing variables as arguments.<\/p><\/td><\/tr><\/tbody><\/table>\n<h2 id=\"method\">Method<\/h2>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>GetTenderState<\/code><\/td>\n<td>Use this method to access the relevant tender state in the same header.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sc-notice note\"><div>\n<p>This mechanism applies to <a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension\/handle-progress-events-com-extension\">progress events<\/a>, <a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension\/handle-the-additional-data-callback-com-extension\">Additional data callback<\/a>, <a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/extras-com-extension\/handle-dynamic-currency-conversion-com-extension\">Handle the Dynamic Currency Conversion (DCC) callback<\/a>, <a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension\/handle-the-print-receipt-callback-com-extension\">Print Receipt callback<\/a>, and the <a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension\/handle-the-final-state-callback-com-extension\">Final State callback<\/a>.<\/p>\n<\/div><\/div>\n<h2 id=\"code-example\">Code example<\/h2>\n<pre><code class=\"language-vb\">[Some Callback Event](objPED, objTender, objHeader)\nDim additionalDataKey, additionalDataValue\nFor i=1 To objHeader.GetAdditionalData().Count\n    intCallResult = objHeader.GetAdditionalData().GetData(i,\n    additionalDataKey, additionalDataValue)\n'Add results to internal array for later processing\n'...\nNext<\/code><\/pre>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension\/handle-and-extract-data-from-callbacks-com-extension","articleFields":{"id":"31501665","type":"page","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension\/handle-and-extract-data-from-callbacks-com-extension","title":"Handle and extract data from Callbacks","content":"Declare and initialize the variables in your cash register application, and pass them as arguments with the COM extension methods.\nThe COM extension assigns values to these variables. The cash register can use these variables to access, store, and process the data returned from the library through the COM.\nThe additional data construct provides this data in the responseHeader. We provide a helper method to aid processing this in your cash register application\nVariable\nNameDescriptionAny, for example: intCallResultVariable used to demonstrate passing variables as arguments.\nMethod\n\n\n\nName\nDescription\n\n\n\n\nGetTenderState\nUse this method to access the relevant tender state in the same header.\n\n\n\n\nThis mechanism applies to progress events, Additional data callback, Handle the Dynamic Currency Conversion (DCC) callback, Print Receipt callback, and the Final State callback.\n\nCode example\n[Some Callback Event](objPED, objTender, objHeader)\nDim additionalDataKey, additionalDataValue\nFor i=1 To objHeader.GetAdditionalData().Count\n    intCallResult = objHeader.GetAdditionalData().GetData(i,\n    additionalDataKey, additionalDataValue)\n'Add results to internal array for later processing\n'...\nNext","type":"page","locale":"pt","boost":13,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"COM extension for Windows integration","lvl5":"Key steps","lvl6":"Process a basic transaction","lvl7":"Handle and extract data from Callbacks"},"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\/com-extension-for-windows-integration","lvl5":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension","lvl6":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension","lvl7":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/com-extension-for-windows-integration\/key-steps-com-extension\/process-a-basic-transaction-com-extension\/handle-and-extract-data-from-callbacks-com-extension"},"levels":8,"category":"In-person payments","category_color":"green","tags":["Handle","extract","Callbacks"]}}
