{"title":"Calls and callbacks","category":"default","creationDate":1776961627,"content":"<p>The library handles function\u00a0calls asynchronously. The system returns results in the form of callbacks. All calls to the library are non-blocking.<\/p>\n<p>Calls will return a result to say whether or not they were accepted. You provide a callback function in the call. If a call is accepted, you will receive a response in the user-provided callback function. You must write functions to handle the response.<\/p>\n<p>Because the library processes asynchronously, and callbacks are required to get additional info from the attendant, a number of callback routines must be specified. The library returns these callbacks to the above calls whenever additional input is required.<\/p>\n<p>These callbacks are asynchronous responses to a synchronous call:<\/p>\n<ol>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/initialize-the-library-c-library\">Library initialization callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/register-the-application-with-adyen-c-library\">Register POS callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/register-the-ped-with-the-adyen-payments-platform-c-library\">Register PED callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/process-a-basic-transaction-c-library\/create-the-tender-c-library\">Create tender callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/cancel-or-refund-a-transaction-c-library\/cancel-a-transaction-c\">Cancel or Refund callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library\/display-a-screen-on-a-large-screen-terminal-c\">Show Screen callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library\/get-transaction-data-from-tx_store_report-c\">TxStoreReport callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/exit-the-library-c-library\">Library exit callback<\/a><\/li>\n<\/ol>\n<p>These callbacks are related to transactions, and will require actions to be performed:<\/p>\n<ol>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/process-a-basic-transaction-c-library\/handle-the-print-receipt-callback-c-library\">Receipt callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/process-a-basic-transaction-c-library\/handle-the-signature-callback-c-library\">Signature callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/process-a-basic-transaction-c-library\/handle-the-additional-data-callback-c-library\">Additional data callback<\/a>\u00a0<\/li>\n<\/ol>\n<p>These callbacks are related to transactions, and will require no actions to be performed:<\/p>\n<ol>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/process-a-basic-transaction-c-library\/handle-progress-events-c-library\">Progress event callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/extras-c-library\/handle-dynamic-currency-conversion-c-library\">Dynamic Currency Conversion callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/process-a-basic-transaction-c-library\/handle-the-final-state-callback-c-library\">Final result callback<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/key-steps-c-library\/process-a-basic-transaction-c-library\/handle-the-ped-state-change-callback-c-library\">PED State callback<\/a><\/li>\n<\/ol>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/calls-and-callbacks-c-library","articleFields":{"id":"28873146","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\/calls-and-callbacks-c-library","title":"Calls and callbacks","content":"The library handles function\u00a0calls asynchronously. The system returns results in the form of callbacks. All calls to the library are non-blocking.\nCalls will return a result to say whether or not they were accepted. You provide a callback function in the call. If a call is accepted, you will receive a response in the user-provided callback function. You must write functions to handle the response.\nBecause the library processes asynchronously, and callbacks are required to get additional info from the attendant, a number of callback routines must be specified. The library returns these callbacks to the above calls whenever additional input is required.\nThese callbacks are asynchronous responses to a synchronous call:\n\nLibrary initialization callback\nRegister POS callback\nRegister PED callback\nCreate tender callback\nCancel or Refund callback\nShow Screen callback\nTxStoreReport callback\nLibrary exit callback\n\nThese callbacks are related to transactions, and will require actions to be performed:\n\nReceipt callback\nSignature callback\nAdditional data callback\u00a0\n\nThese callbacks are related to transactions, and will require no actions to be performed:\n\nProgress event callback\nDynamic Currency Conversion callback\nFinal result callback\nPED State callback\n","type":"page","locale":"pt","boost":15,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"C library integration","lvl5":"Calls and 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\/c-library-integration","lvl5":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration\/calls-and-callbacks-c-library"},"levels":6,"category":"In-person payments","category_color":"green","tags":["Calls","callbacks"]}}
