{"title":"Initialize the library","category":"default","creationDate":1776961627,"content":"<h2>Class<\/h2>\n<table><colgroup><col style=\"width: 15%\"><col style=\"width: 84%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>MerchantPos<\/code><\/p>\n<\/td><td>\n<p>Extends <code>AdyenPos<\/code>. Class used to implement all functions that do not involve the PED. Implement the <code>MerchantPos<\/code> object yourself.<\/p>\n<\/td><\/tr><\/tbody><\/table>\n<h2 id=\"initlibraryrequest-parameter\">initLibraryRequest\u00a0Parameter<\/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>initLibraryRequest<\/code><\/td>\n<td>Object to hold parameters needed for library initialization. Use a builder pattern an <code>initLibraryRequest<\/code> and use it as parameter for (your instance of) \u00a0<code>MerchantPos.initLibrary()<\/code>. \u00a0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"method\">Method<\/h2>\n<table><colgroup><col style=\"width: 20%\"><col style=\"width: 79%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>initLibrary<\/code><\/p>\n<\/td><td>\n<p>Method used to begin library Initialization.<div class=\"sc-notice note\"><div><\/p>\n<p>This method returns an immediate response of type <code>LibraryResult<\/code>. Check if this result is \"OK\", before continuing the operation. If the <code>LibraryResult<\/code> value is not \"OK\", the system will not return the related callback with the asynchronous result. See <a href=\"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/process-a-basic-transaction-jni\/handle-and-extract-data-from-callbacks-jni\">here<\/a> for more on extracting data from an event or callback.<\/p>\n<\/div><\/div>\n<\/td><\/tr><\/tbody><\/table>\n<h2 id=\"initlibraryrequest-attributes\">initLibraryRequest Attributes<\/h2>\n<table><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th>Type<\/th><th>Required<\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>libraryEnvironment<\/code><\/p>\n<\/td><td>\n<p>Environment<\/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>The execution environment.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>posId<\/code><\/p>\n<\/td><td>\n<p>String<\/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>The unique POS ID.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>integratorName<\/code><\/p>\n<\/td><td>\n<p>String<\/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>The name of the integrator company, defined for logging reasons.This value should be the name of the company deploying\u00a0cash\u00a0register\u00a0or\u00a0Point-of-Sale\u00a0solution, for example,\u00a0\u00a0<strong>Retail\u00a0Consultancy\u00a0Corp.<\/strong><\/p>\n<\/td><\/tr><tr><td>\n<p><code>logConfig<\/code><\/p>\n<\/td><td>\n<p>LogConfig<\/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>Object containing logLevel. For more information on setting the log level, see <a href=\"\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/logging-jni\">Logging<\/a>.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>posName<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<p><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/p>\n<\/td><td>\n<p>The symbolic POS name.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>appName<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<p><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/p>\n<\/td><td>\n<p>The Integrator\/Merchant App ID.Format this value like so: <strong>Cash register company and product<\/strong>\u00a0\/<strong>\u00a0Cash register product version<\/strong>\u00a0\/ <strong>Adyen integration name<\/strong>\u00a0\/ <strong>Adyen integration version<\/strong>. For example,\u00a0 <strong>Acme Corp POS<\/strong> \/ <strong>1.2.1<\/strong> \/ <strong>Acme Adyen connector<\/strong> \/ <strong>0.1\u00a0<\/strong><\/p>\n<\/td><\/tr><tr><td>\n<p><code>logLevel<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<p><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/p>\n<\/td><td>\n<p>Defines the level of logging provided.<\/p>\n<\/td><\/tr><\/tbody><\/table>\n<h2 id=\"callback\">Callback<\/h2>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 19%\"><col style=\"width: 80%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>initLibraryCallback<\/code><\/p>\n<\/td><td>\n<p>Returns the result of the library initialization.<\/p>\n<\/td><\/tr><\/tbody><\/table>\n<h2 id=\"callback-response-attribute\">Callback Response Attribute<\/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>libraryResult<\/code><\/td>\n<td>The result of the initialization of the C Library.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/initialize-the-library-jni","articleFields":{"id":"24217572","type":"page","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/initialize-the-library-jni","title":"Initialize the library","content":"Class\nNameDescription\nMerchantPos\n\nExtends AdyenPos. Class used to implement all functions that do not involve the PED. Implement the MerchantPos object yourself.\n\ninitLibraryRequest\u00a0Parameter\n\n\n\nName\nDescription\n\n\n\n\ninitLibraryRequest\nObject to hold parameters needed for library initialization. Use a builder pattern an initLibraryRequest and use it as parameter for (your instance of) \u00a0MerchantPos.initLibrary(). \u00a0\n\n\n\nMethod\nNameDescription\ninitLibrary\n\nMethod used to begin library Initialization.\nThis method returns an immediate response of type LibraryResult. Check if this result is \"OK\", before continuing the operation. If the LibraryResult value is not \"OK\", the system will not return the related callback with the asynchronous result. See here for more on extracting data from an event or callback.\n\n\ninitLibraryRequest Attributes\nNameTypeRequiredDescription\nlibraryEnvironment\n\nEnvironment\n\n\n\nThe execution environment.\n\nposId\n\nString\n\n\n\nThe unique POS ID.\n\nintegratorName\n\nString\n\n\n\nThe name of the integrator company, defined for logging reasons.This value should be the name of the company deploying\u00a0cash\u00a0register\u00a0or\u00a0Point-of-Sale\u00a0solution, for example,\u00a0\u00a0Retail\u00a0Consultancy\u00a0Corp.\n\nlogConfig\n\nLogConfig\n\n\n\nObject containing logLevel. For more information on setting the log level, see Logging.\n\nposName\n\nString\n\n\n\nThe symbolic POS name.\n\nappName\n\nString\n\n\n\nThe Integrator\/Merchant App ID.Format this value like so: Cash register company and product\u00a0\/\u00a0Cash register product version\u00a0\/ Adyen integration name\u00a0\/ Adyen integration version. For example,\u00a0 Acme Corp POS \/ 1.2.1 \/ Acme Adyen connector \/ 0.1\u00a0\n\nlogLevel\n\nString\n\n\n\nDefines the level of logging provided.\n\nCallback\nNameDescription\ninitLibraryCallback\n\nReturns the result of the library initialization.\n\nCallback Response Attribute\n\n\n\nName\nDescription\n\n\n\n\nlibraryResult\nThe result of the initialization of the C Library.\n\n\n","type":"page","locale":"pt","boost":14,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"Java Native Interface integration","lvl5":"Key steps","lvl6":"Initialize the library"},"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\/java-native-interface-integration","lvl5":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni","lvl6":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/java-native-interface-integration\/key-steps-jni\/initialize-the-library-jni"},"levels":7,"category":"In-person payments","category_color":"green","tags":["Initialize","library"]}}
