{"title":"C library integration","category":"default","creationDate":1776961627,"content":"<div class=\"sc-notice warning\"><div>\n<p>We are <a href=\"\/pt\/point-of-sale\/classic-library-deprecation\">discontinuing classic libraries<\/a>. If you are currently using a classic library, you need to migrate to <a href=\"\/pt\/point-of-sale\/design-your-integration\/terminal-api\">Terminal API<\/a>.<br \/>\nDo not build a new integration with a classic library.<\/p>\n<\/div><\/div>\n<p>Use the C Library\u00a0to allow communication between a POS application, terminal, and the plataforma de pagamentos da Adyen. Register the POS app and terminal, create transactions, and review\u00a0library responses to check status of request.<\/p>\n<h2 id=\"c-library-transaction-flow\">C library transaction flow<\/h2>\n<p>The transaction flow is:<\/p>\n<ol>\n<li>Initialize the library (<code>init_task<\/code>) - Do this before starting the first transaction, but not for subsequent transactions.<\/li>\n<li>Register the POS (<code>register_app<\/code>)<\/li>\n<li>Register PIN Entry Devices (PEDs) (<code>register_device<\/code>)<\/li>\n<li>Start a transaction (<code>create_tender<\/code>) - \u00a0this step can be repeated as many times as required<\/li>\n<li>Exit the library (<code>exit_task<\/code>)<\/li>\n<\/ol>\n<h2 id=\"architecture\">Architecture<\/h2>\n<p><img alt=\"\" src=\"\/user\/pages\/reuse\/pos-reuse\/12.architecturediagram\/noText_pos-architecture.png\" \/><\/p>\n<h2 id=\"the-adyen-pos-solution\">The Adyen POS solution<\/h2>\n<p>The Adyen POS solution consists of:<\/p>\n<ul>\n<li>A PIN Entry Device (PED) (running Adyen's payment software)<\/li>\n<li>A library (integrated in the cash register environment)<\/li>\n<li>The\u00a0plataforma de pagamentos da Adyen.<\/li>\n<\/ul>\n<p>Your POS connects to the PED via a serial, Ethernet, Wi-Fi, Bluetooth or USB connection.<\/p>\n<p>To perform online transactions, you must connect both the POS system and the PED to the Internet. The PED can connect to the\u00a0plataforma de pagamentos da Adyen\u00a0directly, or by using the POS system as a proxy, which requires a physical connection between the PED and POS.\u00a0<\/p>\n<p>You must authorize your POS system to connect to the plataforma de pagamentos da Adyen, at least during the deployment and boarding of new PEDs. The POS uses our C library functions to register associated PEDs. This allows you to exchange PEDs quickly and easily, and does not require you to store credentials on the device. This also means you do not need to contact Adyen to swap terminals. for example, in case of a replacement.<\/p>\n<p>Multiple PEDs may be connected to a single POS system. The cash register application provides the staff with an interface to switch dynamically between these connected PEDs when required.<\/p>\n<h2 id=\"library-feedback\">Library feedback<\/h2>\n<p>The library represents results, states\u00a0and other fixed values using enums. The\u00a0<span translate=\"no\"><strong>adyen_enum.h<\/strong><\/span>\u00a0file contains these enums. Helper functions are available to convert strings to enums and enums to strings.<\/p>\n<p>Include\u00a0<span translate=\"no\"><strong>POSLibC.h<\/strong><\/span>\u00a0as this will handle your platform specifics, such as threading, data models, platform specifications and so on.<\/p>\n<div class=\"sc-notice note\"><div>\n<p>The POS App should use the enumerated values instead of the underlying values. For example, if a value of an enum should be stored to disk, store the string and not the integer value.<\/p>\n<\/div><\/div>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration","articleFields":{"id":"24217490","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","title":"C library integration","content":"\nWe are discontinuing classic libraries. If you are currently using a classic library, you need to migrate to Terminal API.\nDo not build a new integration with a classic library.\n\nUse the C Library\u00a0to allow communication between a POS application, terminal, and the plataforma de pagamentos da Adyen. Register the POS app and terminal, create transactions, and review\u00a0library responses to check status of request.\nC library transaction flow\nThe transaction flow is:\n\nInitialize the library (init_task) - Do this before starting the first transaction, but not for subsequent transactions.\nRegister the POS (register_app)\nRegister PIN Entry Devices (PEDs) (register_device)\nStart a transaction (create_tender) - \u00a0this step can be repeated as many times as required\nExit the library (exit_task)\n\nArchitecture\n\nThe Adyen POS solution\nThe Adyen POS solution consists of:\n\nA PIN Entry Device (PED) (running Adyen's payment software)\nA library (integrated in the cash register environment)\nThe\u00a0plataforma de pagamentos da Adyen.\n\nYour POS connects to the PED via a serial, Ethernet, Wi-Fi, Bluetooth or USB connection.\nTo perform online transactions, you must connect both the POS system and the PED to the Internet. The PED can connect to the\u00a0plataforma de pagamentos da Adyen\u00a0directly, or by using the POS system as a proxy, which requires a physical connection between the PED and POS.\u00a0\nYou must authorize your POS system to connect to the plataforma de pagamentos da Adyen, at least during the deployment and boarding of new PEDs. The POS uses our C library functions to register associated PEDs. This allows you to exchange PEDs quickly and easily, and does not require you to store credentials on the device. This also means you do not need to contact Adyen to swap terminals. for example, in case of a replacement.\nMultiple PEDs may be connected to a single POS system. The cash register application provides the staff with an interface to switch dynamically between these connected PEDs when required.\nLibrary feedback\nThe library represents results, states\u00a0and other fixed values using enums. The\u00a0adyen_enum.h\u00a0file contains these enums. Helper functions are available to convert strings to enums and enums to strings.\nInclude\u00a0POSLibC.h\u00a0as this will handle your platform specifics, such as threading, data models, platform specifications and so on.\n\nThe POS App should use the enumerated values instead of the underlying values. For example, if a value of an enum should be stored to disk, store the string and not the integer value.\n","type":"page","locale":"pt","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"C library integration"},"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":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/c-library-integration"},"levels":5,"category":"In-person payments","category_color":"green","tags":["library","integration"]}}
