{"__v":0,"_id":"5848304664fdea370080a3aa","api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"MicroPos Core\"\n}\n[/block]\nÉ uma SDK que oferece uma interface simples para fazer transações financeiras, utilizando o **.NET Framework 4.5**.\n\n\n**Onde funfa?**\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/a42b866-Plataformas.png\",\n        \"Plataformas.png\",\n        384,\n        180,\n        \"#ccc9bd\"\n      ]\n    }\n  ]\n}\n[/block]\n**Objetivo**\n\nOferecer aos nossos parceiros que possuam aplicações de pagamento/automações comerciais, ferramentas fáceis para efetuar pagamentos sem a utilização de um TEF.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2c39857-Integrao.png\",\n        \"Integração.png\",\n        833,\n        481,\n        \"#161a18\"\n      ]\n    }\n  ]\n}\n[/block]\n**Dependências**\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome da SDK/Projeto\",\n    \"h-1\": \"Razão de ser\",\n    \"0-0\": \"Buy4.Framework.Portable\",\n    \"1-0\": \"Tms.Sdk\",\n    \"2-0\": \"Poi.Sdk\",\n    \"3-0\": \"Pinpad.Sdk\",\n    \"4-0\": \"MicroPos.Crossplaftorm\",\n    \"5-0\": \"MicroPos.Platform.Desktop\",\n    \"6-0\": \"MicroPos.Platform.Uwp\",\n    \"7-0\": \"Receipt.Sdk\",\n    \"0-1\": \"Faz a parte de comunicação HTTP.\",\n    \"1-1\": \"Faz a comunicação com o Terminal Management Service da Stone.\",\n    \"2-1\": \"Faz a comunicação com o autorizador da Stone.\",\n    \"3-1\": \"Faz a comunicação lógica (protocolo ABECS) com o pinpad.\",\n    \"4-1\": \"Define um contrato que a plataforma deverá cumprir. Atualmente, a MicroTef funciona nos ambientes descritos acima, mas se surgir a necessidade de implementar uma nova plataforma (iOS, por exemplo), um novo projeto não portable terá que ser criado e terá que cumprir as interfaces descritas nesse projeto. Exemplos de funcionalidades que são dependentes da plataforma: criptografia, log, comunicação serial, etc.\",\n    \"5-1\": \"MicroTef para desktop (Windows, Mono).\",\n    \"6-1\": \"MicroTef para Windows.Core (Windows 10 IoT, Windows 10, Windows Mobile 10).\",\n    \"7-1\": \"Envia recibos de transação, cancelamento e ativação de um terminal por e-mail.\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]","category":"58482dd8501f422300a9449c","createdAt":"2016-12-07T15:52:38.444Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":0,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"introdução-1","sync_unique":"","title":"Introdução","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Introdução


[block:api-header] { "type": "basic", "title": "MicroPos Core" } [/block] É uma SDK que oferece uma interface simples para fazer transações financeiras, utilizando o **.NET Framework 4.5**. **Onde funfa?** [block:image] { "images": [ { "image": [ "https://files.readme.io/a42b866-Plataformas.png", "Plataformas.png", 384, 180, "#ccc9bd" ] } ] } [/block] **Objetivo** Oferecer aos nossos parceiros que possuam aplicações de pagamento/automações comerciais, ferramentas fáceis para efetuar pagamentos sem a utilização de um TEF. [block:image] { "images": [ { "image": [ "https://files.readme.io/2c39857-Integrao.png", "Integração.png", 833, 481, "#161a18" ] } ] } [/block] **Dependências** [block:parameters] { "data": { "h-0": "Nome da SDK/Projeto", "h-1": "Razão de ser", "0-0": "Buy4.Framework.Portable", "1-0": "Tms.Sdk", "2-0": "Poi.Sdk", "3-0": "Pinpad.Sdk", "4-0": "MicroPos.Crossplaftorm", "5-0": "MicroPos.Platform.Desktop", "6-0": "MicroPos.Platform.Uwp", "7-0": "Receipt.Sdk", "0-1": "Faz a parte de comunicação HTTP.", "1-1": "Faz a comunicação com o Terminal Management Service da Stone.", "2-1": "Faz a comunicação com o autorizador da Stone.", "3-1": "Faz a comunicação lógica (protocolo ABECS) com o pinpad.", "4-1": "Define um contrato que a plataforma deverá cumprir. Atualmente, a MicroTef funciona nos ambientes descritos acima, mas se surgir a necessidade de implementar uma nova plataforma (iOS, por exemplo), um novo projeto não portable terá que ser criado e terá que cumprir as interfaces descritas nesse projeto. Exemplos de funcionalidades que são dependentes da plataforma: criptografia, log, comunicação serial, etc.", "5-1": "MicroTef para desktop (Windows, Mono).", "6-1": "MicroTef para Windows.Core (Windows 10 IoT, Windows 10, Windows Mobile 10).", "7-1": "Envia recibos de transação, cancelamento e ativação de um terminal por e-mail." }, "cols": 2, "rows": 8 } [/block]
[block:api-header] { "type": "basic", "title": "MicroPos Core" } [/block] É uma SDK que oferece uma interface simples para fazer transações financeiras, utilizando o **.NET Framework 4.5**. **Onde funfa?** [block:image] { "images": [ { "image": [ "https://files.readme.io/a42b866-Plataformas.png", "Plataformas.png", 384, 180, "#ccc9bd" ] } ] } [/block] **Objetivo** Oferecer aos nossos parceiros que possuam aplicações de pagamento/automações comerciais, ferramentas fáceis para efetuar pagamentos sem a utilização de um TEF. [block:image] { "images": [ { "image": [ "https://files.readme.io/2c39857-Integrao.png", "Integração.png", 833, 481, "#161a18" ] } ] } [/block] **Dependências** [block:parameters] { "data": { "h-0": "Nome da SDK/Projeto", "h-1": "Razão de ser", "0-0": "Buy4.Framework.Portable", "1-0": "Tms.Sdk", "2-0": "Poi.Sdk", "3-0": "Pinpad.Sdk", "4-0": "MicroPos.Crossplaftorm", "5-0": "MicroPos.Platform.Desktop", "6-0": "MicroPos.Platform.Uwp", "7-0": "Receipt.Sdk", "0-1": "Faz a parte de comunicação HTTP.", "1-1": "Faz a comunicação com o Terminal Management Service da Stone.", "2-1": "Faz a comunicação com o autorizador da Stone.", "3-1": "Faz a comunicação lógica (protocolo ABECS) com o pinpad.", "4-1": "Define um contrato que a plataforma deverá cumprir. Atualmente, a MicroTef funciona nos ambientes descritos acima, mas se surgir a necessidade de implementar uma nova plataforma (iOS, por exemplo), um novo projeto não portable terá que ser criado e terá que cumprir as interfaces descritas nesse projeto. Exemplos de funcionalidades que são dependentes da plataforma: criptografia, log, comunicação serial, etc.", "5-1": "MicroTef para desktop (Windows, Mono).", "6-1": "MicroTef para Windows.Core (Windows 10 IoT, Windows 10, Windows Mobile 10).", "7-1": "Envia recibos de transação, cancelamento e ativação de um terminal por e-mail." }, "cols": 2, "rows": 8 } [/block]
{"__v":0,"_id":"584831fb8b2a452f00fea2fa","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Você precisará de um ou mais pinpads conectados ao PC.\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Inicializar a plataforma\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Inicializa a plataforma desktop:\\nMicroPos.Platform.Desktop.DesktopInitializer.Initialize();\\n// Inicializa a plataforma UWP:\\nCrossPlatformUniversalApp.CrossPlatformUniversalAppInitializer.Initialize();\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Apenas uma plataforma pode ser inicializada por projeto.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Ativar seu terminal\"\n}\n[/block]\nA ativação é uma operação opcional. Deve ser feita quando a aplicação não tem acesso ao SAK, e sim ao StoneCode.\n\nVocê vai precisar de:\n\n* 1x StoneCode\n\n* 1x URL do TMS da Stone\n\nA ativação é uma operação para, através do StoneCode, resgatar o SAK e as informações do estabelecimento.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Cria um cliente para o TMS\\nITmsClient tms = TmsProvider.Get(tmsUri);\\n\\n// Envia uma requisição de ativação\\nIActivationReport activation = tms.Activate(stoneCode);\\n\\nif (activation?.WasSuccessful == true)\\n{\\n    // Ativação bem sucedida!\\n}\\nelse if (activation?.WasSuccessful == false)\\n{\\n    // Ativação falhou\\n    // Mostra código de erro:\\n    Debug.WriteLine(activation.ResponseCode);\\n\\n    // Mostra razão do erro:\\n    Debug.WriteLine(activation.ResponseReason);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Entender a mensagem de retorno da ativação\"\n}\n[/block]\nA interface **IActivationReport** retornada pelo TMS possui todos os dados sobre o estabelecimento.\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Tipo\",\n    \"h-1\": \"Informação\",\n    \"h-2\": \"Descrição\",\n    \"1-0\": \"string\",\n    \"8-0\": \"string\",\n    \"6-0\": \"string\",\n    \"5-0\": \"string\",\n    \"4-0\": \"string\",\n    \"3-0\": \"string\",\n    \"2-0\": \"string\",\n    \"7-0\": \"bool\",\n    \"0-0\": \"MerchantAddress\",\n    \"0-1\": \"Address\",\n    \"1-1\": \"CompanyName\",\n    \"2-1\": \"IdentityCode\",\n    \"3-1\": \"ResponseCode\",\n    \"4-1\": \"ResponseReason\",\n    \"5-1\": \"SaleAffiliationKey\",\n    \"6-1\": \"WasSuccessful\",\n    \"7-1\": \"XmlRequest\",\n    \"8-1\": \"XmlResponse\",\n    \"0-2\": \"Endereço do estabelecimento. Com o método **ToString()**, é possível obter o endereço formatado.\",\n    \"1-2\": \"Nome (nome fantasia) do estabelecimento.\",\n    \"2-2\": \"CPF ou CNPJ.\",\n    \"3-2\": \"Código de resposta em caso de erro.\",\n    \"4-2\": \"Razão da resposta em caso de erro.\",\n    \"5-2\": \"Identificador unico do meio de captura relacionado a um StoneCode. Um StoneCode pode ter varios SAKs, assim como um SAK pode estar relacionado a somente um StoneCode.\",\n    \"6-2\": \"Se a ativação foi bem sucedida.\",\n    \"7-2\": \"XML de requisição da ativação.\",\n    \"8-2\": \"XML de resposta da ativação, recebido pelo TMS.\"\n  },\n  \"cols\": 3,\n  \"rows\": 9\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Construir o(s) autorizador(es)\"\n}\n[/block]\nVocê irá precisar de:\n\n* 1x Sale Affiliation Key (SAK)\n\n* 1x URL do autorizador da Stone\n\n* 1x URL do TMS (Terminal Management Service) da Stone\n\n> :trophy: Boa prática: personalize!\n\n> Crie mensagens personalizadas para aparecerem na tela do pinpad. Cada mensagem não pode ter mais de 16 caracteres (caso contrário, serão mostrados os primeiros 16 caracteres). Assim:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"DisplayableMessages pinpadMessages = new DisplayableMessages()\\n{\\n    ApprovedMessage = \\\"Aprovada :-)\\\",\\n    DeclinedMessage = \\\"Negada :-(\\\",\\n    InitializationMessage = \\\"Olá!\\\",\\n    MainLabel = \\\"Stone Pagamentos\\\",\\n    ProcessingMessage = \\\"Processando...\\\"\\n};\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\nSe você **conhece a porta serial ** a qual o pinpad está conectado, utilize:\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"try\\n{\\n    ICardPaymentAuthorizer authorizer = DeviceProvider.GetOneOrFirst(\\\"SAK_DE_EXEMPLO\\\", \\\"authorizador.com\\\",\\n        \\\"tms.com\\\", pinpadMessages, \\\"COM6\\\");\\n}\\ncatch (PinpadNotFoundException)\\n{\\n    // Nenhum pinpad conectado à máquina   \\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\nSe você não souber, utilize:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"try\\n{\\n    ICardPaymentAuthorizer authorizer = DeviceProvider.GetOneOrFirst(\\\"SAK_DE_EXEMPLO\\\", \\\"authorizador.com\\\",\\n        \\\"tms.com\\\", pinpadMessages);\\n}\\ncatch (PinpadNotFoundException)\\n{\\n    // Nenhum pinpad conectado à máquina   \\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n**Cada ICardPaymentAuthorizer está ligado à um único pinpad.**\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/e75101a-Relao_Authorizer_Pinpad.png\",\n        \"Relação Authorizer Pinpad.png\",\n        571,\n        100,\n        \"#131213\"\n      ]\n    }\n  ]\n}\n[/block]\nSe você quiser **todos os pinpads conectados à màquina**, use:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"try\\n{\\n    ICollection<ICardPaymentAuthorizer> authorizers = DeviceProvider.GetAll(\\\"SAK_DE_EXEMPLO\\\",\\n        \\\"authorizador.com\\\", \\\"tms.com\\\", pinpadMessages);\\n}\\ncatch (PinpadNotFoundException)\\n{\\n    // Nenhum pinpad conectado à máquina   \\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]","category":"58482dd8501f422300a9449c","createdAt":"2016-12-07T15:59:55.512Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":1,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"como-usar","sync_unique":"","title":"Como usar ?","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Como usar ?


Você precisará de um ou mais pinpads conectados ao PC. [block:api-header] { "type": "basic", "title": "Inicializar a plataforma" } [/block] [block:code] { "codes": [ { "code": "// Inicializa a plataforma desktop:\nMicroPos.Platform.Desktop.DesktopInitializer.Initialize();\n// Inicializa a plataforma UWP:\nCrossPlatformUniversalApp.CrossPlatformUniversalAppInitializer.Initialize();", "language": "csharp" } ] } [/block] [block:callout] { "type": "info", "body": "Apenas uma plataforma pode ser inicializada por projeto." } [/block] [block:api-header] { "type": "basic", "title": "Ativar seu terminal" } [/block] A ativação é uma operação opcional. Deve ser feita quando a aplicação não tem acesso ao SAK, e sim ao StoneCode. Você vai precisar de: * 1x StoneCode * 1x URL do TMS da Stone A ativação é uma operação para, através do StoneCode, resgatar o SAK e as informações do estabelecimento. [block:code] { "codes": [ { "code": "// Cria um cliente para o TMS\nITmsClient tms = TmsProvider.Get(tmsUri);\n\n// Envia uma requisição de ativação\nIActivationReport activation = tms.Activate(stoneCode);\n\nif (activation?.WasSuccessful == true)\n{\n // Ativação bem sucedida!\n}\nelse if (activation?.WasSuccessful == false)\n{\n // Ativação falhou\n // Mostra código de erro:\n Debug.WriteLine(activation.ResponseCode);\n\n // Mostra razão do erro:\n Debug.WriteLine(activation.ResponseReason);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Entender a mensagem de retorno da ativação" } [/block] A interface **IActivationReport** retornada pelo TMS possui todos os dados sobre o estabelecimento. [block:parameters] { "data": { "h-0": "Tipo", "h-1": "Informação", "h-2": "Descrição", "1-0": "string", "8-0": "string", "6-0": "string", "5-0": "string", "4-0": "string", "3-0": "string", "2-0": "string", "7-0": "bool", "0-0": "MerchantAddress", "0-1": "Address", "1-1": "CompanyName", "2-1": "IdentityCode", "3-1": "ResponseCode", "4-1": "ResponseReason", "5-1": "SaleAffiliationKey", "6-1": "WasSuccessful", "7-1": "XmlRequest", "8-1": "XmlResponse", "0-2": "Endereço do estabelecimento. Com o método **ToString()**, é possível obter o endereço formatado.", "1-2": "Nome (nome fantasia) do estabelecimento.", "2-2": "CPF ou CNPJ.", "3-2": "Código de resposta em caso de erro.", "4-2": "Razão da resposta em caso de erro.", "5-2": "Identificador unico do meio de captura relacionado a um StoneCode. Um StoneCode pode ter varios SAKs, assim como um SAK pode estar relacionado a somente um StoneCode.", "6-2": "Se a ativação foi bem sucedida.", "7-2": "XML de requisição da ativação.", "8-2": "XML de resposta da ativação, recebido pelo TMS." }, "cols": 3, "rows": 9 } [/block] [block:api-header] { "type": "basic", "title": "Construir o(s) autorizador(es)" } [/block] Você irá precisar de: * 1x Sale Affiliation Key (SAK) * 1x URL do autorizador da Stone * 1x URL do TMS (Terminal Management Service) da Stone > :trophy: Boa prática: personalize! > Crie mensagens personalizadas para aparecerem na tela do pinpad. Cada mensagem não pode ter mais de 16 caracteres (caso contrário, serão mostrados os primeiros 16 caracteres). Assim: [block:code] { "codes": [ { "code": "DisplayableMessages pinpadMessages = new DisplayableMessages()\n{\n ApprovedMessage = \"Aprovada :-)\",\n DeclinedMessage = \"Negada :-(\",\n InitializationMessage = \"Olá!\",\n MainLabel = \"Stone Pagamentos\",\n ProcessingMessage = \"Processando...\"\n};", "language": "csharp" } ] } [/block] Se você **conhece a porta serial ** a qual o pinpad está conectado, utilize: [block:code] { "codes": [ { "code": "try\n{\n ICardPaymentAuthorizer authorizer = DeviceProvider.GetOneOrFirst(\"SAK_DE_EXEMPLO\", \"authorizador.com\",\n \"tms.com\", pinpadMessages, \"COM6\");\n}\ncatch (PinpadNotFoundException)\n{\n // Nenhum pinpad conectado à máquina \n}", "language": "csharp" } ] } [/block] Se você não souber, utilize: [block:code] { "codes": [ { "code": "try\n{\n ICardPaymentAuthorizer authorizer = DeviceProvider.GetOneOrFirst(\"SAK_DE_EXEMPLO\", \"authorizador.com\",\n \"tms.com\", pinpadMessages);\n}\ncatch (PinpadNotFoundException)\n{\n // Nenhum pinpad conectado à máquina \n}", "language": "csharp" } ] } [/block] **Cada ICardPaymentAuthorizer está ligado à um único pinpad.** [block:image] { "images": [ { "image": [ "https://files.readme.io/e75101a-Relao_Authorizer_Pinpad.png", "Relação Authorizer Pinpad.png", 571, 100, "#131213" ] } ] } [/block] Se você quiser **todos os pinpads conectados à màquina**, use: [block:code] { "codes": [ { "code": "try\n{\n ICollection<ICardPaymentAuthorizer> authorizers = DeviceProvider.GetAll(\"SAK_DE_EXEMPLO\",\n \"authorizador.com\", \"tms.com\", pinpadMessages);\n}\ncatch (PinpadNotFoundException)\n{\n // Nenhum pinpad conectado à máquina \n}", "language": "csharp" } ] } [/block]
Você precisará de um ou mais pinpads conectados ao PC. [block:api-header] { "type": "basic", "title": "Inicializar a plataforma" } [/block] [block:code] { "codes": [ { "code": "// Inicializa a plataforma desktop:\nMicroPos.Platform.Desktop.DesktopInitializer.Initialize();\n// Inicializa a plataforma UWP:\nCrossPlatformUniversalApp.CrossPlatformUniversalAppInitializer.Initialize();", "language": "csharp" } ] } [/block] [block:callout] { "type": "info", "body": "Apenas uma plataforma pode ser inicializada por projeto." } [/block] [block:api-header] { "type": "basic", "title": "Ativar seu terminal" } [/block] A ativação é uma operação opcional. Deve ser feita quando a aplicação não tem acesso ao SAK, e sim ao StoneCode. Você vai precisar de: * 1x StoneCode * 1x URL do TMS da Stone A ativação é uma operação para, através do StoneCode, resgatar o SAK e as informações do estabelecimento. [block:code] { "codes": [ { "code": "// Cria um cliente para o TMS\nITmsClient tms = TmsProvider.Get(tmsUri);\n\n// Envia uma requisição de ativação\nIActivationReport activation = tms.Activate(stoneCode);\n\nif (activation?.WasSuccessful == true)\n{\n // Ativação bem sucedida!\n}\nelse if (activation?.WasSuccessful == false)\n{\n // Ativação falhou\n // Mostra código de erro:\n Debug.WriteLine(activation.ResponseCode);\n\n // Mostra razão do erro:\n Debug.WriteLine(activation.ResponseReason);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Entender a mensagem de retorno da ativação" } [/block] A interface **IActivationReport** retornada pelo TMS possui todos os dados sobre o estabelecimento. [block:parameters] { "data": { "h-0": "Tipo", "h-1": "Informação", "h-2": "Descrição", "1-0": "string", "8-0": "string", "6-0": "string", "5-0": "string", "4-0": "string", "3-0": "string", "2-0": "string", "7-0": "bool", "0-0": "MerchantAddress", "0-1": "Address", "1-1": "CompanyName", "2-1": "IdentityCode", "3-1": "ResponseCode", "4-1": "ResponseReason", "5-1": "SaleAffiliationKey", "6-1": "WasSuccessful", "7-1": "XmlRequest", "8-1": "XmlResponse", "0-2": "Endereço do estabelecimento. Com o método **ToString()**, é possível obter o endereço formatado.", "1-2": "Nome (nome fantasia) do estabelecimento.", "2-2": "CPF ou CNPJ.", "3-2": "Código de resposta em caso de erro.", "4-2": "Razão da resposta em caso de erro.", "5-2": "Identificador unico do meio de captura relacionado a um StoneCode. Um StoneCode pode ter varios SAKs, assim como um SAK pode estar relacionado a somente um StoneCode.", "6-2": "Se a ativação foi bem sucedida.", "7-2": "XML de requisição da ativação.", "8-2": "XML de resposta da ativação, recebido pelo TMS." }, "cols": 3, "rows": 9 } [/block] [block:api-header] { "type": "basic", "title": "Construir o(s) autorizador(es)" } [/block] Você irá precisar de: * 1x Sale Affiliation Key (SAK) * 1x URL do autorizador da Stone * 1x URL do TMS (Terminal Management Service) da Stone > :trophy: Boa prática: personalize! > Crie mensagens personalizadas para aparecerem na tela do pinpad. Cada mensagem não pode ter mais de 16 caracteres (caso contrário, serão mostrados os primeiros 16 caracteres). Assim: [block:code] { "codes": [ { "code": "DisplayableMessages pinpadMessages = new DisplayableMessages()\n{\n ApprovedMessage = \"Aprovada :-)\",\n DeclinedMessage = \"Negada :-(\",\n InitializationMessage = \"Olá!\",\n MainLabel = \"Stone Pagamentos\",\n ProcessingMessage = \"Processando...\"\n};", "language": "csharp" } ] } [/block] Se você **conhece a porta serial ** a qual o pinpad está conectado, utilize: [block:code] { "codes": [ { "code": "try\n{\n ICardPaymentAuthorizer authorizer = DeviceProvider.GetOneOrFirst(\"SAK_DE_EXEMPLO\", \"authorizador.com\",\n \"tms.com\", pinpadMessages, \"COM6\");\n}\ncatch (PinpadNotFoundException)\n{\n // Nenhum pinpad conectado à máquina \n}", "language": "csharp" } ] } [/block] Se você não souber, utilize: [block:code] { "codes": [ { "code": "try\n{\n ICardPaymentAuthorizer authorizer = DeviceProvider.GetOneOrFirst(\"SAK_DE_EXEMPLO\", \"authorizador.com\",\n \"tms.com\", pinpadMessages);\n}\ncatch (PinpadNotFoundException)\n{\n // Nenhum pinpad conectado à máquina \n}", "language": "csharp" } ] } [/block] **Cada ICardPaymentAuthorizer está ligado à um único pinpad.** [block:image] { "images": [ { "image": [ "https://files.readme.io/e75101a-Relao_Authorizer_Pinpad.png", "Relação Authorizer Pinpad.png", 571, 100, "#131213" ] } ] } [/block] Se você quiser **todos os pinpads conectados à màquina**, use: [block:code] { "codes": [ { "code": "try\n{\n ICollection<ICardPaymentAuthorizer> authorizers = DeviceProvider.GetAll(\"SAK_DE_EXEMPLO\",\n \"authorizador.com\", \"tms.com\", pinpadMessages);\n}\ncatch (PinpadNotFoundException)\n{\n // Nenhum pinpad conectado à máquina \n}", "language": "csharp" } ] } [/block]
{"__v":0,"_id":"584834d84352c62d0040f3bf","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Fluxo clássico\"\n}\n[/block]\nFluxo de transação em que a **nossa SDK fica responsável por todo o processo de autorização**, ou seja: leitura do cartão, leitura da senha, envio da mensagem ao autorizador e \"compreensão\" da resposta do autorizador.\n\n**Nesse fluxo, é necessário conhecer todos os dados [mandatórios] da transação**, ou seja, valor e tipo (débito ou crédito).\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Montando uma transação de débito de 10 centavos:\\nTransactionEntry transaction = new TransactionEntry(TransactionType.Debit, 0.1m);\\n\\n// Boa prática: sempre utilize o ITK!\\ntransaction.InitiatorTransactionKey = \\\"algum identificador\\\";\\n\\ntry\\n{\\n    // Inicia o fluxo transacional:\\n    IAuthorizationReport report = authorizer.Authorize(transaction);\\n}\\ncatch (ExpiredCardException)\\n{\\n    // Um cartão expirado foi passado/inserido   \\n}\\ncatch (CardHasChipException)\\n{\\n    // Um cartão que tem chip foi passado como tarja   \\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Fluxo alternativo\"\n}\n[/block]\nFluxo da transação em que **não se tem todas as informações sobre a transação**, ou se **deseja performar alguma operação entre as etapas da transação**.\n\n* **Exemplo**: deseja-se iniciar a transação (esperar pelo cartão), mas antes de solicitar a senha o serviço precisa consultar um sistema que possui o valor da transação.\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Monta uma transação que não conhece nem o valor nem o tipo da transação:\\nTransactionEntry transaction = new TransactionEntry()\\n{\\n    CaptureTransaction = true\\n};\\n\\nICard cardRead;\\nResponseStatus status = ResponseStatus.Undefined;\\n\\ntry\\n{\\n    // Lê o cartão.\\n    // Como o tipo da transação não foi especificado, o pinpad perguntará se a\\n    // transação é de crédito ou débito. Se o cartão for apenas de crédito ou\\n    // apenas de débito, o pinpad escolherá automaticamente.\\n    status = authorizer.ReadCard(out cardRead, transaction);\\n    if (status != ResponseStatus.Ok) { throw new SomeErrorException(); }\\n}\\ncatch (ExpiredCardException)\\n{\\n    // Um cartão expirado foi passado/inserido   \\n}\\ncatch (CardHasChipException)\\n{\\n    // Um cartão que tem chip foi passado como tarja   \\n}\\n\\n// Método FICTICIO, em que um suposto serviço retorna o valor da transação:\\ntransaction.Amount = this.AutomationService.GetAmount();\\n\\nPin pinInformation;\\n\\n// Lê a senha do cartão:\\nstatus = authorizer.ReadPassword(out pin, cardRead, transaction.Amount);\\nif (status != ResponseStatus.Ok) { throw new AnotherErrorException(); }\\n\\n// Envia a transação para o autorizador da Stone:\\nIAuthorizationReport authorizationReport = authorizer.SendAuthorizationAndGetReport(card, transaction,\\n    pin);\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n> :trophy: Boa prática: utilize o ITK!\n\n> O Initiator Transaction Key (ITK) é um identificador da transação definido pela aplicação integradora. Se o ITK ficar vazio, iremos substituir esse valor por um GUID. \"Mas por que devo utilizá-lo?\"\n\n1. O cancelamento de uma transação é feito através de um ATK (identificador da transação definido pela Stone) ou pelo ITK. Caso algo dê errado no processo de autorização, o ATK não estará disponível. Ou seja, o cancelamento será através do ITK.\n\n2. Esse campo aparece na conciliação.\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Eventos na autorização\"\n}\n[/block]\nEm ambos os fluxos (clássico e alternativo), durante a autorização um evento será disparado com a status da transação. Para capturá-los (attach), faça o seguinte:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"authorizer.OnStateChanged += this.OnTransactionStateChange;\\nprivate void OnTransactionStateChange(object sender, AuthorizationStatusChangeEventArgs e)\\n{\\n    Debug.WriteLine(e.AuthorizationStatus + \\\" \\\" + e.Message);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Entender a mensagem de retorno do autorizador\"\n}\n[/block]\nA interface **IAuthorizationReport** retornada nos métodos de autorização possuem todos os dados da transação.\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Tipo\",\n    \"h-1\": \"Informação\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"bool\",\n    \"0-1\": \"WasApproved\",\n    \"0-2\": \"Se a transação foi aprovada ou não\",\n    \"1-0\": \"string\",\n    \"1-1\": \"AcquirerTransactionKey\",\n    \"1-2\": \"ID da transação definido pela Stone (também conhecido por Stone ID). :trophy: **Boa prática: persista esse dado em algum lugar!**\",\n    \"2-0\": \"string\",\n    \"2-1\": \"InitiatorTransactionKey\",\n    \"2-2\": \"Identificador da transação definido pela aplicação. Se esse campo não for definido, um GUID será usado aqui. :trophy: **Boa prática: persista esse dado em algum lugar!**\",\n    \"3-0\": \"decimal\",\n    \"3-1\": \"Amount\",\n    \"3-2\": \"Valor da transação em reais. :trophy: **Boa prática: persista esse dado em algum lugar!**\",\n    \"4-0\": \"DateTime\",\n    \"4-1\": \"DateTime\",\n    \"4-2\": \"Data e hora da transação.\",\n    \"5-0\": \"TransactionType\",\n    \"5-1\": \"TransactionType\",\n    \"5-2\": \"Tipo da transação (débito/crédito).\",\n    \"6-0\": \"Installment\",\n    \"6-1\": \"Installment\",\n    \"6-2\": \"Dados do parcelamento da transação.\",\n    \"7-0\": \"ICard\",\n    \"7-1\": \"Card\",\n    \"7-2\": \"Dados do cartão utilizado na transação.\",\n    \"8-0\": \"int\",\n    \"8-1\": \"ResponseCode\",\n    \"8-2\": \"Código de resposta do autorizador. :trophy: **Boa prática: persista esse dado em algum lugar!**\",\n    \"9-0\": \"string\",\n    \"10-0\": \"string\",\n    \"11-0\": \"string\",\n    \"9-1\": \"ResponseReason\",\n    \"10-1\": \"XmlResponse\",\n    \"11-1\": \"XmlRequest\",\n    \"12-0\": \"PoiResponseBase\",\n    \"12-1\": \"RawResponse\",\n    \"9-2\": \"Razão de resposta do autorizador.\",\n    \"10-2\": \"XML de resposta da autorização.\",\n    \"11-2\": \"XML de requisição da autorização.\",\n    \"12-2\": \"Resposta \\\"crua\\\" de autorização.\"\n  },\n  \"cols\": 3,\n  \"rows\": 13\n}\n[/block]","category":"58482dd8501f422300a9449c","createdAt":"2016-12-07T16:12:08.537Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":2,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"passar-uma-transação","sync_unique":"","title":"Passar uma transação","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Passar uma transação


[block:api-header] { "type": "basic", "title": "Fluxo clássico" } [/block] Fluxo de transação em que a **nossa SDK fica responsável por todo o processo de autorização**, ou seja: leitura do cartão, leitura da senha, envio da mensagem ao autorizador e "compreensão" da resposta do autorizador. **Nesse fluxo, é necessário conhecer todos os dados [mandatórios] da transação**, ou seja, valor e tipo (débito ou crédito). [block:code] { "codes": [ { "code": "// Montando uma transação de débito de 10 centavos:\nTransactionEntry transaction = new TransactionEntry(TransactionType.Debit, 0.1m);\n\n// Boa prática: sempre utilize o ITK!\ntransaction.InitiatorTransactionKey = \"algum identificador\";\n\ntry\n{\n // Inicia o fluxo transacional:\n IAuthorizationReport report = authorizer.Authorize(transaction);\n}\ncatch (ExpiredCardException)\n{\n // Um cartão expirado foi passado/inserido \n}\ncatch (CardHasChipException)\n{\n // Um cartão que tem chip foi passado como tarja \n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Fluxo alternativo" } [/block] Fluxo da transação em que **não se tem todas as informações sobre a transação**, ou se **deseja performar alguma operação entre as etapas da transação**. * **Exemplo**: deseja-se iniciar a transação (esperar pelo cartão), mas antes de solicitar a senha o serviço precisa consultar um sistema que possui o valor da transação. [block:code] { "codes": [ { "code": "// Monta uma transação que não conhece nem o valor nem o tipo da transação:\nTransactionEntry transaction = new TransactionEntry()\n{\n CaptureTransaction = true\n};\n\nICard cardRead;\nResponseStatus status = ResponseStatus.Undefined;\n\ntry\n{\n // Lê o cartão.\n // Como o tipo da transação não foi especificado, o pinpad perguntará se a\n // transação é de crédito ou débito. Se o cartão for apenas de crédito ou\n // apenas de débito, o pinpad escolherá automaticamente.\n status = authorizer.ReadCard(out cardRead, transaction);\n if (status != ResponseStatus.Ok) { throw new SomeErrorException(); }\n}\ncatch (ExpiredCardException)\n{\n // Um cartão expirado foi passado/inserido \n}\ncatch (CardHasChipException)\n{\n // Um cartão que tem chip foi passado como tarja \n}\n\n// Método FICTICIO, em que um suposto serviço retorna o valor da transação:\ntransaction.Amount = this.AutomationService.GetAmount();\n\nPin pinInformation;\n\n// Lê a senha do cartão:\nstatus = authorizer.ReadPassword(out pin, cardRead, transaction.Amount);\nif (status != ResponseStatus.Ok) { throw new AnotherErrorException(); }\n\n// Envia a transação para o autorizador da Stone:\nIAuthorizationReport authorizationReport = authorizer.SendAuthorizationAndGetReport(card, transaction,\n pin);", "language": "csharp" } ] } [/block] > :trophy: Boa prática: utilize o ITK! > O Initiator Transaction Key (ITK) é um identificador da transação definido pela aplicação integradora. Se o ITK ficar vazio, iremos substituir esse valor por um GUID. "Mas por que devo utilizá-lo?" 1. O cancelamento de uma transação é feito através de um ATK (identificador da transação definido pela Stone) ou pelo ITK. Caso algo dê errado no processo de autorização, o ATK não estará disponível. Ou seja, o cancelamento será através do ITK. 2. Esse campo aparece na conciliação. [block:api-header] { "type": "basic", "title": "Eventos na autorização" } [/block] Em ambos os fluxos (clássico e alternativo), durante a autorização um evento será disparado com a status da transação. Para capturá-los (attach), faça o seguinte: [block:code] { "codes": [ { "code": "authorizer.OnStateChanged += this.OnTransactionStateChange;\nprivate void OnTransactionStateChange(object sender, AuthorizationStatusChangeEventArgs e)\n{\n Debug.WriteLine(e.AuthorizationStatus + \" \" + e.Message);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Entender a mensagem de retorno do autorizador" } [/block] A interface **IAuthorizationReport** retornada nos métodos de autorização possuem todos os dados da transação. [block:parameters] { "data": { "h-0": "Tipo", "h-1": "Informação", "h-2": "Descrição", "0-0": "bool", "0-1": "WasApproved", "0-2": "Se a transação foi aprovada ou não", "1-0": "string", "1-1": "AcquirerTransactionKey", "1-2": "ID da transação definido pela Stone (também conhecido por Stone ID). :trophy: **Boa prática: persista esse dado em algum lugar!**", "2-0": "string", "2-1": "InitiatorTransactionKey", "2-2": "Identificador da transação definido pela aplicação. Se esse campo não for definido, um GUID será usado aqui. :trophy: **Boa prática: persista esse dado em algum lugar!**", "3-0": "decimal", "3-1": "Amount", "3-2": "Valor da transação em reais. :trophy: **Boa prática: persista esse dado em algum lugar!**", "4-0": "DateTime", "4-1": "DateTime", "4-2": "Data e hora da transação.", "5-0": "TransactionType", "5-1": "TransactionType", "5-2": "Tipo da transação (débito/crédito).", "6-0": "Installment", "6-1": "Installment", "6-2": "Dados do parcelamento da transação.", "7-0": "ICard", "7-1": "Card", "7-2": "Dados do cartão utilizado na transação.", "8-0": "int", "8-1": "ResponseCode", "8-2": "Código de resposta do autorizador. :trophy: **Boa prática: persista esse dado em algum lugar!**", "9-0": "string", "10-0": "string", "11-0": "string", "9-1": "ResponseReason", "10-1": "XmlResponse", "11-1": "XmlRequest", "12-0": "PoiResponseBase", "12-1": "RawResponse", "9-2": "Razão de resposta do autorizador.", "10-2": "XML de resposta da autorização.", "11-2": "XML de requisição da autorização.", "12-2": "Resposta \"crua\" de autorização." }, "cols": 3, "rows": 13 } [/block]
[block:api-header] { "type": "basic", "title": "Fluxo clássico" } [/block] Fluxo de transação em que a **nossa SDK fica responsável por todo o processo de autorização**, ou seja: leitura do cartão, leitura da senha, envio da mensagem ao autorizador e "compreensão" da resposta do autorizador. **Nesse fluxo, é necessário conhecer todos os dados [mandatórios] da transação**, ou seja, valor e tipo (débito ou crédito). [block:code] { "codes": [ { "code": "// Montando uma transação de débito de 10 centavos:\nTransactionEntry transaction = new TransactionEntry(TransactionType.Debit, 0.1m);\n\n// Boa prática: sempre utilize o ITK!\ntransaction.InitiatorTransactionKey = \"algum identificador\";\n\ntry\n{\n // Inicia o fluxo transacional:\n IAuthorizationReport report = authorizer.Authorize(transaction);\n}\ncatch (ExpiredCardException)\n{\n // Um cartão expirado foi passado/inserido \n}\ncatch (CardHasChipException)\n{\n // Um cartão que tem chip foi passado como tarja \n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Fluxo alternativo" } [/block] Fluxo da transação em que **não se tem todas as informações sobre a transação**, ou se **deseja performar alguma operação entre as etapas da transação**. * **Exemplo**: deseja-se iniciar a transação (esperar pelo cartão), mas antes de solicitar a senha o serviço precisa consultar um sistema que possui o valor da transação. [block:code] { "codes": [ { "code": "// Monta uma transação que não conhece nem o valor nem o tipo da transação:\nTransactionEntry transaction = new TransactionEntry()\n{\n CaptureTransaction = true\n};\n\nICard cardRead;\nResponseStatus status = ResponseStatus.Undefined;\n\ntry\n{\n // Lê o cartão.\n // Como o tipo da transação não foi especificado, o pinpad perguntará se a\n // transação é de crédito ou débito. Se o cartão for apenas de crédito ou\n // apenas de débito, o pinpad escolherá automaticamente.\n status = authorizer.ReadCard(out cardRead, transaction);\n if (status != ResponseStatus.Ok) { throw new SomeErrorException(); }\n}\ncatch (ExpiredCardException)\n{\n // Um cartão expirado foi passado/inserido \n}\ncatch (CardHasChipException)\n{\n // Um cartão que tem chip foi passado como tarja \n}\n\n// Método FICTICIO, em que um suposto serviço retorna o valor da transação:\ntransaction.Amount = this.AutomationService.GetAmount();\n\nPin pinInformation;\n\n// Lê a senha do cartão:\nstatus = authorizer.ReadPassword(out pin, cardRead, transaction.Amount);\nif (status != ResponseStatus.Ok) { throw new AnotherErrorException(); }\n\n// Envia a transação para o autorizador da Stone:\nIAuthorizationReport authorizationReport = authorizer.SendAuthorizationAndGetReport(card, transaction,\n pin);", "language": "csharp" } ] } [/block] > :trophy: Boa prática: utilize o ITK! > O Initiator Transaction Key (ITK) é um identificador da transação definido pela aplicação integradora. Se o ITK ficar vazio, iremos substituir esse valor por um GUID. "Mas por que devo utilizá-lo?" 1. O cancelamento de uma transação é feito através de um ATK (identificador da transação definido pela Stone) ou pelo ITK. Caso algo dê errado no processo de autorização, o ATK não estará disponível. Ou seja, o cancelamento será através do ITK. 2. Esse campo aparece na conciliação. [block:api-header] { "type": "basic", "title": "Eventos na autorização" } [/block] Em ambos os fluxos (clássico e alternativo), durante a autorização um evento será disparado com a status da transação. Para capturá-los (attach), faça o seguinte: [block:code] { "codes": [ { "code": "authorizer.OnStateChanged += this.OnTransactionStateChange;\nprivate void OnTransactionStateChange(object sender, AuthorizationStatusChangeEventArgs e)\n{\n Debug.WriteLine(e.AuthorizationStatus + \" \" + e.Message);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Entender a mensagem de retorno do autorizador" } [/block] A interface **IAuthorizationReport** retornada nos métodos de autorização possuem todos os dados da transação. [block:parameters] { "data": { "h-0": "Tipo", "h-1": "Informação", "h-2": "Descrição", "0-0": "bool", "0-1": "WasApproved", "0-2": "Se a transação foi aprovada ou não", "1-0": "string", "1-1": "AcquirerTransactionKey", "1-2": "ID da transação definido pela Stone (também conhecido por Stone ID). :trophy: **Boa prática: persista esse dado em algum lugar!**", "2-0": "string", "2-1": "InitiatorTransactionKey", "2-2": "Identificador da transação definido pela aplicação. Se esse campo não for definido, um GUID será usado aqui. :trophy: **Boa prática: persista esse dado em algum lugar!**", "3-0": "decimal", "3-1": "Amount", "3-2": "Valor da transação em reais. :trophy: **Boa prática: persista esse dado em algum lugar!**", "4-0": "DateTime", "4-1": "DateTime", "4-2": "Data e hora da transação.", "5-0": "TransactionType", "5-1": "TransactionType", "5-2": "Tipo da transação (débito/crédito).", "6-0": "Installment", "6-1": "Installment", "6-2": "Dados do parcelamento da transação.", "7-0": "ICard", "7-1": "Card", "7-2": "Dados do cartão utilizado na transação.", "8-0": "int", "8-1": "ResponseCode", "8-2": "Código de resposta do autorizador. :trophy: **Boa prática: persista esse dado em algum lugar!**", "9-0": "string", "10-0": "string", "11-0": "string", "9-1": "ResponseReason", "10-1": "XmlResponse", "11-1": "XmlRequest", "12-0": "PoiResponseBase", "12-1": "RawResponse", "9-2": "Razão de resposta do autorizador.", "10-2": "XML de resposta da autorização.", "11-2": "XML de requisição da autorização.", "12-2": "Resposta \"crua\" de autorização." }, "cols": 3, "rows": 13 } [/block]
{"__v":0,"_id":"584834e864fdea370080a3ae","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"* Para cancelar uma transação através do IAuthorizationResponse:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Montando uma transação de débito de 10 centavos:\\nTransactionEntry transaction = new TransactionEntry(TransactionType.Debit, 0.1m);\\n\\n// Boa prática: sempre utilize o ITK!\\ntransaction.InitiatorTransactionKey = \\\"algum identificador\\\";\\n\\nIAuthorizationReport report = null;\\n\\ntry\\n{\\n    // Envia a transação para o autorizador da Stone:\\n    report = authorizer.Authorize(transaction);\\n}\\ncatch (ExpiredCardException)\\n{\\n    // Um cartão expirado foi passado/inserido   \\n}\\ncatch (CardHasChipException)\\n{\\n    // Um cartão que tem chip foi passado como tarja   \\n}\\n\\nCancellationRequest cancelRequest = CancellationRequest.CreateCancellationRequest(\\\"SAK_DE_EXEMPLO\\\",\\n    report.RawResponse);\\nauthorizer.AuthorizationProvider.SendRequest(cancelRequest);\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n**Para cancelar uma transação através de um ID da transação, considere o seguinte trecho de código:**\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Cria um tipo de parcelamento: crédito em 4 vezes sem juros:\\nInstallment installment = new Installment() { Type = InstallmentType.Merchant, Number = 4 }\\n\\n// Monta a transação\\nTransactionEntry transactionToCancel = new TransactionEntry(TransactionType.Credit, 120m, installment,\\n    \\\"ITK_DE_EXEMPLO\\\");\\n\\nIAuthorizationReport authorizationReport = null;\\n\\ntry\\n{\\n    // Autoriza\\n    authorizationReport = authorizer.Authorize(transactionToCancel);\\n}\\ncatch (ExpiredCardException)\\n{\\n    // Um cartão expirado foi passado/inserido   \\n}\\ncatch (CardHasChipException)\\n{\\n    // Um cartão que tem chip foi passado como tarja   \\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n* Para cancelar uma transação através do ITK:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Monta a requisição de cancelamento:\\nCancellationRequest cancelRequest = CancellationRequest.\\n    CreateCancellationRequestByInitiatorTransactionKey(\\\"SAK_DE_EXEMPLO\\\",\\n    authorizationReport.InitiatorTransactionKey, authorizationReport.Amount, true);\\n\\n// Envia a requirição de cancelamento:\\nauthorizer.AuthorizationProvider.SendRequest(cancelRequest);\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n* Para cancelar uma transação através do ATK:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Monta a requisição de cancelamento:\\nCancellationRequest cancelRequest = CancellationRequest.\\n    CreateCancellationRequestByAcquirerTransactionKey(\\\"SAK_DE_EXEMPLO\\\",\\n    authorizationReport.AcquirerTransactionKey, authorizationReport.Amount, true);\\n\\n// Envia a requisição de cancelamento:\\nauthorizer.AuthorizationProvider.SendRequest(cancelRequest);\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Boa prática: desconecte o pinpad\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Task.Run(() =>\\n{\\n    // Cancela  o ultimo comando do pinpad:\\n    this.authorizer.PinpadFacade.Communication.CancelRequest();\\n\\n    // Desconecta:\\n    this.authorizer.PinpadFacade.Communication.ClosePinpadConnection(this.authorizer.\\n        PinpadMessages.MainLabel);\\n});\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]","category":"58482dd8501f422300a9449c","createdAt":"2016-12-07T16:12:24.977Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":3,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"cancelar-uma-transação","sync_unique":"","title":"Cancelar uma transação","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Cancelar uma transação


* Para cancelar uma transação através do IAuthorizationResponse: [block:code] { "codes": [ { "code": "// Montando uma transação de débito de 10 centavos:\nTransactionEntry transaction = new TransactionEntry(TransactionType.Debit, 0.1m);\n\n// Boa prática: sempre utilize o ITK!\ntransaction.InitiatorTransactionKey = \"algum identificador\";\n\nIAuthorizationReport report = null;\n\ntry\n{\n // Envia a transação para o autorizador da Stone:\n report = authorizer.Authorize(transaction);\n}\ncatch (ExpiredCardException)\n{\n // Um cartão expirado foi passado/inserido \n}\ncatch (CardHasChipException)\n{\n // Um cartão que tem chip foi passado como tarja \n}\n\nCancellationRequest cancelRequest = CancellationRequest.CreateCancellationRequest(\"SAK_DE_EXEMPLO\",\n report.RawResponse);\nauthorizer.AuthorizationProvider.SendRequest(cancelRequest);", "language": "csharp" } ] } [/block] **Para cancelar uma transação através de um ID da transação, considere o seguinte trecho de código:** [block:code] { "codes": [ { "code": "// Cria um tipo de parcelamento: crédito em 4 vezes sem juros:\nInstallment installment = new Installment() { Type = InstallmentType.Merchant, Number = 4 }\n\n// Monta a transação\nTransactionEntry transactionToCancel = new TransactionEntry(TransactionType.Credit, 120m, installment,\n \"ITK_DE_EXEMPLO\");\n\nIAuthorizationReport authorizationReport = null;\n\ntry\n{\n // Autoriza\n authorizationReport = authorizer.Authorize(transactionToCancel);\n}\ncatch (ExpiredCardException)\n{\n // Um cartão expirado foi passado/inserido \n}\ncatch (CardHasChipException)\n{\n // Um cartão que tem chip foi passado como tarja \n}", "language": "csharp" } ] } [/block] * Para cancelar uma transação através do ITK: [block:code] { "codes": [ { "code": "// Monta a requisição de cancelamento:\nCancellationRequest cancelRequest = CancellationRequest.\n CreateCancellationRequestByInitiatorTransactionKey(\"SAK_DE_EXEMPLO\",\n authorizationReport.InitiatorTransactionKey, authorizationReport.Amount, true);\n\n// Envia a requirição de cancelamento:\nauthorizer.AuthorizationProvider.SendRequest(cancelRequest);", "language": "csharp" } ] } [/block] * Para cancelar uma transação através do ATK: [block:code] { "codes": [ { "code": "// Monta a requisição de cancelamento:\nCancellationRequest cancelRequest = CancellationRequest.\n CreateCancellationRequestByAcquirerTransactionKey(\"SAK_DE_EXEMPLO\",\n authorizationReport.AcquirerTransactionKey, authorizationReport.Amount, true);\n\n// Envia a requisição de cancelamento:\nauthorizer.AuthorizationProvider.SendRequest(cancelRequest);", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Boa prática: desconecte o pinpad" } [/block] [block:code] { "codes": [ { "code": "Task.Run(() =>\n{\n // Cancela o ultimo comando do pinpad:\n this.authorizer.PinpadFacade.Communication.CancelRequest();\n\n // Desconecta:\n this.authorizer.PinpadFacade.Communication.ClosePinpadConnection(this.authorizer.\n PinpadMessages.MainLabel);\n});", "language": "csharp" } ] } [/block]
* Para cancelar uma transação através do IAuthorizationResponse: [block:code] { "codes": [ { "code": "// Montando uma transação de débito de 10 centavos:\nTransactionEntry transaction = new TransactionEntry(TransactionType.Debit, 0.1m);\n\n// Boa prática: sempre utilize o ITK!\ntransaction.InitiatorTransactionKey = \"algum identificador\";\n\nIAuthorizationReport report = null;\n\ntry\n{\n // Envia a transação para o autorizador da Stone:\n report = authorizer.Authorize(transaction);\n}\ncatch (ExpiredCardException)\n{\n // Um cartão expirado foi passado/inserido \n}\ncatch (CardHasChipException)\n{\n // Um cartão que tem chip foi passado como tarja \n}\n\nCancellationRequest cancelRequest = CancellationRequest.CreateCancellationRequest(\"SAK_DE_EXEMPLO\",\n report.RawResponse);\nauthorizer.AuthorizationProvider.SendRequest(cancelRequest);", "language": "csharp" } ] } [/block] **Para cancelar uma transação através de um ID da transação, considere o seguinte trecho de código:** [block:code] { "codes": [ { "code": "// Cria um tipo de parcelamento: crédito em 4 vezes sem juros:\nInstallment installment = new Installment() { Type = InstallmentType.Merchant, Number = 4 }\n\n// Monta a transação\nTransactionEntry transactionToCancel = new TransactionEntry(TransactionType.Credit, 120m, installment,\n \"ITK_DE_EXEMPLO\");\n\nIAuthorizationReport authorizationReport = null;\n\ntry\n{\n // Autoriza\n authorizationReport = authorizer.Authorize(transactionToCancel);\n}\ncatch (ExpiredCardException)\n{\n // Um cartão expirado foi passado/inserido \n}\ncatch (CardHasChipException)\n{\n // Um cartão que tem chip foi passado como tarja \n}", "language": "csharp" } ] } [/block] * Para cancelar uma transação através do ITK: [block:code] { "codes": [ { "code": "// Monta a requisição de cancelamento:\nCancellationRequest cancelRequest = CancellationRequest.\n CreateCancellationRequestByInitiatorTransactionKey(\"SAK_DE_EXEMPLO\",\n authorizationReport.InitiatorTransactionKey, authorizationReport.Amount, true);\n\n// Envia a requirição de cancelamento:\nauthorizer.AuthorizationProvider.SendRequest(cancelRequest);", "language": "csharp" } ] } [/block] * Para cancelar uma transação através do ATK: [block:code] { "codes": [ { "code": "// Monta a requisição de cancelamento:\nCancellationRequest cancelRequest = CancellationRequest.\n CreateCancellationRequestByAcquirerTransactionKey(\"SAK_DE_EXEMPLO\",\n authorizationReport.AcquirerTransactionKey, authorizationReport.Amount, true);\n\n// Envia a requisição de cancelamento:\nauthorizer.AuthorizationProvider.SendRequest(cancelRequest);", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Boa prática: desconecte o pinpad" } [/block] [block:code] { "codes": [ { "code": "Task.Run(() =>\n{\n // Cancela o ultimo comando do pinpad:\n this.authorizer.PinpadFacade.Communication.CancelRequest();\n\n // Desconecta:\n this.authorizer.PinpadFacade.Communication.ClosePinpadConnection(this.authorizer.\n PinpadMessages.MainLabel);\n});", "language": "csharp" } ] } [/block]
{"__v":0,"_id":"5848387964fdea370080a3b2","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Esta SDK implementa emissão de comprovante (vulgo: notinha) de operações como: Transação, Cancelamento de Transação e Ativação de Terminal.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Utilizando esta funcionalidade\"\n}\n[/block]\n* Para um e-mail de ativação:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"IReceiptService service = ReceiptFactory.Build(ReceiptType.Activation, \\\"garrick.ollivander@ollivanders.com.uk\\\");\\n\\nActivationBodyParameters parameters = new ActivationBodyParameters\\n{\\n    CompanyName = \\\"Ollivanders\\\",\\n    CompanyAddress = \\\"Diagon Alley\\\",\\n    CompanyLegalIdentification = \\\"000.000.000-00\\\",\\n    CompanyStoneCode = \\\"000 000 000\\\"\\n};\\n\\nservice.AddBodyParameters(parameters);\\nservice.Send();\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n* Para um e-mail de transação:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"IReceiptService service = ReceiptFactory.Build(ReceiptType.Transaction, \\\"garrick.ollivander@ollivanders.com.uk\\\");\\n\\nFinancialOperationParameters parameters = new FinancialOperationParameters\\n{\\n    CardBrand = \\\"MASTER - DEBITO\\\",\\n    ClientMaskedCardNumber = \\\"1234 **** **** 7890\\\",\\n    ClientName = \\\"Garrick Ollivander\\\",\\n    CompanyName = \\\"Ollivanders\\\",\\n    CompanyAddress = \\\"Diagon Alley\\\",\\n    CompanyTaxDocumentNumber = \\\"123098\\\",\\n    DisplayAidArqc = true,\\n    DisplayCompanyInformation = true,\\n    TransactionAid = \\\"123456\\\",\\n    TransactionAmount = 0.02m,\\n    TransactionArqc = \\\"1234567890\\\",\\n    TransactionDateTime = DateTime.Now,\\n    TransactionStoneId = \\\"12345678\\\"\\n};\\n\\nservice.AddBodyParameters(parameters);\\nservice.Send();\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n* Para um e-mail de cancelamento de transação:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"IReceiptService service = ReceiptFactory.Build(ReceiptType.Cancellation, \\\"garrick.ollivander@ollivanders.com.uk\\\");\\n\\nFinancialOperationParameters parameters = new FinancialOperationParameters\\n{\\n    CardBrand = \\\"MASTER - DEBITO\\\",\\n    ClientMaskedCardNumber = \\\"1234 **** **** 7890\\\",\\n    ClientName = \\\"Garrick Ollivander\\\",\\n    CompanyName = \\\"Ollivanders\\\",\\n    CompanyAddress = \\\"Diagon Alley\\\",\\n    CompanyTaxDocumentNumber = \\\"123098\\\",\\n    DisplayAidArqc = true,\\n    DisplayCompanyInformation = true,\\n    TransactionAid = \\\"123456\\\",\\n    TransactionAmount = 0.02m,\\n    TransactionArqc = \\\"1234567890\\\",\\n    TransactionDateTime = DateTime.Now,\\n    TransactionStoneId = \\\"12345678\\\"\\n};\\n\\nservice.AddBodyParameters(parameters);\\nservice.Send();\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]","category":"58482dd8501f422300a9449c","createdAt":"2016-12-07T16:27:37.231Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":4,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"envio-de-comprovantes","sync_unique":"","title":"Envio de Comprovantes","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Envio de Comprovantes


Esta SDK implementa emissão de comprovante (vulgo: notinha) de operações como: Transação, Cancelamento de Transação e Ativação de Terminal. [block:api-header] { "type": "basic", "title": "Utilizando esta funcionalidade" } [/block] * Para um e-mail de ativação: [block:code] { "codes": [ { "code": "IReceiptService service = ReceiptFactory.Build(ReceiptType.Activation, \"garrick.ollivander@ollivanders.com.uk\");\n\nActivationBodyParameters parameters = new ActivationBodyParameters\n{\n CompanyName = \"Ollivanders\",\n CompanyAddress = \"Diagon Alley\",\n CompanyLegalIdentification = \"000.000.000-00\",\n CompanyStoneCode = \"000 000 000\"\n};\n\nservice.AddBodyParameters(parameters);\nservice.Send();", "language": "csharp" } ] } [/block] * Para um e-mail de transação: [block:code] { "codes": [ { "code": "IReceiptService service = ReceiptFactory.Build(ReceiptType.Transaction, \"garrick.ollivander@ollivanders.com.uk\");\n\nFinancialOperationParameters parameters = new FinancialOperationParameters\n{\n CardBrand = \"MASTER - DEBITO\",\n ClientMaskedCardNumber = \"1234 **** **** 7890\",\n ClientName = \"Garrick Ollivander\",\n CompanyName = \"Ollivanders\",\n CompanyAddress = \"Diagon Alley\",\n CompanyTaxDocumentNumber = \"123098\",\n DisplayAidArqc = true,\n DisplayCompanyInformation = true,\n TransactionAid = \"123456\",\n TransactionAmount = 0.02m,\n TransactionArqc = \"1234567890\",\n TransactionDateTime = DateTime.Now,\n TransactionStoneId = \"12345678\"\n};\n\nservice.AddBodyParameters(parameters);\nservice.Send();", "language": "csharp" } ] } [/block] * Para um e-mail de cancelamento de transação: [block:code] { "codes": [ { "code": "IReceiptService service = ReceiptFactory.Build(ReceiptType.Cancellation, \"garrick.ollivander@ollivanders.com.uk\");\n\nFinancialOperationParameters parameters = new FinancialOperationParameters\n{\n CardBrand = \"MASTER - DEBITO\",\n ClientMaskedCardNumber = \"1234 **** **** 7890\",\n ClientName = \"Garrick Ollivander\",\n CompanyName = \"Ollivanders\",\n CompanyAddress = \"Diagon Alley\",\n CompanyTaxDocumentNumber = \"123098\",\n DisplayAidArqc = true,\n DisplayCompanyInformation = true,\n TransactionAid = \"123456\",\n TransactionAmount = 0.02m,\n TransactionArqc = \"1234567890\",\n TransactionDateTime = DateTime.Now,\n TransactionStoneId = \"12345678\"\n};\n\nservice.AddBodyParameters(parameters);\nservice.Send();", "language": "csharp" } ] } [/block]
Esta SDK implementa emissão de comprovante (vulgo: notinha) de operações como: Transação, Cancelamento de Transação e Ativação de Terminal. [block:api-header] { "type": "basic", "title": "Utilizando esta funcionalidade" } [/block] * Para um e-mail de ativação: [block:code] { "codes": [ { "code": "IReceiptService service = ReceiptFactory.Build(ReceiptType.Activation, \"garrick.ollivander@ollivanders.com.uk\");\n\nActivationBodyParameters parameters = new ActivationBodyParameters\n{\n CompanyName = \"Ollivanders\",\n CompanyAddress = \"Diagon Alley\",\n CompanyLegalIdentification = \"000.000.000-00\",\n CompanyStoneCode = \"000 000 000\"\n};\n\nservice.AddBodyParameters(parameters);\nservice.Send();", "language": "csharp" } ] } [/block] * Para um e-mail de transação: [block:code] { "codes": [ { "code": "IReceiptService service = ReceiptFactory.Build(ReceiptType.Transaction, \"garrick.ollivander@ollivanders.com.uk\");\n\nFinancialOperationParameters parameters = new FinancialOperationParameters\n{\n CardBrand = \"MASTER - DEBITO\",\n ClientMaskedCardNumber = \"1234 **** **** 7890\",\n ClientName = \"Garrick Ollivander\",\n CompanyName = \"Ollivanders\",\n CompanyAddress = \"Diagon Alley\",\n CompanyTaxDocumentNumber = \"123098\",\n DisplayAidArqc = true,\n DisplayCompanyInformation = true,\n TransactionAid = \"123456\",\n TransactionAmount = 0.02m,\n TransactionArqc = \"1234567890\",\n TransactionDateTime = DateTime.Now,\n TransactionStoneId = \"12345678\"\n};\n\nservice.AddBodyParameters(parameters);\nservice.Send();", "language": "csharp" } ] } [/block] * Para um e-mail de cancelamento de transação: [block:code] { "codes": [ { "code": "IReceiptService service = ReceiptFactory.Build(ReceiptType.Cancellation, \"garrick.ollivander@ollivanders.com.uk\");\n\nFinancialOperationParameters parameters = new FinancialOperationParameters\n{\n CardBrand = \"MASTER - DEBITO\",\n ClientMaskedCardNumber = \"1234 **** **** 7890\",\n ClientName = \"Garrick Ollivander\",\n CompanyName = \"Ollivanders\",\n CompanyAddress = \"Diagon Alley\",\n CompanyTaxDocumentNumber = \"123098\",\n DisplayAidArqc = true,\n DisplayCompanyInformation = true,\n TransactionAid = \"123456\",\n TransactionAmount = 0.02m,\n TransactionArqc = \"1234567890\",\n TransactionDateTime = DateTime.Now,\n TransactionStoneId = \"12345678\"\n};\n\nservice.AddBodyParameters(parameters);\nservice.Send();", "language": "csharp" } ] } [/block]
{"__v":0,"_id":"584838ae4352c62d0040f3c1","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Entre em contato: [integracoes@stone.com.br](mailto:integracoes@stone.com.br)\n:octopus:","category":"58482dd8501f422300a9449c","createdAt":"2016-12-07T16:28:30.771Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":5,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"dúvidas","sync_unique":"","title":"Dúvidas","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Dúvidas


Entre em contato: [integracoes@stone.com.br](mailto:integracoes@stone.com.br) :octopus:
Entre em contato: [integracoes@stone.com.br](mailto:integracoes@stone.com.br) :octopus:
{"__v":0,"_id":"584054a2e3e04b230055c6b6","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"Este produto permite ao cliente integrar diretamente com a Stone em suas automações e integrações, fazendo uso de um ou mais pinpads, com ou sem fio. Isto possibilita transacionar operações de crédito e débito nos cartões VISA™ e MASTERCARD™.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/de79976-fluxo.png\",\n        \"fluxo.png\",\n        565,\n        222,\n        \"#cfa499\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Para pinpads sem fio, o raio de alcance do adaptador bluetooth deve ser considerado.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"O que é ?\"\n}\n[/block]\nEsse produto foi criado com o objetivo de manter compatibilidade com linguagens que não são executadas pelo CLR (Common Language Runtime), tais quais Python, Delphi, Java e outras.\n\nO **MicroTef App** é uma Windows Application com um WCF self-host. Isto permite que integradores possam estabelecer comunicação entre suas aplicações e o seviço via **HTTP** e **SOAP**.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/37fd665-comunicacao.png\",\n        \"comunicacao.png\",\n        398,\n        223,\n        \"#dad6c9\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"As linguagens de programação nas quais as aplicações clientes são implementadas, devem ser, minimamente, aptas a criar e utilizar um web service client. A maioria das linguagens modernas são capazes de implementar este tipo de comportamento.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Sistemas Operacionais\"\n}\n[/block]\nEste produto somente é compatível com as seguintes versões do Windows:\n\n* Windows Vista\n\n* Windows 7\n\n* Windows 8\n\n* Windows 8.1\n\n* Windows 10\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Instalando o MicroTef App\"\n}\n[/block]\nVocê vai precisar de:\n\n* 1x Instalador do MicroTef App\n\n* 1x Computador com o SO suportado\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Passo 1: Configurando a pasta de instalação\"\n}\n[/block]\nPara iniciar a instalação você deve definir a pasta de instalação, sugerimos a pasta ``C:\\Program Files (x86)\\Stone Payments``, mas o MicroTef App pode ser instalado na pasta que desejar.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/60d2083-passo1.PNG\",\n        \"passo1.PNG\",\n        529,\n        356,\n        \"#262e22\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Passo 2: Configurando as opções avançadas\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/97bc278-passo2.PNG\",\n        \"passo2.PNG\",\n        640,\n        356,\n        \"#262e22\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0a31d14-carregando.PNG\",\n        \"carregando.PNG\",\n        528,\n        356,\n        \"#272c23\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nAtravés do link **\"opções avançadas\"** você poderá realizar as seguintes configurações:\n\n\n* **Produção:** Você pode escolher se o serviço vai estar se comunicandoo com o servidor produção ou desenvolvimento. No ambiente de desenvolvimento você poderá realizar os testes de integração com a Stone.\n\n* **Porta:** O serviço pode ser configurado para responder na porta que você acha melhor.\n\n* **Protocolo:** A integração pode ser realizada por dois tipos de protocolo, Rest ou Soap. Então, você pode escolher qual a opção mais adequada para sua solução.\n\n* **Atualização automática:** O MicroTef App pode ser atualizado automaticamente ou não, se a opção estiver selecionada, a atualização vai obedecer o horário que está configurado na opção Agendamento. Então, diariamente o serviço vai verificar se existe alguma atualização para o sistema MicroTef App.\n\n* **Agendamento:** Diariamente o Microtef App verifica se existe novos pacotes de atualização no horário configurado no campo agendamento. Então, é muito importante configurar um horário que de atualização que não impacte a sua operação.\n\nApós realizar os passos ateriores aguarde a finalização da instação.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4eec659-carregando.PNG\",\n        \"carregando.PNG\",\n        528,\n        356,\n        \"#272c23\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/fb80015-sucesso.PNG\",\n        \"sucesso.PNG\",\n        529,\n        354,\n        \"#262d22\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Passo 3: Iniciar o MicroTef App\"\n}\n[/block]\nNesse passo é importante que a porta e o protocolo estajam configurados, caso você não tenha configurado nas opções avançadas no momento da instalação, **abra o command prompt com permissão de administrador** e execute o seguinte comando:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"microtef start  --port <<--porta-->> --protocol <<--protocol-->> --decorate enable\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nAs configurações do MicroTef App podem ser gerenciadas por command prompt. Abaixo listo todos os comandos para o gerenciamento do MicroTef App:\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Não esqueca de executar o command prompt com permissão de administrador.\"\n}\n[/block]\n* **protocol:** Configura o protocolo de comunicação.\n\nExemplo:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"microtef --protocol soap ou microtef --protocol rest\\n\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n* **port:** Configura a porta de funcionamento do servico.\n\nExemplo:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"microtef --port 8583\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n* **is-automatic-update:** Comando para configurar a atualização automática.\n\nExemplo:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"microtef --is-automatic-update enable\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n* **time:** Configura o horario de atualização do Micro Tef Service App.\n\nExemplo:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"microtef --time 13:00\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n* **decorate :** Inicia a aplicacao com icone no system tray.\n\nExemplo:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"microtef --decorate true\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n* **stop :** Para a execução do serviço Micro Tef Service App.\n\nExemplo:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"microtef stop\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n* **start :** Inicia a execução do serviço Micro Tef Service App.\n\nExemplo:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"microtef start\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Para consultar o help no command prompt execute o comando:\\n\\n``microtef ?``\\n\\nCaso a porta e o protocolo já tiver sido configurada abra o command prompt com permissão de administrador e executar o seguinte comando:\\n\\n``microtef start``\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Deveria integrar?\"\n}\n[/block]\nOra... o Microtef App está presente em diferentes campos comerciais, na automação de restaurantes, em vending machines, em postos de gasolina, em terminais de auto-atendimento, entre muitos outros. Talvez a carta de soluções para integração que oferecemos possa ser útil para seu negócio. Para saber mais a respeito, entre em contato conosco: [meajuda@stone.com.br.](mailto: meajuda@stone.com.br)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Como posso integrar?\"\n}\n[/block]\nEntre em contato com a gente agora mesmo: [meajuda@stone.com.br.](mailto: meajuda@stone.com.br)\n\nPara outras integrações, consulte este [link](www.stone.com.br/desenvolvedores.html) no site da Stone.","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T16:49:38.575Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":0,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"getting-started","sync_unique":"","title":"Introdução","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Introdução


Este produto permite ao cliente integrar diretamente com a Stone em suas automações e integrações, fazendo uso de um ou mais pinpads, com ou sem fio. Isto possibilita transacionar operações de crédito e débito nos cartões VISA™ e MASTERCARD™. [block:image] { "images": [ { "image": [ "https://files.readme.io/de79976-fluxo.png", "fluxo.png", 565, 222, "#cfa499" ], "sizing": "full" } ] } [/block] [block:callout] { "type": "warning", "body": "Para pinpads sem fio, o raio de alcance do adaptador bluetooth deve ser considerado." } [/block] [block:api-header] { "type": "basic", "title": "O que é ?" } [/block] Esse produto foi criado com o objetivo de manter compatibilidade com linguagens que não são executadas pelo CLR (Common Language Runtime), tais quais Python, Delphi, Java e outras. O **MicroTef App** é uma Windows Application com um WCF self-host. Isto permite que integradores possam estabelecer comunicação entre suas aplicações e o seviço via **HTTP** e **SOAP**. [block:image] { "images": [ { "image": [ "https://files.readme.io/37fd665-comunicacao.png", "comunicacao.png", 398, 223, "#dad6c9" ], "sizing": "full" } ] } [/block] [block:callout] { "type": "warning", "body": "As linguagens de programação nas quais as aplicações clientes são implementadas, devem ser, minimamente, aptas a criar e utilizar um web service client. A maioria das linguagens modernas são capazes de implementar este tipo de comportamento." } [/block] [block:api-header] { "type": "basic", "title": "Sistemas Operacionais" } [/block] Este produto somente é compatível com as seguintes versões do Windows: * Windows Vista * Windows 7 * Windows 8 * Windows 8.1 * Windows 10 [block:api-header] { "type": "basic", "title": "Instalando o MicroTef App" } [/block] Você vai precisar de: * 1x Instalador do MicroTef App * 1x Computador com o SO suportado [block:api-header] { "type": "basic", "title": "Passo 1: Configurando a pasta de instalação" } [/block] Para iniciar a instalação você deve definir a pasta de instalação, sugerimos a pasta ``C:\Program Files (x86)\Stone Payments``, mas o MicroTef App pode ser instalado na pasta que desejar. [block:image] { "images": [ { "image": [ "https://files.readme.io/60d2083-passo1.PNG", "passo1.PNG", 529, 356, "#262e22" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Passo 2: Configurando as opções avançadas" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/97bc278-passo2.PNG", "passo2.PNG", 640, 356, "#262e22" ], "sizing": "full" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/0a31d14-carregando.PNG", "carregando.PNG", 528, 356, "#272c23" ], "sizing": "full" } ] } [/block] Através do link **"opções avançadas"** você poderá realizar as seguintes configurações: * **Produção:** Você pode escolher se o serviço vai estar se comunicandoo com o servidor produção ou desenvolvimento. No ambiente de desenvolvimento você poderá realizar os testes de integração com a Stone. * **Porta:** O serviço pode ser configurado para responder na porta que você acha melhor. * **Protocolo:** A integração pode ser realizada por dois tipos de protocolo, Rest ou Soap. Então, você pode escolher qual a opção mais adequada para sua solução. * **Atualização automática:** O MicroTef App pode ser atualizado automaticamente ou não, se a opção estiver selecionada, a atualização vai obedecer o horário que está configurado na opção Agendamento. Então, diariamente o serviço vai verificar se existe alguma atualização para o sistema MicroTef App. * **Agendamento:** Diariamente o Microtef App verifica se existe novos pacotes de atualização no horário configurado no campo agendamento. Então, é muito importante configurar um horário que de atualização que não impacte a sua operação. Após realizar os passos ateriores aguarde a finalização da instação. [block:image] { "images": [ { "image": [ "https://files.readme.io/4eec659-carregando.PNG", "carregando.PNG", 528, 356, "#272c23" ], "sizing": "full" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/fb80015-sucesso.PNG", "sucesso.PNG", 529, 354, "#262d22" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Passo 3: Iniciar o MicroTef App" } [/block] Nesse passo é importante que a porta e o protocolo estajam configurados, caso você não tenha configurado nas opções avançadas no momento da instalação, **abra o command prompt com permissão de administrador** e execute o seguinte comando: [block:code] { "codes": [ { "code": "microtef start --port <<--porta-->> --protocol <<--protocol-->> --decorate enable", "language": "shell" } ] } [/block] As configurações do MicroTef App podem ser gerenciadas por command prompt. Abaixo listo todos os comandos para o gerenciamento do MicroTef App: [block:callout] { "type": "warning", "body": "Não esqueca de executar o command prompt com permissão de administrador." } [/block] * **protocol:** Configura o protocolo de comunicação. Exemplo: [block:code] { "codes": [ { "code": "microtef --protocol soap ou microtef --protocol rest\n", "language": "shell" } ] } [/block] * **port:** Configura a porta de funcionamento do servico. Exemplo: [block:code] { "codes": [ { "code": "microtef --port 8583", "language": "shell" } ] } [/block] * **is-automatic-update:** Comando para configurar a atualização automática. Exemplo: [block:code] { "codes": [ { "code": "microtef --is-automatic-update enable", "language": "shell" } ] } [/block] * **time:** Configura o horario de atualização do Micro Tef Service App. Exemplo: [block:code] { "codes": [ { "code": "microtef --time 13:00", "language": "shell" } ] } [/block] * **decorate :** Inicia a aplicacao com icone no system tray. Exemplo: [block:code] { "codes": [ { "code": "microtef --decorate true", "language": "shell" } ] } [/block] * **stop :** Para a execução do serviço Micro Tef Service App. Exemplo: [block:code] { "codes": [ { "code": "microtef stop", "language": "shell" } ] } [/block] * **start :** Inicia a execução do serviço Micro Tef Service App. Exemplo: [block:code] { "codes": [ { "code": "microtef start", "language": "shell" } ] } [/block] [block:callout] { "type": "warning", "body": "Para consultar o help no command prompt execute o comando:\n\n``microtef ?``\n\nCaso a porta e o protocolo já tiver sido configurada abra o command prompt com permissão de administrador e executar o seguinte comando:\n\n``microtef start``" } [/block] [block:api-header] { "type": "basic", "title": "Deveria integrar?" } [/block] Ora... o Microtef App está presente em diferentes campos comerciais, na automação de restaurantes, em vending machines, em postos de gasolina, em terminais de auto-atendimento, entre muitos outros. Talvez a carta de soluções para integração que oferecemos possa ser útil para seu negócio. Para saber mais a respeito, entre em contato conosco: [meajuda@stone.com.br.](mailto: meajuda@stone.com.br) [block:api-header] { "type": "basic", "title": "Como posso integrar?" } [/block] Entre em contato com a gente agora mesmo: [meajuda@stone.com.br.](mailto: meajuda@stone.com.br) Para outras integrações, consulte este [link](www.stone.com.br/desenvolvedores.html) no site da Stone.
Este produto permite ao cliente integrar diretamente com a Stone em suas automações e integrações, fazendo uso de um ou mais pinpads, com ou sem fio. Isto possibilita transacionar operações de crédito e débito nos cartões VISA™ e MASTERCARD™. [block:image] { "images": [ { "image": [ "https://files.readme.io/de79976-fluxo.png", "fluxo.png", 565, 222, "#cfa499" ], "sizing": "full" } ] } [/block] [block:callout] { "type": "warning", "body": "Para pinpads sem fio, o raio de alcance do adaptador bluetooth deve ser considerado." } [/block] [block:api-header] { "type": "basic", "title": "O que é ?" } [/block] Esse produto foi criado com o objetivo de manter compatibilidade com linguagens que não são executadas pelo CLR (Common Language Runtime), tais quais Python, Delphi, Java e outras. O **MicroTef App** é uma Windows Application com um WCF self-host. Isto permite que integradores possam estabelecer comunicação entre suas aplicações e o seviço via **HTTP** e **SOAP**. [block:image] { "images": [ { "image": [ "https://files.readme.io/37fd665-comunicacao.png", "comunicacao.png", 398, 223, "#dad6c9" ], "sizing": "full" } ] } [/block] [block:callout] { "type": "warning", "body": "As linguagens de programação nas quais as aplicações clientes são implementadas, devem ser, minimamente, aptas a criar e utilizar um web service client. A maioria das linguagens modernas são capazes de implementar este tipo de comportamento." } [/block] [block:api-header] { "type": "basic", "title": "Sistemas Operacionais" } [/block] Este produto somente é compatível com as seguintes versões do Windows: * Windows Vista * Windows 7 * Windows 8 * Windows 8.1 * Windows 10 [block:api-header] { "type": "basic", "title": "Instalando o MicroTef App" } [/block] Você vai precisar de: * 1x Instalador do MicroTef App * 1x Computador com o SO suportado [block:api-header] { "type": "basic", "title": "Passo 1: Configurando a pasta de instalação" } [/block] Para iniciar a instalação você deve definir a pasta de instalação, sugerimos a pasta ``C:\Program Files (x86)\Stone Payments``, mas o MicroTef App pode ser instalado na pasta que desejar. [block:image] { "images": [ { "image": [ "https://files.readme.io/60d2083-passo1.PNG", "passo1.PNG", 529, 356, "#262e22" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Passo 2: Configurando as opções avançadas" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/97bc278-passo2.PNG", "passo2.PNG", 640, 356, "#262e22" ], "sizing": "full" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/0a31d14-carregando.PNG", "carregando.PNG", 528, 356, "#272c23" ], "sizing": "full" } ] } [/block] Através do link **"opções avançadas"** você poderá realizar as seguintes configurações: * **Produção:** Você pode escolher se o serviço vai estar se comunicandoo com o servidor produção ou desenvolvimento. No ambiente de desenvolvimento você poderá realizar os testes de integração com a Stone. * **Porta:** O serviço pode ser configurado para responder na porta que você acha melhor. * **Protocolo:** A integração pode ser realizada por dois tipos de protocolo, Rest ou Soap. Então, você pode escolher qual a opção mais adequada para sua solução. * **Atualização automática:** O MicroTef App pode ser atualizado automaticamente ou não, se a opção estiver selecionada, a atualização vai obedecer o horário que está configurado na opção Agendamento. Então, diariamente o serviço vai verificar se existe alguma atualização para o sistema MicroTef App. * **Agendamento:** Diariamente o Microtef App verifica se existe novos pacotes de atualização no horário configurado no campo agendamento. Então, é muito importante configurar um horário que de atualização que não impacte a sua operação. Após realizar os passos ateriores aguarde a finalização da instação. [block:image] { "images": [ { "image": [ "https://files.readme.io/4eec659-carregando.PNG", "carregando.PNG", 528, 356, "#272c23" ], "sizing": "full" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/fb80015-sucesso.PNG", "sucesso.PNG", 529, 354, "#262d22" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Passo 3: Iniciar o MicroTef App" } [/block] Nesse passo é importante que a porta e o protocolo estajam configurados, caso você não tenha configurado nas opções avançadas no momento da instalação, **abra o command prompt com permissão de administrador** e execute o seguinte comando: [block:code] { "codes": [ { "code": "microtef start --port <<--porta-->> --protocol <<--protocol-->> --decorate enable", "language": "shell" } ] } [/block] As configurações do MicroTef App podem ser gerenciadas por command prompt. Abaixo listo todos os comandos para o gerenciamento do MicroTef App: [block:callout] { "type": "warning", "body": "Não esqueca de executar o command prompt com permissão de administrador." } [/block] * **protocol:** Configura o protocolo de comunicação. Exemplo: [block:code] { "codes": [ { "code": "microtef --protocol soap ou microtef --protocol rest\n", "language": "shell" } ] } [/block] * **port:** Configura a porta de funcionamento do servico. Exemplo: [block:code] { "codes": [ { "code": "microtef --port 8583", "language": "shell" } ] } [/block] * **is-automatic-update:** Comando para configurar a atualização automática. Exemplo: [block:code] { "codes": [ { "code": "microtef --is-automatic-update enable", "language": "shell" } ] } [/block] * **time:** Configura o horario de atualização do Micro Tef Service App. Exemplo: [block:code] { "codes": [ { "code": "microtef --time 13:00", "language": "shell" } ] } [/block] * **decorate :** Inicia a aplicacao com icone no system tray. Exemplo: [block:code] { "codes": [ { "code": "microtef --decorate true", "language": "shell" } ] } [/block] * **stop :** Para a execução do serviço Micro Tef Service App. Exemplo: [block:code] { "codes": [ { "code": "microtef stop", "language": "shell" } ] } [/block] * **start :** Inicia a execução do serviço Micro Tef Service App. Exemplo: [block:code] { "codes": [ { "code": "microtef start", "language": "shell" } ] } [/block] [block:callout] { "type": "warning", "body": "Para consultar o help no command prompt execute o comando:\n\n``microtef ?``\n\nCaso a porta e o protocolo já tiver sido configurada abra o command prompt com permissão de administrador e executar o seguinte comando:\n\n``microtef start``" } [/block] [block:api-header] { "type": "basic", "title": "Deveria integrar?" } [/block] Ora... o Microtef App está presente em diferentes campos comerciais, na automação de restaurantes, em vending machines, em postos de gasolina, em terminais de auto-atendimento, entre muitos outros. Talvez a carta de soluções para integração que oferecemos possa ser útil para seu negócio. Para saber mais a respeito, entre em contato conosco: [meajuda@stone.com.br.](mailto: meajuda@stone.com.br) [block:api-header] { "type": "basic", "title": "Como posso integrar?" } [/block] Entre em contato com a gente agora mesmo: [meajuda@stone.com.br.](mailto: meajuda@stone.com.br) Para outras integrações, consulte este [link](www.stone.com.br/desenvolvedores.html) no site da Stone.
{"__v":0,"_id":"58405d1ec05073190006352e","api":{"settings":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"body":"É um processo bem simples trabalhar com web service . Abaixo um resumo:\n\n1. Criar um web service client\n\n2. Montar um request\n\n3. Enviar o request para uma operation\n\n4. Interpretar a response da operation\n\nEste bê-a-bá é utilizado como padrão para todas as operations disponibilizadas pelo **MicroTef App.**\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2bd8db0-request_response.png\",\n        \"request_response.png\",\n        527,\n        174,\n        \"#2e2c33\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nAlguns campos são comuns e presentes em todas as **requests**, tais como:\n\n* **Language:** através da qual o integrador pode configurar o idioma no qual o service definirá as mensagens de erro. Por default estamos devolvendo as mensagens em inglês, mas se quiser em português, defina este valor como pt-BR.\n\n* **RequestKey:** este é um campo para associar cada um dos request com um response. Este valor pode ser definido pelo integrador, mas se for deixado em branco, o próprio service definirá um Guid pra ele.\n\nAlguns campos também são comuns e presentes em todas as **responses**, tais como:\n\n* **RequestKey:** como vimos, é o valor atribuído pelo integrador ou pelo Guid gerado pelo service.\n\n* **Failure:** dá um feedback se ocorreu tudo bem ou não no processamento da operation.\n\n* **OperationErrors:** possui uma lista de ErrorReport existente caso o retorno de Failure seja True.\n\n* **StatusCode:** código de resposta HTTP do processamento da operation.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Criando um Web Service Client\"\n}\n[/block]\nNas IDEs modernas, comumente, existem recursos que simplificam o processo de criação de um Web Service Client bem como toda a complexidade da comunicação. Apesar do processo manual ser certamente possível (utilizando ferramentas como o [SoapUi](https://www.soapui.org)), não há motivo para tanta dor e sofrimento.\n\nA documentação abaixo trata de criar junto com o integrador um web service client para que ele possa seguir acompanhando os capítulos adiante.\n\nEste tutorial está disponivel para as seguintes linguagens de programação:\n\n* [Java](http://microtefdocs.stone.com.br/docs/hello-world-em-java-1)\n\n* Delphi ( Em breve ...)","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:25:50.558Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":1,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"introdução","sync_unique":"","title":"Tutorial básico","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[{"__v":0,"_id":"58405d3ec05073190006352f","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Não necessáriamente as configurações abaixo devam ser obrigatórias, estão incluídas aqui apenas para o integrador saber em que tipo de ambiente o serviço foi testado:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Informação\",\n    \"h-1\": \"Configuração\",\n    \"0-0\": \"Sistema Operacional\",\n    \"0-1\": \"Windows 10 Enterprise 64-bits\",\n    \"1-0\": \"Java SE Runtime Environment\",\n    \"1-1\": \"1.8.0_91\",\n    \"2-0\": \"Java SE Development Kit\",\n    \"2-1\": \"1.8.0_92\",\n    \"3-0\": \"IDE\",\n    \"3-1\": \"Eclipse Mars.1 Release (4.5.1)\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nUma vez criado o projeto, no Eclipse siga o seguinte fluxo:\n\n1. Botão direito no projeto e New e Other. Ou somente Ctrl+N.\n\n2. Buscar por Web Service Client, dentro da pasta Web Services e clicar em Next.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/12a20aa-java_webserverclient.png\",\n        \"java_webserverclient.png\",\n        519,\n        502,\n        \"#eeefee\"\n      ]\n    }\n  ]\n}\n[/block]\n3.  Na tela que segue, informar o WSDL em Service definition, no nosso caso [http://localhost:8583/micropos?singleWsdl](http://localhost:8583/micropos?singleWsdl). (leia o aviso aqui embaixo)\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2533fe0-java_webserverclient2.png\",\n        \"java_webserverclient2.png\",\n        548,\n        533,\n        \"#f0f0f0\"\n      ]\n    }\n  ]\n}\n[/block]\n4. Feito isso muito código será gerado, contendo os contracts de requests e responses e o proxies do serviço.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/71ac20b-java_tree.png\",\n        \"java_tree.png\",\n        463,\n        167,\n        \"#d5ddbe\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Utilize a porta que foi configurada no processo de instalação ou nossa default, a 8583.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Fazendo um Hello World na telinha do Pinpad\"\n}\n[/block]\nPara pegar o jeitão de como lidar com seu recém criado proxy e com o web service, vamos criar um Hello, World! na telinha do pinpad. Para executar esta receita você irá precisar dos seguintes ingredientes abaixo:\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Ingredientes\",\n    \"h-1\": \"Quantidades\",\n    \"0-0\": \"Web Service Client\",\n    \"0-1\": \"1x (vide passo anterior)\",\n    \"1-0\": \"Pinpad\",\n    \"2-0\": \"Stone Code\",\n    \"1-1\": \"1x (pelo menos um)\",\n    \"2-1\": \"1x (obtido após o processo de credenciamento)\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\nPrimeiro precisamos de um proxy do service. O seguinte trecho de código atende esta necessidade:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import org.tempuri.IMicroPosServiceProxy;\\n\\npublic class App {\\n\\n    public static void main(String[] args) {\\n\\n        IMicroPosServiceProxy service = new IMicroPosServiceProxy();\\n\\n    }\\n\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nAtravés da nossa variavel service podemos acessar todas as operations no serviço.\n\nPara exibir uma mensagem na telinha do pinpad precisamos utilizar a operation chamada ``ShowMessage``. Pelo padrão que vimos teremos que criar uma request do tipo ``ShowMessageRequest`` e obteremos uma resposta do tipo ``ShowMessageResponse``. Mas antes de fazer qualquer operação envolvendo o pinpad ou de transacionar qualquer coisa precisamos de um Authorizer.\n\nPara obter apenas um Authorizer controlando um único pinpad utilizaremos a operation ``GetOneOrFirstPinpad``, mas se quiser conectar a múltiplos pinpads existe a operation ``GetAllPinpads``. Da mesma forma enviaremos um ``GetOneOrFirstPinpadRequest`` e obteremos um ``GetOneOrFirstPinpadResponse``.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"String stoneCode = \\\"SEU_STONE_CODE_AQUI\\\";\\n\\nGetOneOrFirstPinpadRequest requestPinpad = new GetOneOrFirstPinpadRequest();\\n// Dados necessários para obter um Authorizer (alem do pinpad)\\nrequestPinpad.setStoneCode(stoneCode);\\n// Idioma das mensagens de resposta\\nrequestPinpad.setLanguage(\\\"pt-BR\\\");\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nEm seguida basta passar esse request para o service, obter e interpretar o response e salvar o ``CardPaymentAuthorizer`` para passar nas proximas operações.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GetOneOrFirstPinpadResponse responsePinpad = service.getOneOrFirstPinpad(requestPinpad);\\nif (responsePinpad.getFailure() == false) {\\n    // Tudo certo até aqui!\\n    CardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nDepois de enviar este ``GetOneOrFirstPinpadRequest`` ao service, se tudo correu bem, o pinpad começa a exibir a mensagem ``Stone Pagamentos``. Se não correu bem, existe uma secção adiante apenas ensinando a lidar e interpretar as respostas de erro. Agora, finalmente vamos exibir o Hello World na telinha. Criamos um request para isso da seguinte maneira:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Authorizer existente no response do getOneOrFirstPinpad.\\nCardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\\n\\nShowMessageRequest requestMessage = new ShowMessageRequest();\\n// Define o pinpad através do atthorizer.\\nrequestMessage.setCardPaymentAuthorizer(authorizer);\\n// Define mensagem para primeira e segunda linha.\\nrequestMessage.setFirstLine(\\\"HELLO\\\");\\nrequestMessage.setSecondLine(\\\"WORLD\\\");\\n// Define alinhamento da mensagem.\\nrequestMessage.setPadding(\\\"Center\\\");\\n// Define linguagem, para mensagem de erro.\\nrequestMessage.setLanguage(\\\"pt-BR\\\");\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nE finalmente mandamos este request para o* service*.\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"ShowMessageResponse responseMessage = service.showMessage(requestMessage);\\nif (responseMessage.getFailure() == false) {\\n    System.out.println(\\\"Mensagem exibida? \\\" + responseMessage.getWasDisplayed());\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nUm ``HELLO WORLD`` aparece na telinha do pinpad e os conceitos basicos do web service client e da arquitetura da aplicação já foram solidificados.\n\n**Resumindo:**\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import java.rmi.RemoteException;\\n\\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts.CardPaymentAuthorizerContract;\\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Request.GetOneOrFirstPinpadRequest;\\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Request.ShowMessageRequest;\\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Response.GetOneOrFirstPinpadResponse;\\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Response.ShowMessageResponse;\\nimport org.tempuri.IMicroPosServiceProxy;\\n\\npublic class App {\\n\\n    public static void main(String[] args) throws RemoteException {\\n\\n        IMicroPosServiceProxy service = new IMicroPosServiceProxy();\\n\\n        String stoneCode = \\\"SEU_STONE_CODE_AQUI\\\";\\n\\n        GetOneOrFirstPinpadRequest requestPinpad = new GetOneOrFirstPinpadRequest();\\n        requestPinpad.setStoneCode(stoneCode);\\n\\n        requestPinpad.setLanguage(\\\"pt-BR\\\");\\n\\n        GetOneOrFirstPinpadResponse responsePinpad = service.getOneOrFirstPinpad(requestPinpad);\\n\\n        if (responsePinpad.getFailure() != true) {\\n            CardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\\n\\n            ShowMessageRequest requestMessage = new ShowMessageRequest();\\n            requestMessage.setCardPaymentAuthorizer(authorizer);\\n\\n            requestMessage.setFirstLine(\\\"HELLO\\\");\\n            requestMessage.setSecondLine(\\\"WORLD\\\");\\n            requestMessage.setPadding(\\\"Center\\\");\\n\\n            requestMessage.setLanguage(\\\"pt-BR\\\");\\n\\n            ShowMessageResponse responseMessage = service.showMessage(requestMessage);\\n            if (responseMessage.getFailure() != true) {\\n                System.out.println(\\\"Mensagem exibida? \\\" + responseMessage.getWasDisplayed());\\n            }\\n        }\\n    }\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:26:22.517Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":0,"parentDoc":"58405d1ec05073190006352e","project":"584054a2e3e04b230055c6b0","slug":"hello-world-em-java","sync_unique":"","title":"Hello World em Java","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405d4b63e13523002d01b7","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"> Em breve...","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:26:35.080Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":1,"parentDoc":"58405d1ec05073190006352e","project":"584054a2e3e04b230055c6b0","slug":"hello-world-em-delphi","sync_unique":"","title":"Hello World em Delphi","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"}]}

Tutorial básico


É um processo bem simples trabalhar com web service . Abaixo um resumo: 1. Criar um web service client 2. Montar um request 3. Enviar o request para uma operation 4. Interpretar a response da operation Este bê-a-bá é utilizado como padrão para todas as operations disponibilizadas pelo **MicroTef App.** [block:image] { "images": [ { "image": [ "https://files.readme.io/2bd8db0-request_response.png", "request_response.png", 527, 174, "#2e2c33" ], "sizing": "full" } ] } [/block] Alguns campos são comuns e presentes em todas as **requests**, tais como: * **Language:** através da qual o integrador pode configurar o idioma no qual o service definirá as mensagens de erro. Por default estamos devolvendo as mensagens em inglês, mas se quiser em português, defina este valor como pt-BR. * **RequestKey:** este é um campo para associar cada um dos request com um response. Este valor pode ser definido pelo integrador, mas se for deixado em branco, o próprio service definirá um Guid pra ele. Alguns campos também são comuns e presentes em todas as **responses**, tais como: * **RequestKey:** como vimos, é o valor atribuído pelo integrador ou pelo Guid gerado pelo service. * **Failure:** dá um feedback se ocorreu tudo bem ou não no processamento da operation. * **OperationErrors:** possui uma lista de ErrorReport existente caso o retorno de Failure seja True. * **StatusCode:** código de resposta HTTP do processamento da operation. [block:api-header] { "type": "basic", "title": "Criando um Web Service Client" } [/block] Nas IDEs modernas, comumente, existem recursos que simplificam o processo de criação de um Web Service Client bem como toda a complexidade da comunicação. Apesar do processo manual ser certamente possível (utilizando ferramentas como o [SoapUi](https://www.soapui.org)), não há motivo para tanta dor e sofrimento. A documentação abaixo trata de criar junto com o integrador um web service client para que ele possa seguir acompanhando os capítulos adiante. Este tutorial está disponivel para as seguintes linguagens de programação: * [Java](http://microtefdocs.stone.com.br/docs/hello-world-em-java-1) * Delphi ( Em breve ...)
É um processo bem simples trabalhar com web service . Abaixo um resumo: 1. Criar um web service client 2. Montar um request 3. Enviar o request para uma operation 4. Interpretar a response da operation Este bê-a-bá é utilizado como padrão para todas as operations disponibilizadas pelo **MicroTef App.** [block:image] { "images": [ { "image": [ "https://files.readme.io/2bd8db0-request_response.png", "request_response.png", 527, 174, "#2e2c33" ], "sizing": "full" } ] } [/block] Alguns campos são comuns e presentes em todas as **requests**, tais como: * **Language:** através da qual o integrador pode configurar o idioma no qual o service definirá as mensagens de erro. Por default estamos devolvendo as mensagens em inglês, mas se quiser em português, defina este valor como pt-BR. * **RequestKey:** este é um campo para associar cada um dos request com um response. Este valor pode ser definido pelo integrador, mas se for deixado em branco, o próprio service definirá um Guid pra ele. Alguns campos também são comuns e presentes em todas as **responses**, tais como: * **RequestKey:** como vimos, é o valor atribuído pelo integrador ou pelo Guid gerado pelo service. * **Failure:** dá um feedback se ocorreu tudo bem ou não no processamento da operation. * **OperationErrors:** possui uma lista de ErrorReport existente caso o retorno de Failure seja True. * **StatusCode:** código de resposta HTTP do processamento da operation. [block:api-header] { "type": "basic", "title": "Criando um Web Service Client" } [/block] Nas IDEs modernas, comumente, existem recursos que simplificam o processo de criação de um Web Service Client bem como toda a complexidade da comunicação. Apesar do processo manual ser certamente possível (utilizando ferramentas como o [SoapUi](https://www.soapui.org)), não há motivo para tanta dor e sofrimento. A documentação abaixo trata de criar junto com o integrador um web service client para que ele possa seguir acompanhando os capítulos adiante. Este tutorial está disponivel para as seguintes linguagens de programação: * [Java](http://microtefdocs.stone.com.br/docs/hello-world-em-java-1) * Delphi ( Em breve ...)
{"__v":0,"_id":"58594915a305f83900831bca","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Utilizando o Microtef Service com Java\"\n}\n[/block]\nNão necessáriamente as configurações abaixo devam ser obrigatórias, estão incluídas aqui apenas para o integrador saber em que tipo de ambiente o serviço foi testado:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Informação\",\n    \"h-1\": \"Configuração\",\n    \"0-0\": \"Sistema Operacional\",\n    \"0-1\": \"Windows 10 Enterprise 64-bits\",\n    \"1-0\": \"Java SE Runtime Environment\",\n    \"1-1\": \"1.8.0_91\",\n    \"2-0\": \"Java SE Development Kit\",\n    \"2-1\": \"1.8.0_92\",\n    \"3-0\": \"IDE\",\n    \"3-1\": \"Eclipse Mars.1 Release (4.5.1)\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nUma vez criado o projeto, no Eclipse siga o seguinte fluxo:\n\n1.  Botão direito no projeto e New e Other. Ou somente Ctrl+N.\n\n2.  Buscar por Web Service Client, dentro da pasta Web Services e clicar em Next.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2e801a7-java_webserverclient.png\",\n        \"java_webserverclient.png\",\n        519,\n        502,\n        \"#eeefee\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n3.  Na tela que segue, informar o WSDL em Service definition, no nosso caso [http://localhost:8583/micropos?singleWsdl](http://localhost:8583/micropos?singleWsdl). (leia o aviso aqui embaixo)\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/38d9a3e-java_webserverclient2.png\",\n        \"java_webserverclient2.png\",\n        548,\n        533,\n        \"#f0f0f0\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n4. Feito isso muito código será gerado, contendo os contracts de requersts e responses e o proxies do serviço.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/cd88146-java_tree.png\",\n        \"java_tree.png\",\n        463,\n        167,\n        \"#d5ddbe\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Utilize a porta que foi configurada no processo de instalação ou nossa default, a 8583.\",\n  \"title\": \"Importante\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Fazendo um Hello World na telinha do Pinpad\"\n}\n[/block]\nPaga pegar o jeitão de como lidar com seu recém criado proxy e com o web service, vamos criar um Hello, World! na telinha do pinpad. Para executar esta receita você irá precisar dos seguintes ingredientes abaixo:\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Ingredientes\",\n    \"h-1\": \"Quantidades\",\n    \"0-0\": \"Web Service Client\",\n    \"1-0\": \"Pinpad\",\n    \"2-0\": \"Stone Code\",\n    \"0-1\": \"1x (vide passo anterior)\",\n    \"1-1\": \"1x (pelo menos um)\",\n    \"2-1\": \"1x (obtido após o processo de credenciamento)\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\nPrimeiro precisamos de um proxy do service. O seguinte trecho de código atende esta necessidade:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import org.tempuri.IMicroPosServiceProxy;\\n\\npublic class App {\\n\\n    public static void main(String[] args) {\\n\\n        IMicroPosServiceProxy service = new IMicroPosServiceProxy();\\n\\n    }\\n\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nAtravés da nossa variavel service podemos acessar todas as operations no serviço.\n\nPara exibir uma mensagem na telinha do pinpad precisamos utilizar a operation chamada ShowMessage. Pelo padrão que vimoso teremos que criar uma request do tipo ShowMessageRequest e obteremos uma resposta do tipo ShowMessageResponse. Mas antes de fazer qualquer operação envolvendo o pinpad ou de transacionar qualquer coisa precisamos de um Authorizer.\nPara obter apenas um Authorizer controlando um único pinpad utilizaremos a operation GetOneOrFirstPinpad, mas se quiser conectar a múltiplos pinpads existe a operation GetAllPinpads. Da mesma forma enviaremos um GetOneOrFirstPinpadRequest e obteremos um GetOneOrFirstPinpadResponse.\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"String stoneCode = \\\"SEU_STONE_CODE_AQUI\\\";\\n\\nGetOneOrFirstPinpadRequest requestPinpad = new GetOneOrFirstPinpadRequest();\\n// Dados necessários para obter um Authorizer (alem do pinpad)\\nrequestPinpad.setStoneCode(stoneCode);\\n// Idioma das mensagens de resposta\\nrequestPinpad.setLanguage(\\\"pt-BR\\\");\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nEm seguida basta passar esse request para o service, obter e interpretar o response e salvar o CardPaymentAuthorizer para passar nas proximas operações.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GetOneOrFirstPinpadResponse responsePinpad = service.getOneOrFirstPinpad(requestPinpad);\\nif (responsePinpad.getFailure() == false) {\\n    // Tudo certo até aqui!\\n    CardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nDepois de enviar este GetOneOrFirstPinpadRequest ao service, se tudo correu bem, o pinpad começa a exibir a mensagem Stone Pagamentos. Se não correu bem, existe uma secção adiante apenas ensinando a lidar e interpretar as respostas de erro. Agora, finalmente vamos exibir o Hello World na telina. Criamos um request para isso da seguinte maneira:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Authorizer existente no response do getOneOrFirstPinpad.\\nCardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\\n\\nShowMessageRequest requestMessage = new ShowMessageRequest();\\n// Define o pinpad através do atthorizer.\\nrequestMessage.setCardPaymentAuthorizer(authorizer);\\n// Define mensagem para primeira e segunda linha.\\nrequestMessage.setFirstLine(\\\"HELLO\\\");\\nrequestMessage.setSecondLine(\\\"WORLD\\\");\\n// Define alinhamento da mensagem.\\nrequestMessage.setPadding(\\\"Center\\\");\\n// Define linguagem, para mensagem de erro.\\nrequestMessage.setLanguage(\\\"pt-BR\\\");\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nE finalmente mandamos este request para o service.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"ShowMessageResponse responseMessage = service.showMessage(requestMessage);\\nif (responseMessage.getFailure() == false) {\\n    System.out.println(\\\"Mensagem exibida? \\\" + responseMessage.getWasDisplayed());\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nUm HELLO WORLD aparece na telinha do pinpad e os conceitos basicos do web service client e da arquitetura da aplicação já foram solidificados.+\n\n**Resumindo:** \n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import java.rmi.RemoteException;\\n\\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts.CardPaymentAuthorizerContract;\\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Request.GetOneOrFirstPinpadRequest;\\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Request.ShowMessageRequest;\\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Response.GetOneOrFirstPinpadResponse;\\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Response.ShowMessageResponse;\\nimport org.tempuri.IMicroPosServiceProxy;\\n\\npublic class App {\\n\\n    public static void main(String[] args) throws RemoteException {\\n\\n        IMicroPosServiceProxy service = new IMicroPosServiceProxy();\\n\\n        String stoneCode = \\\"SEU_STONE_CODE_AQUI\\\";\\n\\n        GetOneOrFirstPinpadRequest requestPinpad = new GetOneOrFirstPinpadRequest();\\n        requestPinpad.setStoneCode(stoneCode);\\n\\n        requestPinpad.setLanguage(\\\"pt-BR\\\");\\n\\n        GetOneOrFirstPinpadResponse responsePinpad = service.getOneOrFirstPinpad(requestPinpad);\\n\\n        if (responsePinpad.getFailure() != true) {\\n            CardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\\n\\n            ShowMessageRequest requestMessage = new ShowMessageRequest();\\n            requestMessage.setCardPaymentAuthorizer(authorizer);\\n\\n            requestMessage.setFirstLine(\\\"HELLO\\\");\\n            requestMessage.setSecondLine(\\\"WORLD\\\");\\n            requestMessage.setPadding(\\\"Center\\\");\\n\\n            requestMessage.setLanguage(\\\"pt-BR\\\");\\n\\n            ShowMessageResponse responseMessage = service.showMessage(requestMessage);\\n            if (responseMessage.getFailure() != true) {\\n                System.out.println(\\\"Mensagem exibida? \\\" + responseMessage.getWasDisplayed());\\n            }\\n        }\\n    }\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T15:07:01.465Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":2,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"hello-world-em-java-1","sync_unique":"","title":"Hello World em Java","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Hello World em Java


[block:api-header] { "type": "basic", "title": "Utilizando o Microtef Service com Java" } [/block] Não necessáriamente as configurações abaixo devam ser obrigatórias, estão incluídas aqui apenas para o integrador saber em que tipo de ambiente o serviço foi testado: [block:parameters] { "data": { "h-0": "Informação", "h-1": "Configuração", "0-0": "Sistema Operacional", "0-1": "Windows 10 Enterprise 64-bits", "1-0": "Java SE Runtime Environment", "1-1": "1.8.0_91", "2-0": "Java SE Development Kit", "2-1": "1.8.0_92", "3-0": "IDE", "3-1": "Eclipse Mars.1 Release (4.5.1)" }, "cols": 2, "rows": 4 } [/block] Uma vez criado o projeto, no Eclipse siga o seguinte fluxo: 1. Botão direito no projeto e New e Other. Ou somente Ctrl+N. 2. Buscar por Web Service Client, dentro da pasta Web Services e clicar em Next. [block:image] { "images": [ { "image": [ "https://files.readme.io/2e801a7-java_webserverclient.png", "java_webserverclient.png", 519, 502, "#eeefee" ], "sizing": "full" } ] } [/block] 3. Na tela que segue, informar o WSDL em Service definition, no nosso caso [http://localhost:8583/micropos?singleWsdl](http://localhost:8583/micropos?singleWsdl). (leia o aviso aqui embaixo) [block:image] { "images": [ { "image": [ "https://files.readme.io/38d9a3e-java_webserverclient2.png", "java_webserverclient2.png", 548, 533, "#f0f0f0" ], "sizing": "full" } ] } [/block] 4. Feito isso muito código será gerado, contendo os contracts de requersts e responses e o proxies do serviço. [block:image] { "images": [ { "image": [ "https://files.readme.io/cd88146-java_tree.png", "java_tree.png", 463, 167, "#d5ddbe" ], "sizing": "full" } ] } [/block] [block:callout] { "type": "warning", "body": "Utilize a porta que foi configurada no processo de instalação ou nossa default, a 8583.", "title": "Importante" } [/block] [block:api-header] { "type": "basic", "title": "Fazendo um Hello World na telinha do Pinpad" } [/block] Paga pegar o jeitão de como lidar com seu recém criado proxy e com o web service, vamos criar um Hello, World! na telinha do pinpad. Para executar esta receita você irá precisar dos seguintes ingredientes abaixo: [block:parameters] { "data": { "h-0": "Ingredientes", "h-1": "Quantidades", "0-0": "Web Service Client", "1-0": "Pinpad", "2-0": "Stone Code", "0-1": "1x (vide passo anterior)", "1-1": "1x (pelo menos um)", "2-1": "1x (obtido após o processo de credenciamento)" }, "cols": 2, "rows": 3 } [/block] Primeiro precisamos de um proxy do service. O seguinte trecho de código atende esta necessidade: [block:code] { "codes": [ { "code": "import org.tempuri.IMicroPosServiceProxy;\n\npublic class App {\n\n public static void main(String[] args) {\n\n IMicroPosServiceProxy service = new IMicroPosServiceProxy();\n\n }\n\n}", "language": "java" } ] } [/block] Através da nossa variavel service podemos acessar todas as operations no serviço. Para exibir uma mensagem na telinha do pinpad precisamos utilizar a operation chamada ShowMessage. Pelo padrão que vimoso teremos que criar uma request do tipo ShowMessageRequest e obteremos uma resposta do tipo ShowMessageResponse. Mas antes de fazer qualquer operação envolvendo o pinpad ou de transacionar qualquer coisa precisamos de um Authorizer. Para obter apenas um Authorizer controlando um único pinpad utilizaremos a operation GetOneOrFirstPinpad, mas se quiser conectar a múltiplos pinpads existe a operation GetAllPinpads. Da mesma forma enviaremos um GetOneOrFirstPinpadRequest e obteremos um GetOneOrFirstPinpadResponse. [block:code] { "codes": [ { "code": "String stoneCode = \"SEU_STONE_CODE_AQUI\";\n\nGetOneOrFirstPinpadRequest requestPinpad = new GetOneOrFirstPinpadRequest();\n// Dados necessários para obter um Authorizer (alem do pinpad)\nrequestPinpad.setStoneCode(stoneCode);\n// Idioma das mensagens de resposta\nrequestPinpad.setLanguage(\"pt-BR\");", "language": "java" } ] } [/block] Em seguida basta passar esse request para o service, obter e interpretar o response e salvar o CardPaymentAuthorizer para passar nas proximas operações. [block:code] { "codes": [ { "code": "GetOneOrFirstPinpadResponse responsePinpad = service.getOneOrFirstPinpad(requestPinpad);\nif (responsePinpad.getFailure() == false) {\n // Tudo certo até aqui!\n CardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\n}", "language": "java" } ] } [/block] Depois de enviar este GetOneOrFirstPinpadRequest ao service, se tudo correu bem, o pinpad começa a exibir a mensagem Stone Pagamentos. Se não correu bem, existe uma secção adiante apenas ensinando a lidar e interpretar as respostas de erro. Agora, finalmente vamos exibir o Hello World na telina. Criamos um request para isso da seguinte maneira: [block:code] { "codes": [ { "code": "// Authorizer existente no response do getOneOrFirstPinpad.\nCardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\n\nShowMessageRequest requestMessage = new ShowMessageRequest();\n// Define o pinpad através do atthorizer.\nrequestMessage.setCardPaymentAuthorizer(authorizer);\n// Define mensagem para primeira e segunda linha.\nrequestMessage.setFirstLine(\"HELLO\");\nrequestMessage.setSecondLine(\"WORLD\");\n// Define alinhamento da mensagem.\nrequestMessage.setPadding(\"Center\");\n// Define linguagem, para mensagem de erro.\nrequestMessage.setLanguage(\"pt-BR\");", "language": "java" } ] } [/block] E finalmente mandamos este request para o service. [block:code] { "codes": [ { "code": "ShowMessageResponse responseMessage = service.showMessage(requestMessage);\nif (responseMessage.getFailure() == false) {\n System.out.println(\"Mensagem exibida? \" + responseMessage.getWasDisplayed());\n}", "language": "java" } ] } [/block] Um HELLO WORLD aparece na telinha do pinpad e os conceitos basicos do web service client e da arquitetura da aplicação já foram solidificados.+ **Resumindo:** [block:code] { "codes": [ { "code": "import java.rmi.RemoteException;\n\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts.CardPaymentAuthorizerContract;\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Request.GetOneOrFirstPinpadRequest;\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Request.ShowMessageRequest;\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Response.GetOneOrFirstPinpadResponse;\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Response.ShowMessageResponse;\nimport org.tempuri.IMicroPosServiceProxy;\n\npublic class App {\n\n public static void main(String[] args) throws RemoteException {\n\n IMicroPosServiceProxy service = new IMicroPosServiceProxy();\n\n String stoneCode = \"SEU_STONE_CODE_AQUI\";\n\n GetOneOrFirstPinpadRequest requestPinpad = new GetOneOrFirstPinpadRequest();\n requestPinpad.setStoneCode(stoneCode);\n\n requestPinpad.setLanguage(\"pt-BR\");\n\n GetOneOrFirstPinpadResponse responsePinpad = service.getOneOrFirstPinpad(requestPinpad);\n\n if (responsePinpad.getFailure() != true) {\n CardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\n\n ShowMessageRequest requestMessage = new ShowMessageRequest();\n requestMessage.setCardPaymentAuthorizer(authorizer);\n\n requestMessage.setFirstLine(\"HELLO\");\n requestMessage.setSecondLine(\"WORLD\");\n requestMessage.setPadding(\"Center\");\n\n requestMessage.setLanguage(\"pt-BR\");\n\n ShowMessageResponse responseMessage = service.showMessage(requestMessage);\n if (responseMessage.getFailure() != true) {\n System.out.println(\"Mensagem exibida? \" + responseMessage.getWasDisplayed());\n }\n }\n }\n}", "language": "java" } ] } [/block]
[block:api-header] { "type": "basic", "title": "Utilizando o Microtef Service com Java" } [/block] Não necessáriamente as configurações abaixo devam ser obrigatórias, estão incluídas aqui apenas para o integrador saber em que tipo de ambiente o serviço foi testado: [block:parameters] { "data": { "h-0": "Informação", "h-1": "Configuração", "0-0": "Sistema Operacional", "0-1": "Windows 10 Enterprise 64-bits", "1-0": "Java SE Runtime Environment", "1-1": "1.8.0_91", "2-0": "Java SE Development Kit", "2-1": "1.8.0_92", "3-0": "IDE", "3-1": "Eclipse Mars.1 Release (4.5.1)" }, "cols": 2, "rows": 4 } [/block] Uma vez criado o projeto, no Eclipse siga o seguinte fluxo: 1. Botão direito no projeto e New e Other. Ou somente Ctrl+N. 2. Buscar por Web Service Client, dentro da pasta Web Services e clicar em Next. [block:image] { "images": [ { "image": [ "https://files.readme.io/2e801a7-java_webserverclient.png", "java_webserverclient.png", 519, 502, "#eeefee" ], "sizing": "full" } ] } [/block] 3. Na tela que segue, informar o WSDL em Service definition, no nosso caso [http://localhost:8583/micropos?singleWsdl](http://localhost:8583/micropos?singleWsdl). (leia o aviso aqui embaixo) [block:image] { "images": [ { "image": [ "https://files.readme.io/38d9a3e-java_webserverclient2.png", "java_webserverclient2.png", 548, 533, "#f0f0f0" ], "sizing": "full" } ] } [/block] 4. Feito isso muito código será gerado, contendo os contracts de requersts e responses e o proxies do serviço. [block:image] { "images": [ { "image": [ "https://files.readme.io/cd88146-java_tree.png", "java_tree.png", 463, 167, "#d5ddbe" ], "sizing": "full" } ] } [/block] [block:callout] { "type": "warning", "body": "Utilize a porta que foi configurada no processo de instalação ou nossa default, a 8583.", "title": "Importante" } [/block] [block:api-header] { "type": "basic", "title": "Fazendo um Hello World na telinha do Pinpad" } [/block] Paga pegar o jeitão de como lidar com seu recém criado proxy e com o web service, vamos criar um Hello, World! na telinha do pinpad. Para executar esta receita você irá precisar dos seguintes ingredientes abaixo: [block:parameters] { "data": { "h-0": "Ingredientes", "h-1": "Quantidades", "0-0": "Web Service Client", "1-0": "Pinpad", "2-0": "Stone Code", "0-1": "1x (vide passo anterior)", "1-1": "1x (pelo menos um)", "2-1": "1x (obtido após o processo de credenciamento)" }, "cols": 2, "rows": 3 } [/block] Primeiro precisamos de um proxy do service. O seguinte trecho de código atende esta necessidade: [block:code] { "codes": [ { "code": "import org.tempuri.IMicroPosServiceProxy;\n\npublic class App {\n\n public static void main(String[] args) {\n\n IMicroPosServiceProxy service = new IMicroPosServiceProxy();\n\n }\n\n}", "language": "java" } ] } [/block] Através da nossa variavel service podemos acessar todas as operations no serviço. Para exibir uma mensagem na telinha do pinpad precisamos utilizar a operation chamada ShowMessage. Pelo padrão que vimoso teremos que criar uma request do tipo ShowMessageRequest e obteremos uma resposta do tipo ShowMessageResponse. Mas antes de fazer qualquer operação envolvendo o pinpad ou de transacionar qualquer coisa precisamos de um Authorizer. Para obter apenas um Authorizer controlando um único pinpad utilizaremos a operation GetOneOrFirstPinpad, mas se quiser conectar a múltiplos pinpads existe a operation GetAllPinpads. Da mesma forma enviaremos um GetOneOrFirstPinpadRequest e obteremos um GetOneOrFirstPinpadResponse. [block:code] { "codes": [ { "code": "String stoneCode = \"SEU_STONE_CODE_AQUI\";\n\nGetOneOrFirstPinpadRequest requestPinpad = new GetOneOrFirstPinpadRequest();\n// Dados necessários para obter um Authorizer (alem do pinpad)\nrequestPinpad.setStoneCode(stoneCode);\n// Idioma das mensagens de resposta\nrequestPinpad.setLanguage(\"pt-BR\");", "language": "java" } ] } [/block] Em seguida basta passar esse request para o service, obter e interpretar o response e salvar o CardPaymentAuthorizer para passar nas proximas operações. [block:code] { "codes": [ { "code": "GetOneOrFirstPinpadResponse responsePinpad = service.getOneOrFirstPinpad(requestPinpad);\nif (responsePinpad.getFailure() == false) {\n // Tudo certo até aqui!\n CardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\n}", "language": "java" } ] } [/block] Depois de enviar este GetOneOrFirstPinpadRequest ao service, se tudo correu bem, o pinpad começa a exibir a mensagem Stone Pagamentos. Se não correu bem, existe uma secção adiante apenas ensinando a lidar e interpretar as respostas de erro. Agora, finalmente vamos exibir o Hello World na telina. Criamos um request para isso da seguinte maneira: [block:code] { "codes": [ { "code": "// Authorizer existente no response do getOneOrFirstPinpad.\nCardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\n\nShowMessageRequest requestMessage = new ShowMessageRequest();\n// Define o pinpad através do atthorizer.\nrequestMessage.setCardPaymentAuthorizer(authorizer);\n// Define mensagem para primeira e segunda linha.\nrequestMessage.setFirstLine(\"HELLO\");\nrequestMessage.setSecondLine(\"WORLD\");\n// Define alinhamento da mensagem.\nrequestMessage.setPadding(\"Center\");\n// Define linguagem, para mensagem de erro.\nrequestMessage.setLanguage(\"pt-BR\");", "language": "java" } ] } [/block] E finalmente mandamos este request para o service. [block:code] { "codes": [ { "code": "ShowMessageResponse responseMessage = service.showMessage(requestMessage);\nif (responseMessage.getFailure() == false) {\n System.out.println(\"Mensagem exibida? \" + responseMessage.getWasDisplayed());\n}", "language": "java" } ] } [/block] Um HELLO WORLD aparece na telinha do pinpad e os conceitos basicos do web service client e da arquitetura da aplicação já foram solidificados.+ **Resumindo:** [block:code] { "codes": [ { "code": "import java.rmi.RemoteException;\n\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts.CardPaymentAuthorizerContract;\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Request.GetOneOrFirstPinpadRequest;\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Request.ShowMessageRequest;\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Response.GetOneOrFirstPinpadResponse;\nimport org.datacontract.schemas._2004._07.MicroPos_DataContracts_Response.ShowMessageResponse;\nimport org.tempuri.IMicroPosServiceProxy;\n\npublic class App {\n\n public static void main(String[] args) throws RemoteException {\n\n IMicroPosServiceProxy service = new IMicroPosServiceProxy();\n\n String stoneCode = \"SEU_STONE_CODE_AQUI\";\n\n GetOneOrFirstPinpadRequest requestPinpad = new GetOneOrFirstPinpadRequest();\n requestPinpad.setStoneCode(stoneCode);\n\n requestPinpad.setLanguage(\"pt-BR\");\n\n GetOneOrFirstPinpadResponse responsePinpad = service.getOneOrFirstPinpad(requestPinpad);\n\n if (responsePinpad.getFailure() != true) {\n CardPaymentAuthorizerContract authorizer = responsePinpad.getCardPaymentAuthorizer();\n\n ShowMessageRequest requestMessage = new ShowMessageRequest();\n requestMessage.setCardPaymentAuthorizer(authorizer);\n\n requestMessage.setFirstLine(\"HELLO\");\n requestMessage.setSecondLine(\"WORLD\");\n requestMessage.setPadding(\"Center\");\n\n requestMessage.setLanguage(\"pt-BR\");\n\n ShowMessageResponse responseMessage = service.showMessage(requestMessage);\n if (responseMessage.getFailure() != true) {\n System.out.println(\"Mensagem exibida? \" + responseMessage.getWasDisplayed());\n }\n }\n }\n}", "language": "java" } ] } [/block]
{"__v":0,"_id":"585949238f0b4a2f0069788e","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"> Em breve ...","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T15:07:15.596Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":3,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"hello-world-em-delphi-1","sync_unique":"","title":"Hello World em Delphi","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Hello World em Delphi


> Em breve ...
{"__v":0,"_id":"58405d63c6c9322300273fa5","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"O **MicroTef App** é um web service que oferece uma série de operations ao integrador. Muitas responsáveis por manipular o pinpad, processar transações financeiras, estabelecer conexão com um ou múltiplos pinpads, etc.\n\nTodas as operations implementadas por este serviço aceitam um request e um response, de mesmo nome. Conforme mostra o desenho abaixo:\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2d4e20a-request_response.png\",\n        \"request_response.png\",\n        527,\n        174,\n        \"#2e2c33\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nPara fins de organização deste documento, vamos dividir as operations em três campos, definidos pelas suas principais funcionalidades. São elas:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Tipo de Operação\",\n    \"h-1\": \"Descrição\",\n    \"0-0\": \"Provedores de Authorizers\",\n    \"0-1\": \"Responsáveis por criar autorizadores e manipular os existentes.\",\n    \"1-0\": \"Manipulação de Pinpads\",\n    \"1-1\": \"Manipular display, teclado e leitor de cartão.\",\n    \"2-0\": \"Processamento de transações\",\n    \"2-1\": \"Autorizar, cancelar e completar uma transação.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Trabalhando com falhas (muito importante!)\"\n}\n[/block]\nExistem duas possibilidades que levariam ao **MicroTef App** a devolver uma response com ``Failure`` igual a ``True``. São elas:\n\n1. Requisições erradas (paramêtros obrigatórios nulos ou inválidos).\n\n2. Operação de ativação, autorização, cancelamento, completion com erro.\n\nO idioma das mensagens de erro pode ser configurado no request, para tal é necessário definir isto no campo ``Language``. Os seguintes idiomas são suportados.\n\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Idioma\",\n    \"h-1\": \"Valor do Campo\",\n    \"0-0\": \"Inglês\",\n    \"0-1\": \"en-US\",\n    \"1-0\": \"Português\",\n    \"1-1\": \"pt-BR\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Por default trabalhamos com o idioma inglês, então se você não quiser informar nada, tudo bem... o serviço oferecerá messagens em inglês.\"\n}\n[/block]\nPara obter os detalhes da resposta, devemos verificar se o campo ``Failure`` do response é ``True``. Se sim, haverá ``ErrorReport`` na lista ``OperationReport``. Vamos simular a obtenção de um authorizer passando um Sale Affiliation Key em branco, um Authorizer Url que não é HTTPS e um TMS Url que não é um URL:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nString stoneCode = \\\"\\\"; // hue hue\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.StoneCode = stoneCode;            \\nrequest.Language = \\\"pt-BR\\\";\\n\\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\\n\\nif (response.Failure != true)\\n{\\n    // Tudo correu bem.\\n}\\nelse\\n{\\n    // Ops... algo deu errado!\\n    Console.WriteLine(\\\"\\\");\\n    Console.WriteLine(\\\"Código HTTP do erro: \\\" + response.StatusCode);\\n    Console.WriteLine(\\\"\\\\n===== Relatórios de erro =====\\\\n\\\");\\n\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(\\\"Código de erro: \\\" + report.Code);\\n        Console.WriteLine(\\\"Campo associado ao erro: \\\" + report.Field);\\n        Console.WriteLine(\\\"Mensagem erro: \\\" + report.Message);\\n        Console.WriteLine(\\\"\\\\n\\\");\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"IMicroPosServiceProxy service = new IMicroPosServiceProxy();\\n\\nString saleAffiliationKey = \\\"\\\"; // hue hue\\nString authorizerUrl = \\\"http://pos.stone.com.br/\\\";\\nString tmsUrl = \\\"Não sou um URL!\\\";\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.setSaleAffiliationKey(saleAffiliationKey);\\nrequest.setAuthorizerUrl(authorizerUrl);\\nrequest.setTmsUrl(tmsUrl);\\n\\nrequest.setLanguage(\\\"pt-BR\\\");\\n\\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\\n\\nif (response.getFailure() != true) {\\n    // Tudo correu bem.\\n} else {\\n    // Ops... algo deu errado!\\n    System.out.println(\\\"\\\");\\n    System.out.println(\\\"Código HTTP do erro: \\\" + response.getStatusCode());\\n\\n    System.out.println(\\\"\\\\n===== Relatórios de erro =====\\\\n\\\");\\n\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(\\\"Código de erro: \\\" + report.getCode());\\n        System.out.println(\\\"Campo associado ao erro: \\\" + report.getField());\\n        System.out.println(\\\"Mensagem erro: \\\" + report.getMessage());\\n        System.out.println(\\\"\\\\n\\\");\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\nO seguinte output é exibido no console:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Código HTTP do erro: 400\\n\\n===== Relatórios de erro =====\\n\\nCódigo de erro: G1000\\nCampo associado ao erro: GetOneOrFirstPinpadRequest.SaleAffiliationKey\\nMensagem erro: Propriedade nula ou vazia.\\n\\n\\nCódigo de erro: G1001\\nCampo associado ao erro: GetOneOrFirstPinpadRequest.AuthorizerUrl\\nMensagem erro: URL deveria ser HTTPS.\\n\\n\\nCódigo de erro: G1002\\nCampo associado ao erro: GetOneOrFirstPinpadRequest.TmsUrl\\nMensagem erro: URL inválido.\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Tabela de código de erro\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Mensagem\",\n    \"0-0\": \"C1000\",\n    \"0-1\": \"Pinpad desconectado.\",\n    \"1-0\": \"C1001\",\n    \"1-1\": \"Erro de rede. Verifique a sua conexão com a internet.\",\n    \"2-0\": \"D2000\",\n    \"2-1\": \"A mensagem deve ter no máximo 16 caracteres.\",\n    \"3-0\": \"D3000\",\n    \"3-1\": \"O valor da transação é inválido. O valor deve ser superior a zero.\",\n    \"4-0\": \"D3001\",\n    \"4-1\": \"O ITK (Initiator Transaction Key) é inválido. O ITK não pode estar vazio, mas precisa ser menor que 128 caracteres.\",\n    \"5-0\": \"D3002\",\n    \"5-1\": \"O número de parcelamentos deve ser maior que zero.\",\n    \"6-0\": \"D3003\",\n    \"6-1\": \"Um cartão expirado foi inserido/passado.\",\n    \"7-0\": \"D3004\",\n    \"7-1\": \"Impossível cancelar transação que não foi autorizada.\",\n    \"8-0\": \"D3005\",\n    \"8-1\": \"ITK e ATK estão nulos/vazios. Uma transação só pode ser cancelada com um dos identificadores (ATK ou ITK).\",\n    \"9-0\": \"D3006\",\n    \"9-1\": \"O cartão não requer leitura da senha.\",\n    \"10-0\": \"D4000\",\n    \"10-1\": \"Este StoneCode não existe ou não tem este produto habilitado.\",\n    \"11-0\": \"D4001\",\n    \"11-1\": \"Padrão inválido de StoneCode. Apenas sequencias numéricas de nove digitos são aceitas.\",\n    \"12-0\": \"G1000\",\n    \"12-1\": \"Propriedade nula ou vazia.\",\n    \"13-0\": \"G1001\",\n    \"13-1\": \"URL deveria ser HTTPS.\",\n    \"14-0\": \"G1002\",\n    \"14-1\": \"URL inválido.\",\n    \"15-0\": \"G1003\",\n    \"15-1\": \"Propriedade com valor desconhecido.\",\n    \"16-0\": \"G1004\",\n    \"16-1\": \"Propriedade com valor não definido.\",\n    \"17-0\": \"G1005\",\n    \"17-1\": \"O valor informado não pode ser menor do que zero.\",\n    \"18-0\": \"G1006\",\n    \"18-1\": \"A propriedade possui valor menor do que seu valor mínimo.\",\n    \"19-0\": \"G1008\",\n    \"19-1\": \"Nenhum valor foi escolhido dentro do range informado ou dentro das opções passadas.\",\n    \"20-0\": \"G1009\",\n    \"20-1\": \"Esta tecla não pode ser aceita.\",\n    \"21-0\": \"G1010\",\n    \"21-1\": \"A label no menu navegável deve ter no máximo 15 caracteres.\",\n    \"22-0\": \"P1000\",\n    \"22-1\": \"Pinpad não encontrado.\",\n    \"23-0\": \"R1000\",\n    \"23-1\": \"Comando executado com sucesso.\",\n    \"24-0\": \"R1001\",\n    \"24-1\": \"Erro interno, situação inesperada com código de erro específico.\",\n    \"25-0\": \"R1002\",\n    \"25-1\": \"Tempo de operação excedido.\",\n    \"26-0\": \"R1003\",\n    \"26-1\": \"A operação foi cancelada pelo operado. Tecla de CANCEL foi pressionada.\",\n    \"27-0\": \"R1100\",\n    \"27-1\": \"Primeira tecla FUNCTION foi pressionada.\",\n    \"28-0\": \"R1101\",\n    \"28-1\": \"Segunda tecla FUNCTION foi pressionada.\",\n    \"29-0\": \"R1102\",\n    \"29-1\": \"Terceira tecla FUNCTION foi pressionada.\",\n    \"30-0\": \"R1103\",\n    \"30-1\": \"Quarta tecla FUNCTION foi pressionada.\",\n    \"31-0\": \"R1104\",\n    \"31-1\": \"Tecla CLEAR foi pressionada.\",\n    \"32-1\": \"Tecla CANCEL foi pressionada.\",\n    \"32-0\": \"R1105\",\n    \"33-0\": \"R1200\",\n    \"33-1\": \"Comunicação com o pinpad não foi aberta. Verifique a chamada ao método IPinpadService.OpenPinpadConnection.\",\n    \"34-0\": \"R1201\",\n    \"34-1\": \"Tentativa de usar comunicação segurança inválida.\",\n    \"35-0\": \"R1202\",\n    \"35-1\": \"Tamanho da resposta ultrapassou tamanho limite.\",\n    \"36-0\": \"R1300\",\n    \"36-1\": \"Secure Access Module (SAM) está faltando, mudo ou erro de comunicação.\",\n    \"37-1\": \"Chamada a uma função inválida, faltando operação pré-requisitada ou comando desconhecido.\",\n    \"37-0\": \"R1400\",\n    \"38-0\": \"R1401\",\n    \"39-0\": \"R1402\",\n    \"40-0\": \"R1403\",\n    \"38-1\": \"Parâmetro inválido passado para a função.\",\n    \"39-1\": \"Um parâmetro obrigatório não foi enviado.\",\n    \"40-1\": \"Valor da transação inválido.\",\n    \"41-0\": \"R1500\",\n    \"41-1\": \"Versão das tabelas EMV estão diferentes das esperadas.\",\n    \"42-0\": \"R1501\",\n    \"42-1\": \"Erro ao escrever tabelas.\",\n    \"43-0\": \"R1600\",\n    \"43-1\": \"Erro ao ler cartão de tarja magnética.\",\n    \"44-0\": \"R1601\",\n    \"44-1\": \"Indice de PIN online está ausente.\",\n    \"45-0\": \"R1602\",\n    \"45-1\": \"Nenhum cartão inserido ou contactless detectado.\",\n    \"46-0\": \"R1603\",\n    \"46-1\": \"Não foi possível ler o PIN por razões de segurança.\",\n    \"47-0\": \"R1604\",\n    \"47-1\": \"O chip do cartão está faltando ou mudo.\",\n    \"48-0\": \"R1605\",\n    \"48-1\": \"Erro de comunicação com o cartão.\",\n    \"49-0\": \"R1606\",\n    \"49-1\": \"Cartão foi invalidado.\",\n    \"50-0\": \"R1607\",\n    \"50-1\": \"Cartão não está se comportando como o esperado.\",\n    \"51-0\": \"R1608\",\n    \"51-1\": \"Cartão possui dados inválidos ou inconsistentes.\",\n    \"52-0\": \"R1609\",\n    \"52-1\": \"Cartão não possui aplicação EMV disponível para a condição requisitada.\",\n    \"53-0\": \"R1610\",\n    \"53-1\": \"Fallback por tarja magnética.\",\n    \"54-0\": \"R1611\",\n    \"54-1\": \"Múltiplos cartões contactless detectados a o mesmo tempo.\",\n    \"55-0\": \"R1612\",\n    \"55-1\": \"Erro de comunicação com cartão contactless.\",\n    \"56-0\": \"R1613\",\n    \"56-1\": \"Cartão contactless foi invalidado.\",\n    \"57-0\": \"R1614\",\n    \"57-1\": \"Cartão contactless não está se comportando como o esperado.\",\n    \"58-0\": \"R1615\",\n    \"58-1\": \"Aplicação do cartão contactless não deve ser utilizada nessa situação.\",\n    \"59-0\": \"R1616\",\n    \"59-1\": \"Cartão não possui aplicação disponível para a condição requisitada.\",\n    \"60-0\": \"R1617\",\n    \"60-1\": \"Contactless card selected application may not be used in this situation.\",\n    \"61-0\": \"R1700\",\n    \"61-1\": \"Não foi possível conectar com o pinpad.\",\n    \"62-0\": \"R1800\",\n    \"62-1\": \"Arquivo multimídia não encontrado.\",\n    \"63-0\": \"R1801\",\n    \"63-1\": \"Erro no formato do arquivo multimídia.\",\n    \"64-0\": \"R1802\",\n    \"64-1\": \"Erro ao carregar arquivo multimídia.\",\n    \"65-0\": \"R1999\",\n    \"65-1\": \"Erro interno, situação inesperada com código de erro indefinido.\",\n    \"66-0\": \"S1000\",\n    \"66-1\": \"Um erro interno ocorreu.\",\n    \"67-0\": \"S1001\",\n    \"67-1\": \"O Microtef está atualizando. Tente novamente mais tarde.\"\n  },\n  \"cols\": 2,\n  \"rows\": 68\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:26:59.382Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":4,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"operações","sync_unique":"","title":"Operações","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Operações


O **MicroTef App** é um web service que oferece uma série de operations ao integrador. Muitas responsáveis por manipular o pinpad, processar transações financeiras, estabelecer conexão com um ou múltiplos pinpads, etc. Todas as operations implementadas por este serviço aceitam um request e um response, de mesmo nome. Conforme mostra o desenho abaixo: [block:image] { "images": [ { "image": [ "https://files.readme.io/2d4e20a-request_response.png", "request_response.png", 527, 174, "#2e2c33" ], "sizing": "full" } ] } [/block] Para fins de organização deste documento, vamos dividir as operations em três campos, definidos pelas suas principais funcionalidades. São elas: [block:parameters] { "data": { "h-0": "Tipo de Operação", "h-1": "Descrição", "0-0": "Provedores de Authorizers", "0-1": "Responsáveis por criar autorizadores e manipular os existentes.", "1-0": "Manipulação de Pinpads", "1-1": "Manipular display, teclado e leitor de cartão.", "2-0": "Processamento de transações", "2-1": "Autorizar, cancelar e completar uma transação." }, "cols": 2, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Trabalhando com falhas (muito importante!)" } [/block] Existem duas possibilidades que levariam ao **MicroTef App** a devolver uma response com ``Failure`` igual a ``True``. São elas: 1. Requisições erradas (paramêtros obrigatórios nulos ou inválidos). 2. Operação de ativação, autorização, cancelamento, completion com erro. O idioma das mensagens de erro pode ser configurado no request, para tal é necessário definir isto no campo ``Language``. Os seguintes idiomas são suportados. [block:parameters] { "data": { "h-0": "Idioma", "h-1": "Valor do Campo", "0-0": "Inglês", "0-1": "en-US", "1-0": "Português", "1-1": "pt-BR" }, "cols": 2, "rows": 2 } [/block] [block:callout] { "type": "warning", "body": "Por default trabalhamos com o idioma inglês, então se você não quiser informar nada, tudo bem... o serviço oferecerá messagens em inglês." } [/block] Para obter os detalhes da resposta, devemos verificar se o campo ``Failure`` do response é ``True``. Se sim, haverá ``ErrorReport`` na lista ``OperationReport``. Vamos simular a obtenção de um authorizer passando um Sale Affiliation Key em branco, um Authorizer Url que não é HTTPS e um TMS Url que não é um URL: [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nString stoneCode = \"\"; // hue hue\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.StoneCode = stoneCode; \nrequest.Language = \"pt-BR\";\n\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\n\nif (response.Failure != true)\n{\n // Tudo correu bem.\n}\nelse\n{\n // Ops... algo deu errado!\n Console.WriteLine(\"\");\n Console.WriteLine(\"Código HTTP do erro: \" + response.StatusCode);\n Console.WriteLine(\"\\n===== Relatórios de erro =====\\n\");\n\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(\"Código de erro: \" + report.Code);\n Console.WriteLine(\"Campo associado ao erro: \" + report.Field);\n Console.WriteLine(\"Mensagem erro: \" + report.Message);\n Console.WriteLine(\"\\n\");\n }\n}", "language": "csharp" }, { "code": "IMicroPosServiceProxy service = new IMicroPosServiceProxy();\n\nString saleAffiliationKey = \"\"; // hue hue\nString authorizerUrl = \"http://pos.stone.com.br/\";\nString tmsUrl = \"Não sou um URL!\";\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.setSaleAffiliationKey(saleAffiliationKey);\nrequest.setAuthorizerUrl(authorizerUrl);\nrequest.setTmsUrl(tmsUrl);\n\nrequest.setLanguage(\"pt-BR\");\n\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\n\nif (response.getFailure() != true) {\n // Tudo correu bem.\n} else {\n // Ops... algo deu errado!\n System.out.println(\"\");\n System.out.println(\"Código HTTP do erro: \" + response.getStatusCode());\n\n System.out.println(\"\\n===== Relatórios de erro =====\\n\");\n\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(\"Código de erro: \" + report.getCode());\n System.out.println(\"Campo associado ao erro: \" + report.getField());\n System.out.println(\"Mensagem erro: \" + report.getMessage());\n System.out.println(\"\\n\");\n }\n}", "language": "java" }, { "code": "// Em breve...", "language": "csharp", "name": "Delphi" } ] } [/block] O seguinte output é exibido no console: [block:code] { "codes": [ { "code": "Código HTTP do erro: 400\n\n===== Relatórios de erro =====\n\nCódigo de erro: G1000\nCampo associado ao erro: GetOneOrFirstPinpadRequest.SaleAffiliationKey\nMensagem erro: Propriedade nula ou vazia.\n\n\nCódigo de erro: G1001\nCampo associado ao erro: GetOneOrFirstPinpadRequest.AuthorizerUrl\nMensagem erro: URL deveria ser HTTPS.\n\n\nCódigo de erro: G1002\nCampo associado ao erro: GetOneOrFirstPinpadRequest.TmsUrl\nMensagem erro: URL inválido.", "language": "text" } ] } [/block] [block:api-header] { "type": "basic", "title": "Tabela de código de erro" } [/block] [block:parameters] { "data": { "h-0": "Código", "h-1": "Mensagem", "0-0": "C1000", "0-1": "Pinpad desconectado.", "1-0": "C1001", "1-1": "Erro de rede. Verifique a sua conexão com a internet.", "2-0": "D2000", "2-1": "A mensagem deve ter no máximo 16 caracteres.", "3-0": "D3000", "3-1": "O valor da transação é inválido. O valor deve ser superior a zero.", "4-0": "D3001", "4-1": "O ITK (Initiator Transaction Key) é inválido. O ITK não pode estar vazio, mas precisa ser menor que 128 caracteres.", "5-0": "D3002", "5-1": "O número de parcelamentos deve ser maior que zero.", "6-0": "D3003", "6-1": "Um cartão expirado foi inserido/passado.", "7-0": "D3004", "7-1": "Impossível cancelar transação que não foi autorizada.", "8-0": "D3005", "8-1": "ITK e ATK estão nulos/vazios. Uma transação só pode ser cancelada com um dos identificadores (ATK ou ITK).", "9-0": "D3006", "9-1": "O cartão não requer leitura da senha.", "10-0": "D4000", "10-1": "Este StoneCode não existe ou não tem este produto habilitado.", "11-0": "D4001", "11-1": "Padrão inválido de StoneCode. Apenas sequencias numéricas de nove digitos são aceitas.", "12-0": "G1000", "12-1": "Propriedade nula ou vazia.", "13-0": "G1001", "13-1": "URL deveria ser HTTPS.", "14-0": "G1002", "14-1": "URL inválido.", "15-0": "G1003", "15-1": "Propriedade com valor desconhecido.", "16-0": "G1004", "16-1": "Propriedade com valor não definido.", "17-0": "G1005", "17-1": "O valor informado não pode ser menor do que zero.", "18-0": "G1006", "18-1": "A propriedade possui valor menor do que seu valor mínimo.", "19-0": "G1008", "19-1": "Nenhum valor foi escolhido dentro do range informado ou dentro das opções passadas.", "20-0": "G1009", "20-1": "Esta tecla não pode ser aceita.", "21-0": "G1010", "21-1": "A label no menu navegável deve ter no máximo 15 caracteres.", "22-0": "P1000", "22-1": "Pinpad não encontrado.", "23-0": "R1000", "23-1": "Comando executado com sucesso.", "24-0": "R1001", "24-1": "Erro interno, situação inesperada com código de erro específico.", "25-0": "R1002", "25-1": "Tempo de operação excedido.", "26-0": "R1003", "26-1": "A operação foi cancelada pelo operado. Tecla de CANCEL foi pressionada.", "27-0": "R1100", "27-1": "Primeira tecla FUNCTION foi pressionada.", "28-0": "R1101", "28-1": "Segunda tecla FUNCTION foi pressionada.", "29-0": "R1102", "29-1": "Terceira tecla FUNCTION foi pressionada.", "30-0": "R1103", "30-1": "Quarta tecla FUNCTION foi pressionada.", "31-0": "R1104", "31-1": "Tecla CLEAR foi pressionada.", "32-1": "Tecla CANCEL foi pressionada.", "32-0": "R1105", "33-0": "R1200", "33-1": "Comunicação com o pinpad não foi aberta. Verifique a chamada ao método IPinpadService.OpenPinpadConnection.", "34-0": "R1201", "34-1": "Tentativa de usar comunicação segurança inválida.", "35-0": "R1202", "35-1": "Tamanho da resposta ultrapassou tamanho limite.", "36-0": "R1300", "36-1": "Secure Access Module (SAM) está faltando, mudo ou erro de comunicação.", "37-1": "Chamada a uma função inválida, faltando operação pré-requisitada ou comando desconhecido.", "37-0": "R1400", "38-0": "R1401", "39-0": "R1402", "40-0": "R1403", "38-1": "Parâmetro inválido passado para a função.", "39-1": "Um parâmetro obrigatório não foi enviado.", "40-1": "Valor da transação inválido.", "41-0": "R1500", "41-1": "Versão das tabelas EMV estão diferentes das esperadas.", "42-0": "R1501", "42-1": "Erro ao escrever tabelas.", "43-0": "R1600", "43-1": "Erro ao ler cartão de tarja magnética.", "44-0": "R1601", "44-1": "Indice de PIN online está ausente.", "45-0": "R1602", "45-1": "Nenhum cartão inserido ou contactless detectado.", "46-0": "R1603", "46-1": "Não foi possível ler o PIN por razões de segurança.", "47-0": "R1604", "47-1": "O chip do cartão está faltando ou mudo.", "48-0": "R1605", "48-1": "Erro de comunicação com o cartão.", "49-0": "R1606", "49-1": "Cartão foi invalidado.", "50-0": "R1607", "50-1": "Cartão não está se comportando como o esperado.", "51-0": "R1608", "51-1": "Cartão possui dados inválidos ou inconsistentes.", "52-0": "R1609", "52-1": "Cartão não possui aplicação EMV disponível para a condição requisitada.", "53-0": "R1610", "53-1": "Fallback por tarja magnética.", "54-0": "R1611", "54-1": "Múltiplos cartões contactless detectados a o mesmo tempo.", "55-0": "R1612", "55-1": "Erro de comunicação com cartão contactless.", "56-0": "R1613", "56-1": "Cartão contactless foi invalidado.", "57-0": "R1614", "57-1": "Cartão contactless não está se comportando como o esperado.", "58-0": "R1615", "58-1": "Aplicação do cartão contactless não deve ser utilizada nessa situação.", "59-0": "R1616", "59-1": "Cartão não possui aplicação disponível para a condição requisitada.", "60-0": "R1617", "60-1": "Contactless card selected application may not be used in this situation.", "61-0": "R1700", "61-1": "Não foi possível conectar com o pinpad.", "62-0": "R1800", "62-1": "Arquivo multimídia não encontrado.", "63-0": "R1801", "63-1": "Erro no formato do arquivo multimídia.", "64-0": "R1802", "64-1": "Erro ao carregar arquivo multimídia.", "65-0": "R1999", "65-1": "Erro interno, situação inesperada com código de erro indefinido.", "66-0": "S1000", "66-1": "Um erro interno ocorreu.", "67-0": "S1001", "67-1": "O Microtef está atualizando. Tente novamente mais tarde." }, "cols": 2, "rows": 68 } [/block]
O **MicroTef App** é um web service que oferece uma série de operations ao integrador. Muitas responsáveis por manipular o pinpad, processar transações financeiras, estabelecer conexão com um ou múltiplos pinpads, etc. Todas as operations implementadas por este serviço aceitam um request e um response, de mesmo nome. Conforme mostra o desenho abaixo: [block:image] { "images": [ { "image": [ "https://files.readme.io/2d4e20a-request_response.png", "request_response.png", 527, 174, "#2e2c33" ], "sizing": "full" } ] } [/block] Para fins de organização deste documento, vamos dividir as operations em três campos, definidos pelas suas principais funcionalidades. São elas: [block:parameters] { "data": { "h-0": "Tipo de Operação", "h-1": "Descrição", "0-0": "Provedores de Authorizers", "0-1": "Responsáveis por criar autorizadores e manipular os existentes.", "1-0": "Manipulação de Pinpads", "1-1": "Manipular display, teclado e leitor de cartão.", "2-0": "Processamento de transações", "2-1": "Autorizar, cancelar e completar uma transação." }, "cols": 2, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Trabalhando com falhas (muito importante!)" } [/block] Existem duas possibilidades que levariam ao **MicroTef App** a devolver uma response com ``Failure`` igual a ``True``. São elas: 1. Requisições erradas (paramêtros obrigatórios nulos ou inválidos). 2. Operação de ativação, autorização, cancelamento, completion com erro. O idioma das mensagens de erro pode ser configurado no request, para tal é necessário definir isto no campo ``Language``. Os seguintes idiomas são suportados. [block:parameters] { "data": { "h-0": "Idioma", "h-1": "Valor do Campo", "0-0": "Inglês", "0-1": "en-US", "1-0": "Português", "1-1": "pt-BR" }, "cols": 2, "rows": 2 } [/block] [block:callout] { "type": "warning", "body": "Por default trabalhamos com o idioma inglês, então se você não quiser informar nada, tudo bem... o serviço oferecerá messagens em inglês." } [/block] Para obter os detalhes da resposta, devemos verificar se o campo ``Failure`` do response é ``True``. Se sim, haverá ``ErrorReport`` na lista ``OperationReport``. Vamos simular a obtenção de um authorizer passando um Sale Affiliation Key em branco, um Authorizer Url que não é HTTPS e um TMS Url que não é um URL: [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nString stoneCode = \"\"; // hue hue\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.StoneCode = stoneCode; \nrequest.Language = \"pt-BR\";\n\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\n\nif (response.Failure != true)\n{\n // Tudo correu bem.\n}\nelse\n{\n // Ops... algo deu errado!\n Console.WriteLine(\"\");\n Console.WriteLine(\"Código HTTP do erro: \" + response.StatusCode);\n Console.WriteLine(\"\\n===== Relatórios de erro =====\\n\");\n\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(\"Código de erro: \" + report.Code);\n Console.WriteLine(\"Campo associado ao erro: \" + report.Field);\n Console.WriteLine(\"Mensagem erro: \" + report.Message);\n Console.WriteLine(\"\\n\");\n }\n}", "language": "csharp" }, { "code": "IMicroPosServiceProxy service = new IMicroPosServiceProxy();\n\nString saleAffiliationKey = \"\"; // hue hue\nString authorizerUrl = \"http://pos.stone.com.br/\";\nString tmsUrl = \"Não sou um URL!\";\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.setSaleAffiliationKey(saleAffiliationKey);\nrequest.setAuthorizerUrl(authorizerUrl);\nrequest.setTmsUrl(tmsUrl);\n\nrequest.setLanguage(\"pt-BR\");\n\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\n\nif (response.getFailure() != true) {\n // Tudo correu bem.\n} else {\n // Ops... algo deu errado!\n System.out.println(\"\");\n System.out.println(\"Código HTTP do erro: \" + response.getStatusCode());\n\n System.out.println(\"\\n===== Relatórios de erro =====\\n\");\n\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(\"Código de erro: \" + report.getCode());\n System.out.println(\"Campo associado ao erro: \" + report.getField());\n System.out.println(\"Mensagem erro: \" + report.getMessage());\n System.out.println(\"\\n\");\n }\n}", "language": "java" }, { "code": "// Em breve...", "language": "csharp", "name": "Delphi" } ] } [/block] O seguinte output é exibido no console: [block:code] { "codes": [ { "code": "Código HTTP do erro: 400\n\n===== Relatórios de erro =====\n\nCódigo de erro: G1000\nCampo associado ao erro: GetOneOrFirstPinpadRequest.SaleAffiliationKey\nMensagem erro: Propriedade nula ou vazia.\n\n\nCódigo de erro: G1001\nCampo associado ao erro: GetOneOrFirstPinpadRequest.AuthorizerUrl\nMensagem erro: URL deveria ser HTTPS.\n\n\nCódigo de erro: G1002\nCampo associado ao erro: GetOneOrFirstPinpadRequest.TmsUrl\nMensagem erro: URL inválido.", "language": "text" } ] } [/block] [block:api-header] { "type": "basic", "title": "Tabela de código de erro" } [/block] [block:parameters] { "data": { "h-0": "Código", "h-1": "Mensagem", "0-0": "C1000", "0-1": "Pinpad desconectado.", "1-0": "C1001", "1-1": "Erro de rede. Verifique a sua conexão com a internet.", "2-0": "D2000", "2-1": "A mensagem deve ter no máximo 16 caracteres.", "3-0": "D3000", "3-1": "O valor da transação é inválido. O valor deve ser superior a zero.", "4-0": "D3001", "4-1": "O ITK (Initiator Transaction Key) é inválido. O ITK não pode estar vazio, mas precisa ser menor que 128 caracteres.", "5-0": "D3002", "5-1": "O número de parcelamentos deve ser maior que zero.", "6-0": "D3003", "6-1": "Um cartão expirado foi inserido/passado.", "7-0": "D3004", "7-1": "Impossível cancelar transação que não foi autorizada.", "8-0": "D3005", "8-1": "ITK e ATK estão nulos/vazios. Uma transação só pode ser cancelada com um dos identificadores (ATK ou ITK).", "9-0": "D3006", "9-1": "O cartão não requer leitura da senha.", "10-0": "D4000", "10-1": "Este StoneCode não existe ou não tem este produto habilitado.", "11-0": "D4001", "11-1": "Padrão inválido de StoneCode. Apenas sequencias numéricas de nove digitos são aceitas.", "12-0": "G1000", "12-1": "Propriedade nula ou vazia.", "13-0": "G1001", "13-1": "URL deveria ser HTTPS.", "14-0": "G1002", "14-1": "URL inválido.", "15-0": "G1003", "15-1": "Propriedade com valor desconhecido.", "16-0": "G1004", "16-1": "Propriedade com valor não definido.", "17-0": "G1005", "17-1": "O valor informado não pode ser menor do que zero.", "18-0": "G1006", "18-1": "A propriedade possui valor menor do que seu valor mínimo.", "19-0": "G1008", "19-1": "Nenhum valor foi escolhido dentro do range informado ou dentro das opções passadas.", "20-0": "G1009", "20-1": "Esta tecla não pode ser aceita.", "21-0": "G1010", "21-1": "A label no menu navegável deve ter no máximo 15 caracteres.", "22-0": "P1000", "22-1": "Pinpad não encontrado.", "23-0": "R1000", "23-1": "Comando executado com sucesso.", "24-0": "R1001", "24-1": "Erro interno, situação inesperada com código de erro específico.", "25-0": "R1002", "25-1": "Tempo de operação excedido.", "26-0": "R1003", "26-1": "A operação foi cancelada pelo operado. Tecla de CANCEL foi pressionada.", "27-0": "R1100", "27-1": "Primeira tecla FUNCTION foi pressionada.", "28-0": "R1101", "28-1": "Segunda tecla FUNCTION foi pressionada.", "29-0": "R1102", "29-1": "Terceira tecla FUNCTION foi pressionada.", "30-0": "R1103", "30-1": "Quarta tecla FUNCTION foi pressionada.", "31-0": "R1104", "31-1": "Tecla CLEAR foi pressionada.", "32-1": "Tecla CANCEL foi pressionada.", "32-0": "R1105", "33-0": "R1200", "33-1": "Comunicação com o pinpad não foi aberta. Verifique a chamada ao método IPinpadService.OpenPinpadConnection.", "34-0": "R1201", "34-1": "Tentativa de usar comunicação segurança inválida.", "35-0": "R1202", "35-1": "Tamanho da resposta ultrapassou tamanho limite.", "36-0": "R1300", "36-1": "Secure Access Module (SAM) está faltando, mudo ou erro de comunicação.", "37-1": "Chamada a uma função inválida, faltando operação pré-requisitada ou comando desconhecido.", "37-0": "R1400", "38-0": "R1401", "39-0": "R1402", "40-0": "R1403", "38-1": "Parâmetro inválido passado para a função.", "39-1": "Um parâmetro obrigatório não foi enviado.", "40-1": "Valor da transação inválido.", "41-0": "R1500", "41-1": "Versão das tabelas EMV estão diferentes das esperadas.", "42-0": "R1501", "42-1": "Erro ao escrever tabelas.", "43-0": "R1600", "43-1": "Erro ao ler cartão de tarja magnética.", "44-0": "R1601", "44-1": "Indice de PIN online está ausente.", "45-0": "R1602", "45-1": "Nenhum cartão inserido ou contactless detectado.", "46-0": "R1603", "46-1": "Não foi possível ler o PIN por razões de segurança.", "47-0": "R1604", "47-1": "O chip do cartão está faltando ou mudo.", "48-0": "R1605", "48-1": "Erro de comunicação com o cartão.", "49-0": "R1606", "49-1": "Cartão foi invalidado.", "50-0": "R1607", "50-1": "Cartão não está se comportando como o esperado.", "51-0": "R1608", "51-1": "Cartão possui dados inválidos ou inconsistentes.", "52-0": "R1609", "52-1": "Cartão não possui aplicação EMV disponível para a condição requisitada.", "53-0": "R1610", "53-1": "Fallback por tarja magnética.", "54-0": "R1611", "54-1": "Múltiplos cartões contactless detectados a o mesmo tempo.", "55-0": "R1612", "55-1": "Erro de comunicação com cartão contactless.", "56-0": "R1613", "56-1": "Cartão contactless foi invalidado.", "57-0": "R1614", "57-1": "Cartão contactless não está se comportando como o esperado.", "58-0": "R1615", "58-1": "Aplicação do cartão contactless não deve ser utilizada nessa situação.", "59-0": "R1616", "59-1": "Cartão não possui aplicação disponível para a condição requisitada.", "60-0": "R1617", "60-1": "Contactless card selected application may not be used in this situation.", "61-0": "R1700", "61-1": "Não foi possível conectar com o pinpad.", "62-0": "R1800", "62-1": "Arquivo multimídia não encontrado.", "63-0": "R1801", "63-1": "Erro no formato do arquivo multimídia.", "64-0": "R1802", "64-1": "Erro ao carregar arquivo multimídia.", "65-0": "R1999", "65-1": "Erro interno, situação inesperada com código de erro indefinido.", "66-0": "S1000", "66-1": "Um erro interno ocorreu.", "67-0": "S1001", "67-1": "O Microtef está atualizando. Tente novamente mais tarde." }, "cols": 2, "rows": 68 } [/block]
{"__v":0,"_id":"58405de9cee8ec1900c45808","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:29:13.258Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":5,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"provedor-de-authorizer","sync_unique":"","title":"Provedor de Authorizer","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[{"__v":0,"_id":"58405ec6cee8ec1900c45809","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Através desta operação é possivel obter um Authorizer. Está é uma relação 1-para-1 com os pinpads. Ou seja, para cada pinpad será possivel obter um, e apenas um, authorizer.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f780869-cardPaymentAuthorizerContract.png\",\n        \"cardPaymentAuthorizerContract.png\",\n        543,\n        88,\n        \"#0e0c0d\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetOneOrFirstPinpadRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"17-0\": \"\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não for informado, o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se for não informado, o serviço retornará as mensagens em inglês.\",\n    \"2-0\": \"StoneCode\",\n    \"2-1\": \"string\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"StoneCode com produto habilitado.\",\n    \"3-0\": \"PinpadMessages\",\n    \"3-1\": \"DisplayableMessagesContract\",\n    \"3-2\": \"Não\",\n    \"3-3\": \"Labels para serem apresentadas na tela do pinpad. Se não for informado, o pinpad exibirá as labels default.\",\n    \"4-0\": \"PinpadPortName\",\n    \"4-1\": \"string\",\n    \"4-2\": \"Não\",\n    \"4-3\": \"Porta específica de um pinpad. Se não for fornecida, o serviço procurará um pinpad em todas as portas.\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"PinpadMessages\\\":{\\n\\t\\t\\\"ApprovedMessage\\\":\\\"Aprovado\\\",\\n\\t\\t\\\"CreditLabel\\\":\\\"Crédito\\\",\\n\\t\\t\\\"DebitLabel\\\":\\\"Débito\\\",\\n\\t\\t\\\"DeclinedMessage\\\":\\\"Não aprovada\\\",\\n\\t\\t\\\"InitializationMessage\\\":\\\"Stone Pagamentos\\\",\\n\\t\\t\\\"MainLabel\\\":\\\"Stone Pagamentos\\\",\\n\\t\\t\\\"ProcessingMessage\\\":\\\"Processando...\\\",\\n\\t\\t\\\"TransactionTypeMenuLabel\\\":\\\"\\\"\\n\\t},\\n\\t\\\"PinpadPortName\\\":\\\"COM3\\\",\\n\\t\\\"StoneCode\\\":\\\"107999962\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetOneOrFirstPinpadRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <PinpadMessages>\\n    <ApprovedMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Aprovado</ApprovedMessage>\\n    <CreditLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Crédito</CreditLabel>\\n    <DebitLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Débito</DebitLabel>\\n    <DeclinedMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Não aprovada</DeclinedMessage>\\n    <InitializationMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Stone Pagamentos</InitializationMessage>\\n    <MainLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Stone pagamentos</MainLabel>\\n    <ProcessingMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Processando...</ProcessingMessage>\\n    <TransactionTypeMenuLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\"></TransactionTypeMenuLabel>\\n  </PinpadMessages>\\n  <PinpadPortName>COM3</PinpadPortName>\\n  <StoneCode>107999962</StoneCode>\\n</GetOneOrFirstPinpadRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetOneOrFirstPinpadResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"CardPaymentAuthorizer\",\n    \"4-1\": \"CardPaymentAuthorizerContract\",\n    \"4-2\": \"Autorizadores criado se Failure igual a False.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[{\\n\\t\\t\\\"Code\\\":\\\"\\\",\\n\\t\\t\\\"Field\\\":\\\"\\\",\\n\\t\\t\\\"Message\\\":\\\"\\\"\\n\\t}],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":107999962,\\n\\t\\\"CardPaymentAuthorizer\\\": [\\n    {\\n      \\\"ConnectionName\\\": \\\"COM3\\\",\\n      \\\"PinpadInformation\\\": {\\n        \\\"IsContactless\\\": true,\\n        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n        \\\"Specifications\\\": \\\"1.08\\\"\\n      },\\n      \\\"PinpadMessages\\\": {\\n        \\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n        \\\"CreditLabel\\\": \\\"Crédito\\\",\\n        \\\"DebitLabel\\\": \\\"Débito\\\",\\n        \\\"DeclinedMessage\\\": \\\"Negado\\\",\\n        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n        \\\"TransactionTypeMenuLabel\\\": null\\n      },\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAASDAAC8F94B5ABCB448\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetOneOrFirstPinpadResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code></Code>\\n      <Field></Field>\\n      <Message></Message>\\n    </ErrorReport>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code></Code>\\n      <Field></Field>\\n      <Message></Message>\\n    </ErrorReport>\\n  </OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>107999962</StatusCode>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey>String content</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n</GetOneOrFirstPinpadResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nBusca um pinpad em todas as portas COM da máquina. Além disso, o pinpad apresentará mensagens default na tela. Mensagens de erro serão retornadas em português.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.StoneCode = stoneCode;\\nrequest.Language = \\\"pt-BR\\\";\\n\\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\\n\\nif (response.Failure != true)\\n{\\n    CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\\n};\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.setStoneCode(stoneCode);\\nrequest.setLanguage(\\\"pt-BR\\\");\\n\\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\\n\\nif (response.getFailure() != true) {\\n    CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo 2\"\n}\n[/block]\nBusca um pinpad em todas as portas COM da máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela do pinpad. Mensagens de erro serão retornadas em português.\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nDisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\\npinpadMessages.ApprovedMessage = \\\"Aprovada! :-)\\\";\\npinpadMessages.DeclinedMessage = \\\"Declinada :-(\\\";\\npinpadMessages.InitializationMessage = \\\"Olá\\\";\\npinpadMessages.MainLabel = \\\"Stone Pagamentos\\\";\\npinpadMessages.ProcessingMessage = \\\"Processando...\\\";\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.StoneCode = stoneCode;\\nrequest.Language = \\\"pt-BR\\\";\\nrequest.PinpadMessages = pinpadMessages;\\n\\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\\n\\nif (response.Failure != true)\\n{\\n    CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"DisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\\npinpadMessages.setApprovedMessage(\\\"Aprovada! :-)\\\");\\npinpadMessages.setDeclinedMessage(\\\"Declinada :-(\\\");\\npinpadMessages.setInitializationMessage(\\\"Olá\\\");\\npinpadMessages.setMainLabel(\\\"Stone Pagamentos\\\");\\npinpadMessages.setProcessingMessage(\\\"Processando...\\\");\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.setStoneCode(stoneCode);\\nrequest.setLanguage(\\\"pt-BR\\\");\\nrequest.setPinpadMessages(pinpadMessages);\\n\\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\\n\\nif (response.getFailure() != true) {\\n    CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo 3\"\n}\n[/block]\nBusca um pinpad em uma porta COM específica (COM12) da máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela do pinpad. Mensagens de erro serão retornadas em português.\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\nDisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\\npinpadMessages.ApprovedMessage = \\\"Aprovada! :-)\\\";\\npinpadMessages.DeclinedMessage = \\\"Declinada :-(\\\";\\npinpadMessages.InitializationMessage = \\\"Olá\\\";\\npinpadMessages.MainLabel = \\\"Stone Pagamentos\\\";\\npinpadMessages.ProcessingMessage = \\\"Processando...\\\";\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.StoneCode = stoneCode;\\nrequest.Language = \\\"pt-BR\\\";\\nrequest.PinpadMessages = pinpadMessages;\\npinpadRequest.PinpadPortName = \\\"COM12\\\";\\n\\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\\n\\nif (response.Failure != true)\\n{\\n    CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"DisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\\npinpadMessages.setApprovedMessage(\\\"Aprovada! :-)\\\");\\npinpadMessages.setDeclinedMessage(\\\"Declinada :-(\\\");\\npinpadMessages.setInitializationMessage(\\\"Olá\\\");\\npinpadMessages.setMainLabel(\\\"Stone Pagamentos\\\");\\npinpadMessages.setProcessingMessage(\\\"Processando...\\\");\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.setStoneCode(stoneCode);\\nrequest.setLanguage(\\\"pt-BR\\\");\\nrequest.setPinpadMessages(pinpadMessages);\\npinpadRequest.setPinpadPortName(\\\"COM12\\\");\\n\\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\\n\\nif (response.getFailure() != true) {\\n    CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:32:54.181Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":0,"parentDoc":"58405de9cee8ec1900c45808","project":"584054a2e3e04b230055c6b0","slug":"getoneorfirstpinpad","sync_unique":"","title":"GetOneOrFirstPinpad","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405ed129e3ff0f000d85ec","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Através desta operação é possivel obter uma lista de Authorizers. Cada Authorizer corresponde a um pinpad conectado à máquina.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4706481-cardPaymentAuthorizerContract2.png\",\n        \"cardPaymentAuthorizerContract2.png\",\n        759,\n        250,\n        \"#0e0d0e\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetAllPinpadsRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não for informado, o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não for informado, o serviço retornará as mensagens em inglês.\",\n    \"2-0\": \"StoneCode\",\n    \"2-1\": \"string\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"StoneCode com Microtef habilitado.\",\n    \"3-0\": \"PinpadMessages\",\n    \"3-1\": \"DisplayableMessagesContract\",\n    \"3-2\": \"Não\",\n    \"3-3\": \"Labels para serem apresentadas na tela do pinpad. Se não for informado, o pinpad exibirá as labels default.\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"Language\\\":\\\"en-US\\\",\\n  \\\"RequestKey\\\": \\\"\\\",\\n  \\\"PinpadMessages\\\":{\\n    \\\"ApprovedMessage\\\":\\\"Aprovado\\\",\\n    \\\"CreditLabel\\\":\\\"Crédito\\\",\\n    \\\"DebitLabel\\\":\\\"Débito\\\",\\n    \\\"DeclinedMessage\\\":\\\"Não aprovado\\\",\\n    \\\"InitializationMessage\\\":\\\"Stone Pagamentos\\\",\\n    \\\"MainLabel\\\":\\\"Stone Pagamentos\\\",\\n    \\\"ProcessingMessage\\\":\\\"Processando...\\\",\\n    \\\"TransactionTypeMenuLabel\\\":\\\"OK\\\"\\n  },\\n  \\\"StoneCode\\\":\\\"1075488962\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetAllPinpadsRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>en-US</Language>\\n  <RequestKey>String content</RequestKey>\\n  <PinpadMessages>\\n    <ApprovedMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Aprovado</ApprovedMessage>\\n    <CreditLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Crédito</CreditLabel>\\n    <DebitLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Débito</DebitLabel>\\n    <DeclinedMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Não aprovado</DeclinedMessage>\\n    <InitializationMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Stone Pagamentos</InitializationMessage>\\n    <MainLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Stone Pagamentos</MainLabel>\\n    <ProcessingMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Processando...</ProcessingMessage>\\n    <TransactionTypeMenuLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\"></TransactionTypeMenuLabel>\\n  </PinpadMessages>\\n  <StoneCode>1075488962</StoneCode>\\n</GetAllPinpadsRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetAllPinpadsResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"CardPaymentAuthorizerCollection\",\n    \"4-1\": \"ICollection<CardPaymentAuthorizerContract>\",\n    \"4-2\": \"Se Failure igual a False, múltiplos autorizadores serão retornados aqui.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"Failure\\\": false,\\n  \\\"OperationErrors\\\": [],\\n  \\\"RequestKey\\\": \\\"1\\\",\\n  \\\"StatusCode\\\": 200,\\n  \\\"CardPaymentAuthorizerCollection\\\": [\\n    {\\n      \\\"ConnectionName\\\": \\\"COM3\\\",\\n      \\\"PinpadInformation\\\": {\\n        \\\"IsContactless\\\": true,\\n        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n        \\\"Specifications\\\": \\\"1.08\\\"\\n      },\\n      \\\"PinpadMessages\\\": {\\n        \\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n        \\\"CreditLabel\\\": \\\"Crédito\\\",\\n        \\\"DebitLabel\\\": \\\"Débito\\\",\\n        \\\"DeclinedMessage\\\": \\\"Negado\\\",\\n        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n        \\\"TransactionTypeMenuLabel\\\": null\\n      },\\n      \\\"SaleAffiliationKey\\\": \\\"DE756D15640B4242BEC8F94B5ABCB448\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetAllPinpadsResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors>  </OperationErrors>\\n  <RequestKey>1</RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <CardPaymentAuthorizerCollection>\\n    <CardPaymentAuthorizerContract xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <ConnectionName>COM3</ConnectionName>\\n      <PinpadInformation>\\n        <IsContactless>true</IsContactless>\\n        <ManufacturerName>GERTEC</ManufacturerName>\\n        <ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n        <Model>PPC920;10MB;U</Model>\\n        <OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n        <SerialNumber>7101761507003063 </SerialNumber>\\n        <Specifications>1.08</Specifications>\\n      </PinpadInformation>\\n      <PinpadMessages>\\n        <ApprovedMessage >Aprovado</ApprovedMessage>\\n        <CreditLabel>Crédito</CreditLabel>\\n        <DebitLabel >Débito</DebitLabel>\\n        <DeclinedMessage >Negado</DeclinedMessage>\\n        <InitializationMessage>Iniciando</InitializationMessage>\\n        <MainLabel>Stone Pagamentos</MainLabel>\\n        <ProcessingMessage>Processando...</ProcessingMessage>\\n        <TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n      </PinpadMessages>\\n      <SaleAffiliationKey>String content</SaleAffiliationKey>\\n    </CardPaymentAuthorizerContract>\\n    <CardPaymentAuthorizerContract xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <ConnectionName>String content</ConnectionName>\\n      <PinpadInformation>\\n        <IsContactless>true</IsContactless>\\n        <ManufacturerName>GERTEC</ManufacturerName>\\n        <ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n        <Model>PPC920;10MB;U</Model>\\n        <OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n        <SerialNumber>7101761507003063 </SerialNumber>\\n        <Specifications>1.08</Specifications>\\n      </PinpadInformation>\\n      <PinpadMessages>\\n        <ApprovedMessage >Aprovado</ApprovedMessage>\\n        <CreditLabel>Crédito</CreditLabel>\\n        <DebitLabel >Débito</DebitLabel>\\n        <DeclinedMessage >Negado</DeclinedMessage>\\n        <InitializationMessage>Iniciando</InitializationMessage>\\n        <MainLabel>Stone Pagamentos</MainLabel>\\n        <ProcessingMessage>Processando...</ProcessingMessage>\\n        <TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n      </PinpadMessages>\\n      <SaleAffiliationKey>DE756D68F20BASDFSEC8F94B5ABCB448</SaleAffiliationKey>\\n    </CardPaymentAuthorizerContract>\\n  </CardPaymentAuthorizerCollection>\\n</GetAllPinpadsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Header\"\n}\n[/block]\nBusca todos os pinpad conectados à máquina. Além disso, o pinpad apresentará mensagens default na tela. Mensagens de erro serão retornadas em português.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\\nrequest.StoneCode = stoneCode;\\nGetAllPinpadsResponse response = service.GetAllPinpads(request);\\n\\nif (response.Failure != true)\\n{\\n    CardPaymentAuthorizerContract[] authorizer = response.CardPaymentAuthorizerCollection;\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"\\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\\nrequest.setStoneCode(stoneCode);\\nGetAllPinpadsResponse response = service.getAllPinpads(request);\\n\\nif (response.getFailure() != true) {\\n    CardPaymentAuthorizerContract[] authorizer = response.\\n        getCardPaymentAuthorizerCollection();\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nBusca todos os pinpad conectados à máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela de cada pinpad. Mensagens de erro serão retornadas em português.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nDisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\\npinpadMessages.ApprovedMessage = \\\"Aprovada! :-)\\\";\\npinpadMessages.DeclinedMessage = \\\"Declinada :-(\\\";\\npinpadMessages.InitializationMessage = \\\"Olá\\\";\\npinpadMessages.MainLabel =\\\"Stone Pagamentos\\\";\\npinpadMessages.ProcessingMessage = \\\"Processando...\\\";\\n\\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\\nrequest.Language = \\\"pt-BR\\\";\\nrequest.StoneCode = stoneCode;\\nrequest.Language = \\\"pt-BR\\\";\\nrequest.PinpadMessages = pinpadMessages;\\n\\nGetAllPinpadsResponse response = service.GetAllPinpads(request);\\n\\nif (response.Failure != true)\\n{\\n    CardPaymentAuthorizerContract[] authorizer = response.CardPaymentAuthorizerCollection;\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"DisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\\npinpadMessages.setApprovedMessage(\\\"Aprovada! :-)\\\");\\npinpadMessages.setDeclinedMessage(\\\"Declinada :-(\\\");\\npinpadMessages.setInitializationMessage(\\\"Olá\\\");\\npinpadMessages.setMainLabel(\\\"Stone Pagamentos\\\");\\npinpadMessages.setProcessingMessage(\\\"Processando...\\\");\\n\\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\\nrequest.setLanguage(\\\"pt-BR\\\");\\nrequest.setStoneCode(stoneCode);\\nrequest.setLanguage(\\\"pt-BR\\\");\\nrequest.setPinpadMessages(pinpadMessages);\\n\\nGetAllPinpadsResponse response = service.getAllPinpads(request);\\n\\nif (response.getFailure() != true) {\\n    CardPaymentAuthorizerContract[] authorizer = response.\\n        getCardPaymentAuthorizerCollection();\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:33:05.434Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":1,"parentDoc":"58405de9cee8ec1900c45808","project":"584054a2e3e04b230055c6b0","slug":"getallpinpads","sync_unique":"","title":"GetAllPinpads","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405eedcee8ec1900c4580a","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Através desta operação é possível obter **um Authorizer que já tenha sido previamente criado pela operação** ``**GetOneOrFirstPinpad**``.\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"RetrieveAvailableDeviceRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não for informado, o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se for não informado, o serviço retornará as mensagens em inglês.\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"String content\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<RetrieveAvailableDeviceRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n</RetrieveAvailableDeviceRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"RetrieveAvailableDeviceResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"CardPaymentAuthorizer\",\n    \"4-1\": \"CardPaymentAuthorizerContract\",\n    \"4-2\": \"Autorizadores disponível, se Failure igual a False.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"Failure\\\": false,\\n  \\\"OperationErrors\\\": [],\\n  \\\"RequestKey\\\": \\\"ee572532-c796-4e82-814e-d3ec49d7205b\\\",\\n  \\\"StatusCode\\\": 200,\\n  \\\"CardPaymentAuthorizer\\\": {\\n    \\\"ConnectionName\\\": \\\"COM3\\\",\\n    \\\"PinpadInformation\\\": {\\n      \\\"IsContactless\\\": true,\\n      \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n      \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n      \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n      \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n      \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n      \\\"Specifications\\\": \\\"1.08\\\"\\n    },\\n\\t\\t\\\"PinpadMessages\\\": {\\n        \\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n        \\\"CreditLabel\\\": \\\"Crédito\\\",\\n        \\\"DebitLabel\\\": \\\"Débito\\\",\\n        \\\"DeclinedMessage\\\": \\\"Negado\\\",\\n        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n        \\\"TransactionTypeMenuLabel\\\": null\\n      },\\n    \\\"SaleAffiliationKey\\\": \\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<RetrieveAvailableDeviceResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors> </OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n</RetrieveAvailableDeviceResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();            \\n\\n// ... Faz a conexão com um pinpad ...\\n\\nRetrieveAvailableDeviceRequest request = new RetrieveAvailableDeviceRequest();\\nRetrieveAvailableDeviceResponse response = service.RetrieveAvailableDevice(request);\\nCardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"IMicroPosServiceProxy service = new IMicroPosServiceProxy();\\n\\n// ... Faz a conexão com um pinpad ...\\n\\nRetrieveAvailableDeviceRequest request = new RetrieveAvailableDeviceRequest();\\nRetrieveAvailableDeviceResponse response = service.RetrieveAvailableDevice(request);\\nCardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:33:33.537Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":2,"parentDoc":"58405de9cee8ec1900c45808","project":"584054a2e3e04b230055c6b0","slug":"retrieveavailabledevice","sync_unique":"","title":"RetrieveAvailableDevice","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405f08c050731900063534","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Através desta operação é possivel obter **um Authorizer disponivel desde que tenham sido criados pelas operações** ``GetOneOrFirstPinpad`` ou ``GetAllPinpads``.\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"RetrieveAvailableDevicesRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-br\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<RetrieveAvailableDevicesRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n</RetrieveAvailableDevicesRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"RetrieveAvailableDevicesResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o ``Failure`` seja ``True``.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"CardPaymentAuthorizerCollection\",\n    \"4-1\": \"ICollection <CardPaymentAuthorizerContract>\",\n    \"4-2\": \"Multiplos autorizadores disponiveis. Se ``Failure`` igual a ``False``.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\": \\\"ee572532-c796-4e82-814e-d3ec49d7205b\\\",\\n\\t\\\"StatusCode\\\": 200,\\n\\t\\\"CardPaymentAuthorizer\\\": {\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\\"IsContactless\\\": true,\\n\\t\\t\\t\\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t},\\n\\t\\t\\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t},\\n\\t\\t\\t\\\"SaleAffiliationKey\\\": \\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t}]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<RetrieveAvailableDevicesResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors> </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <CardPaymentAuthorizerCollection>\\n    <CardPaymentAuthorizerContract xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n\\t\\t<ConnectionName >COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n\\t\\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n    </CardPaymentAuthorizerContract>\\n    <CardPaymentAuthorizerContract xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n\\t\\t<ConnectionName >COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n\\t\\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n    </CardPaymentAuthorizerContract>\\n  </CardPaymentAuthorizerCollection>\\n</RetrieveAvailableDevicesResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\n// ... Faz a conexão com 3 pinpad conectados à máquina ...\\n\\nRetrieveAvailableDevicesRequest request = new RetrieveAvailableDevicesRequest();\\nRetrieveAvailableDevicesResponse response = service.RetrieveAvailableDevices(request);\\nCardPaymentAuthorizerContract[] athorizers = response.CardPaymentAuthorizerCollection;\\n\\nConsole.Write(\\\"Pinpads disponíveis: \\\" + athorizers.Length);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"IMicroPosServiceProxy service = new IMicroPosServiceProxy();\\n\\n// ... Faz a conexão com 3 pinpad conectados à máquina ...\\n\\nRetrieveAvailableDevicesRequest request = new RetrieveAvailableDevicesRequest();\\nGetAvailableDevicesResponse response = service.getAvailableDevices(request);\\nCardPaymentAuthorizerContract [] athorizers = response.getCardPaymentAuthorizerCollection();\\n\\nSystem.out.println(\\\"Pinpads disponíveis: \\\" + authorizers.length);\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\n**Output esperado:**\n\n``Pinpads disponíveis: 3``","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:34:00.537Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":3,"parentDoc":"58405de9cee8ec1900c45808","project":"584054a2e3e04b230055c6b0","slug":"retrieveavailabledevices","sync_unique":"","title":"RetrieveAvailableDevices","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"}]}

Provedor de Authorizer


{"__v":0,"_id":"58594bf621661625009d783e","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Através desta operação é possivel obter um Authorizer. Está é uma relação 1-para-1 com os pinpads. Ou seja, para cada pinpad será possivel obter um, e apenas um, authorizer.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/3d5a8cc-cardPaymentAuthorizerContract.png\",\n        \"cardPaymentAuthorizerContract.png\",\n        543,\n        88,\n        \"#0e0c0d\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetOneOrFirstPinpadRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"2-1\": \"string\",\n    \"4-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"4-2\": \"Não\",\n    \"3-2\": \"Não\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"StoneCode\",\n    \"3-0\": \"PinpadMessages\",\n    \"3-1\": \"DisplayableMessagesContract\",\n    \"4-0\": \"PinpadPortName\",\n    \"0-3\": \"Identificador único da requisição. Se não for informado, o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se for não informado, o serviço retornará as mensagens em inglês.\",\n    \"2-3\": \"StoneCode com produto habilitado.\",\n    \"3-3\": \"Labels para serem apresentadas na tela do pinpad. Se não for informado, o pinpad exibirá as labels default.\",\n    \"4-3\": \"Porta específica de um pinpad. Se não for fornecida, o serviço procurará um pinpad em todas as portas.\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"PinpadMessages\\\":{\\n\\t\\t\\\"ApprovedMessage\\\":\\\"Aprovado\\\",\\n\\t\\t\\\"CreditLabel\\\":\\\"Crédito\\\",\\n\\t\\t\\\"DebitLabel\\\":\\\"Débito\\\",\\n\\t\\t\\\"DeclinedMessage\\\":\\\"Não aprovada\\\",\\n\\t\\t\\\"InitializationMessage\\\":\\\"Stone Pagamentos\\\",\\n\\t\\t\\\"MainLabel\\\":\\\"Stone Pagamentos\\\",\\n\\t\\t\\\"ProcessingMessage\\\":\\\"Processando...\\\",\\n\\t\\t\\\"TransactionTypeMenuLabel\\\":\\\"\\\"\\n\\t},\\n\\t\\\"PinpadPortName\\\":\\\"COM3\\\",\\n\\t\\\"StoneCode\\\":\\\"107999962\\\"\\n}\\n\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetOneOrFirstPinpadRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <PinpadMessages>\\n    <ApprovedMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Aprovado</ApprovedMessage>\\n    <CreditLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Crédito</CreditLabel>\\n    <DebitLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Débito</DebitLabel>\\n    <DeclinedMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Não aprovada</DeclinedMessage>\\n    <InitializationMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Stone Pagamentos</InitializationMessage>\\n    <MainLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Stone pagamentos</MainLabel>\\n    <ProcessingMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Processando...</ProcessingMessage>\\n    <TransactionTypeMenuLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\"></TransactionTypeMenuLabel>\\n  </PinpadMessages>\\n  <PinpadPortName>COM3</PinpadPortName>\\n  <StoneCode>107999962</StoneCode>\\n</GetOneOrFirstPinpadRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetOneOrFirstPinpadResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Failure\",\n    \"2-0\": \"OperationErrors\",\n    \"3-0\": \"StatusCode\",\n    \"4-0\": \"CardPaymentAuthorizer\",\n    \"0-1\": \"string\",\n    \"1-1\": \"bool\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"3-1\": \"int\",\n    \"4-1\": \"CardPaymentAuthorizerContract\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-2\": \"Autorizadores criado se Failure igual a False.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[{\\n\\t\\t\\\"Code\\\":\\\"\\\",\\n\\t\\t\\\"Field\\\":\\\"\\\",\\n\\t\\t\\\"Message\\\":\\\"\\\"\\n\\t}],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":107999962,\\n\\t\\\"CardPaymentAuthorizer\\\": [\\n    {\\n      \\\"ConnectionName\\\": \\\"COM3\\\",\\n      \\\"PinpadInformation\\\": {\\n        \\\"IsContactless\\\": true,\\n        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n        \\\"Specifications\\\": \\\"1.08\\\"\\n      },\\n      \\\"PinpadMessages\\\": {\\n        \\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n        \\\"CreditLabel\\\": \\\"Crédito\\\",\\n        \\\"DebitLabel\\\": \\\"Débito\\\",\\n        \\\"DeclinedMessage\\\": \\\"Negado\\\",\\n        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n        \\\"TransactionTypeMenuLabel\\\": null\\n      },\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAASDAAC8F94B5ABCB448\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetOneOrFirstPinpadResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code></Code>\\n      <Field></Field>\\n      <Message></Message>\\n    </ErrorReport>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code></Code>\\n      <Field></Field>\\n      <Message></Message>\\n    </ErrorReport>\\n  </OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>107999962</StatusCode>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey>String content</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n</GetOneOrFirstPinpadResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nBusca um pinpad em todas as portas COM da máquina. Além disso, o pinpad apresentará mensagens default na tela. Mensagens de erro serão retornadas em português.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.StoneCode = stoneCode;\\nrequest.Language = \\\"pt-BR\\\";\\n\\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\\n\\nif (response.Failure != true)\\n{\\n    CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\\n};\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.setStoneCode(stoneCode);\\nrequest.setLanguage(\\\"pt-BR\\\");\\n\\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\\n\\nif (response.getFailure() != true) {\\n    CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ..\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo 2\"\n}\n[/block]\nBusca um pinpad em todas as portas COM da máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela do pinpad. Mensagens de erro serão retornadas em português.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.StoneCode = stoneCode;\\nrequest.Language = \\\"pt-BR\\\";\\n\\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\\n\\nif (response.Failure != true)\\n{\\n    CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\\n};\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.setStoneCode(stoneCode);\\nrequest.setLanguage(\\\"pt-BR\\\");\\n\\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\\n\\nif (response.getFailure() != true) {\\n    CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo 3\"\n}\n[/block]\nBusca um pinpad em uma porta COM específica (COM12) da máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela do pinpad. Mensagens de erro serão retornadas em português.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nDisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\\npinpadMessages.ApprovedMessage = \\\"Aprovada! :-)\\\";\\npinpadMessages.DeclinedMessage = \\\"Declinada :-(\\\";\\npinpadMessages.InitializationMessage = \\\"Olá\\\";\\npinpadMessages.MainLabel = \\\"Stone Pagamentos\\\";\\npinpadMessages.ProcessingMessage = \\\"Processando...\\\";\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.StoneCode = stoneCode;\\nrequest.Language = \\\"pt-BR\\\";\\nrequest.PinpadMessages = pinpadMessages;\\n\\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\\n\\nif (response.Failure != true)\\n{\\n    CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"DisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\\npinpadMessages.setApprovedMessage(\\\"Aprovada! :-)\\\");\\npinpadMessages.setDeclinedMessage(\\\"Declinada :-(\\\");\\npinpadMessages.setInitializationMessage(\\\"Olá\\\");\\npinpadMessages.setMainLabel(\\\"Stone Pagamentos\\\");\\npinpadMessages.setProcessingMessage(\\\"Processando...\\\");\\n\\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\\nrequest.setStoneCode(stoneCode);\\nrequest.setLanguage(\\\"pt-BR\\\");\\nrequest.setPinpadMessages(pinpadMessages);\\n\\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\\n\\nif (response.getFailure() != true) {\\n    CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T15:19:18.123Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":6,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"getoneorfirstpinpad-1","sync_unique":"","title":"GetOneOrFirstPinpad","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

GetOneOrFirstPinpad


Através desta operação é possivel obter um Authorizer. Está é uma relação 1-para-1 com os pinpads. Ou seja, para cada pinpad será possivel obter um, e apenas um, authorizer. [block:image] { "images": [ { "image": [ "https://files.readme.io/3d5a8cc-cardPaymentAuthorizerContract.png", "cardPaymentAuthorizerContract.png", 543, 88, "#0e0c0d" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "GetOneOrFirstPinpadRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "0-1": "string", "1-1": "string", "2-1": "string", "4-1": "string", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "4-2": "Não", "3-2": "Não", "1-0": "Language", "2-0": "StoneCode", "3-0": "PinpadMessages", "3-1": "DisplayableMessagesContract", "4-0": "PinpadPortName", "0-3": "Identificador único da requisição. Se não for informado, o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se for não informado, o serviço retornará as mensagens em inglês.", "2-3": "StoneCode com produto habilitado.", "3-3": "Labels para serem apresentadas na tela do pinpad. Se não for informado, o pinpad exibirá as labels default.", "4-3": "Porta específica de um pinpad. Se não for fornecida, o serviço procurará um pinpad em todas as portas." }, "cols": 4, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"PinpadMessages\":{\n\t\t\"ApprovedMessage\":\"Aprovado\",\n\t\t\"CreditLabel\":\"Crédito\",\n\t\t\"DebitLabel\":\"Débito\",\n\t\t\"DeclinedMessage\":\"Não aprovada\",\n\t\t\"InitializationMessage\":\"Stone Pagamentos\",\n\t\t\"MainLabel\":\"Stone Pagamentos\",\n\t\t\"ProcessingMessage\":\"Processando...\",\n\t\t\"TransactionTypeMenuLabel\":\"\"\n\t},\n\t\"PinpadPortName\":\"COM3\",\n\t\"StoneCode\":\"107999962\"\n}\n", "language": "json" }, { "code": "<GetOneOrFirstPinpadRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <PinpadMessages>\n <ApprovedMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Aprovado</ApprovedMessage>\n <CreditLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Crédito</CreditLabel>\n <DebitLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Débito</DebitLabel>\n <DeclinedMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Não aprovada</DeclinedMessage>\n <InitializationMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Stone Pagamentos</InitializationMessage>\n <MainLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Stone pagamentos</MainLabel>\n <ProcessingMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Processando...</ProcessingMessage>\n <TransactionTypeMenuLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\"></TransactionTypeMenuLabel>\n </PinpadMessages>\n <PinpadPortName>COM3</PinpadPortName>\n <StoneCode>107999962</StoneCode>\n</GetOneOrFirstPinpadRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetOneOrFirstPinpadResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "CardPaymentAuthorizer", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "4-1": "CardPaymentAuthorizerContract", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "Autorizadores criado se Failure igual a False." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[{\n\t\t\"Code\":\"\",\n\t\t\"Field\":\"\",\n\t\t\"Message\":\"\"\n\t}],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":107999962,\n\t\"CardPaymentAuthorizer\": [\n {\n \"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n \"PinpadMessages\": {\n \"ApprovedMessage\": \"Aprovado\",\n \"CreditLabel\": \"Crédito\",\n \"DebitLabel\": \"Débito\",\n \"DeclinedMessage\": \"Negado\",\n \"InitializationMessage\": \"Iniciando\",\n \"MainLabel\": \"Stone Pagamentos\",\n \"ProcessingMessage\": \"Processando...\",\n \"TransactionTypeMenuLabel\": null\n },\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAASDAAC8F94B5ABCB448\"\n\t}\n}", "language": "json" }, { "code": "<GetOneOrFirstPinpadResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>true</Failure>\n <OperationErrors>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code></Code>\n <Field></Field>\n <Message></Message>\n </ErrorReport>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code></Code>\n <Field></Field>\n <Message></Message>\n </ErrorReport>\n </OperationErrors>\n <RequestKey></RequestKey>\n <StatusCode>107999962</StatusCode>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">String content</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey>String content</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n</GetOneOrFirstPinpadResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] Busca um pinpad em todas as portas COM da máquina. Além disso, o pinpad apresentará mensagens default na tela. Mensagens de erro serão retornadas em português. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.StoneCode = stoneCode;\nrequest.Language = \"pt-BR\";\n\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\n\nif (response.Failure != true)\n{\n CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\n};", "language": "csharp" }, { "code": "GetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.setStoneCode(stoneCode);\nrequest.setLanguage(\"pt-BR\");\n\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\n\nif (response.getFailure() != true) {\n CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\n}", "language": "java" }, { "code": "// Em breve ..", "language": "csharp", "name": "Delphi" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo 2" } [/block] Busca um pinpad em todas as portas COM da máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela do pinpad. Mensagens de erro serão retornadas em português. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.StoneCode = stoneCode;\nrequest.Language = \"pt-BR\";\n\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\n\nif (response.Failure != true)\n{\n CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\n};", "language": "csharp" }, { "code": "GetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.setStoneCode(stoneCode);\nrequest.setLanguage(\"pt-BR\");\n\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\n\nif (response.getFailure() != true) {\n CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo 3" } [/block] Busca um pinpad em uma porta COM específica (COM12) da máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela do pinpad. Mensagens de erro serão retornadas em português. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nDisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\npinpadMessages.ApprovedMessage = \"Aprovada! :-)\";\npinpadMessages.DeclinedMessage = \"Declinada :-(\";\npinpadMessages.InitializationMessage = \"Olá\";\npinpadMessages.MainLabel = \"Stone Pagamentos\";\npinpadMessages.ProcessingMessage = \"Processando...\";\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.StoneCode = stoneCode;\nrequest.Language = \"pt-BR\";\nrequest.PinpadMessages = pinpadMessages;\n\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\n\nif (response.Failure != true)\n{\n CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\n}", "language": "csharp" }, { "code": "DisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\npinpadMessages.setApprovedMessage(\"Aprovada! :-)\");\npinpadMessages.setDeclinedMessage(\"Declinada :-(\");\npinpadMessages.setInitializationMessage(\"Olá\");\npinpadMessages.setMainLabel(\"Stone Pagamentos\");\npinpadMessages.setProcessingMessage(\"Processando...\");\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.setStoneCode(stoneCode);\nrequest.setLanguage(\"pt-BR\");\nrequest.setPinpadMessages(pinpadMessages);\n\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\n\nif (response.getFailure() != true) {\n CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Através desta operação é possivel obter um Authorizer. Está é uma relação 1-para-1 com os pinpads. Ou seja, para cada pinpad será possivel obter um, e apenas um, authorizer. [block:image] { "images": [ { "image": [ "https://files.readme.io/3d5a8cc-cardPaymentAuthorizerContract.png", "cardPaymentAuthorizerContract.png", 543, 88, "#0e0c0d" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "GetOneOrFirstPinpadRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "0-1": "string", "1-1": "string", "2-1": "string", "4-1": "string", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "4-2": "Não", "3-2": "Não", "1-0": "Language", "2-0": "StoneCode", "3-0": "PinpadMessages", "3-1": "DisplayableMessagesContract", "4-0": "PinpadPortName", "0-3": "Identificador único da requisição. Se não for informado, o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se for não informado, o serviço retornará as mensagens em inglês.", "2-3": "StoneCode com produto habilitado.", "3-3": "Labels para serem apresentadas na tela do pinpad. Se não for informado, o pinpad exibirá as labels default.", "4-3": "Porta específica de um pinpad. Se não for fornecida, o serviço procurará um pinpad em todas as portas." }, "cols": 4, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"PinpadMessages\":{\n\t\t\"ApprovedMessage\":\"Aprovado\",\n\t\t\"CreditLabel\":\"Crédito\",\n\t\t\"DebitLabel\":\"Débito\",\n\t\t\"DeclinedMessage\":\"Não aprovada\",\n\t\t\"InitializationMessage\":\"Stone Pagamentos\",\n\t\t\"MainLabel\":\"Stone Pagamentos\",\n\t\t\"ProcessingMessage\":\"Processando...\",\n\t\t\"TransactionTypeMenuLabel\":\"\"\n\t},\n\t\"PinpadPortName\":\"COM3\",\n\t\"StoneCode\":\"107999962\"\n}\n", "language": "json" }, { "code": "<GetOneOrFirstPinpadRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <PinpadMessages>\n <ApprovedMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Aprovado</ApprovedMessage>\n <CreditLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Crédito</CreditLabel>\n <DebitLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Débito</DebitLabel>\n <DeclinedMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Não aprovada</DeclinedMessage>\n <InitializationMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Stone Pagamentos</InitializationMessage>\n <MainLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Stone pagamentos</MainLabel>\n <ProcessingMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Processando...</ProcessingMessage>\n <TransactionTypeMenuLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\"></TransactionTypeMenuLabel>\n </PinpadMessages>\n <PinpadPortName>COM3</PinpadPortName>\n <StoneCode>107999962</StoneCode>\n</GetOneOrFirstPinpadRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetOneOrFirstPinpadResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "CardPaymentAuthorizer", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "4-1": "CardPaymentAuthorizerContract", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "Autorizadores criado se Failure igual a False." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[{\n\t\t\"Code\":\"\",\n\t\t\"Field\":\"\",\n\t\t\"Message\":\"\"\n\t}],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":107999962,\n\t\"CardPaymentAuthorizer\": [\n {\n \"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n \"PinpadMessages\": {\n \"ApprovedMessage\": \"Aprovado\",\n \"CreditLabel\": \"Crédito\",\n \"DebitLabel\": \"Débito\",\n \"DeclinedMessage\": \"Negado\",\n \"InitializationMessage\": \"Iniciando\",\n \"MainLabel\": \"Stone Pagamentos\",\n \"ProcessingMessage\": \"Processando...\",\n \"TransactionTypeMenuLabel\": null\n },\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAASDAAC8F94B5ABCB448\"\n\t}\n}", "language": "json" }, { "code": "<GetOneOrFirstPinpadResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>true</Failure>\n <OperationErrors>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code></Code>\n <Field></Field>\n <Message></Message>\n </ErrorReport>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code></Code>\n <Field></Field>\n <Message></Message>\n </ErrorReport>\n </OperationErrors>\n <RequestKey></RequestKey>\n <StatusCode>107999962</StatusCode>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">String content</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey>String content</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n</GetOneOrFirstPinpadResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] Busca um pinpad em todas as portas COM da máquina. Além disso, o pinpad apresentará mensagens default na tela. Mensagens de erro serão retornadas em português. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.StoneCode = stoneCode;\nrequest.Language = \"pt-BR\";\n\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\n\nif (response.Failure != true)\n{\n CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\n};", "language": "csharp" }, { "code": "GetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.setStoneCode(stoneCode);\nrequest.setLanguage(\"pt-BR\");\n\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\n\nif (response.getFailure() != true) {\n CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\n}", "language": "java" }, { "code": "// Em breve ..", "language": "csharp", "name": "Delphi" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo 2" } [/block] Busca um pinpad em todas as portas COM da máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela do pinpad. Mensagens de erro serão retornadas em português. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.StoneCode = stoneCode;\nrequest.Language = \"pt-BR\";\n\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\n\nif (response.Failure != true)\n{\n CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\n};", "language": "csharp" }, { "code": "GetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.setStoneCode(stoneCode);\nrequest.setLanguage(\"pt-BR\");\n\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\n\nif (response.getFailure() != true) {\n CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo 3" } [/block] Busca um pinpad em uma porta COM específica (COM12) da máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela do pinpad. Mensagens de erro serão retornadas em português. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nDisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\npinpadMessages.ApprovedMessage = \"Aprovada! :-)\";\npinpadMessages.DeclinedMessage = \"Declinada :-(\";\npinpadMessages.InitializationMessage = \"Olá\";\npinpadMessages.MainLabel = \"Stone Pagamentos\";\npinpadMessages.ProcessingMessage = \"Processando...\";\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.StoneCode = stoneCode;\nrequest.Language = \"pt-BR\";\nrequest.PinpadMessages = pinpadMessages;\n\nGetOneOrFirstPinpadResponse response = service.GetOneOrFirstPinpad(request);\n\nif (response.Failure != true)\n{\n CardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\n}", "language": "csharp" }, { "code": "DisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\npinpadMessages.setApprovedMessage(\"Aprovada! :-)\");\npinpadMessages.setDeclinedMessage(\"Declinada :-(\");\npinpadMessages.setInitializationMessage(\"Olá\");\npinpadMessages.setMainLabel(\"Stone Pagamentos\");\npinpadMessages.setProcessingMessage(\"Processando...\");\n\nGetOneOrFirstPinpadRequest request = new GetOneOrFirstPinpadRequest();\nrequest.setStoneCode(stoneCode);\nrequest.setLanguage(\"pt-BR\");\nrequest.setPinpadMessages(pinpadMessages);\n\nGetOneOrFirstPinpadResponse response = service.getOneOrFirstPinpad(request);\n\nif (response.getFailure() != true) {\n CardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"58594e01a305f83900831bd1","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Através desta operação é possivel obter uma lista de Authorizers. Cada Authorizer corresponde a um pinpad conectado à máquina.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4ec71db-cardPaymentAuthorizerContract2.png\",\n        \"cardPaymentAuthorizerContract2.png\",\n        759,\n        250,\n        \"#0e0d0e\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetAllPinpadsRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"2-2\": \"Não\",\n    \"3-2\": \"Não\",\n    \"1-2\": \"Sim\",\n    \"1-1\": \"string\",\n    \"2-1\": \"string\",\n    \"3-1\": \"DisplayableMessagesContract\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"StoneCode\",\n    \"3-0\": \"PinpadMessages\",\n    \"0-3\": \"Identificador único da requisição. Se não for informado, o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não for informado, o serviço retornará as mensagens em inglês.\",\n    \"2-3\": \"StoneCode com Microtef habilitado.\",\n    \"3-3\": \"Labels para serem apresentadas na tela do pinpad. Se não for informado, o pinpad exibirá as labels default.\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"Language\\\":\\\"en-US\\\",\\n  \\\"RequestKey\\\": \\\"\\\",\\n  \\\"PinpadMessages\\\":{\\n    \\\"ApprovedMessage\\\":\\\"Aprovado\\\",\\n    \\\"CreditLabel\\\":\\\"Crédito\\\",\\n    \\\"DebitLabel\\\":\\\"Débito\\\",\\n    \\\"DeclinedMessage\\\":\\\"Não aprovado\\\",\\n    \\\"InitializationMessage\\\":\\\"Stone Pagamentos\\\",\\n    \\\"MainLabel\\\":\\\"Stone Pagamentos\\\",\\n    \\\"ProcessingMessage\\\":\\\"Processando...\\\",\\n    \\\"TransactionTypeMenuLabel\\\":\\\"OK\\\"\\n  },\\n  \\\"StoneCode\\\":\\\"1075488962\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetAllPinpadsRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>en-US</Language>\\n  <RequestKey>String content</RequestKey>\\n  <PinpadMessages>\\n    <ApprovedMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Aprovado</ApprovedMessage>\\n    <CreditLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Crédito</CreditLabel>\\n    <DebitLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Débito</DebitLabel>\\n    <DeclinedMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Não aprovado</DeclinedMessage>\\n    <InitializationMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Stone Pagamentos</InitializationMessage>\\n    <MainLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Stone Pagamentos</MainLabel>\\n    <ProcessingMessage xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">Processando...</ProcessingMessage>\\n    <TransactionTypeMenuLabel xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\"></TransactionTypeMenuLabel>\\n  </PinpadMessages>\\n  <StoneCode>1075488962</StoneCode>\\n</GetAllPinpadsRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetAllPinpadsResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Failure\",\n    \"2-0\": \"OperationErrors\",\n    \"3-0\": \"StatusCode\",\n    \"4-0\": \"CardPaymentAuthorizerCollection\",\n    \"0-1\": \"string\",\n    \"1-1\": \"bool\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"3-1\": \"int\",\n    \"4-1\": \"ICollection<CardPaymentAuthorizerContract>\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-2\": \"Se Failure igual a False, múltiplos autorizadores serão retornados aqui.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"Failure\\\": false,\\n  \\\"OperationErrors\\\": [],\\n  \\\"RequestKey\\\": \\\"1\\\",\\n  \\\"StatusCode\\\": 200,\\n  \\\"CardPaymentAuthorizerCollection\\\": [\\n    {\\n      \\\"ConnectionName\\\": \\\"COM3\\\",\\n      \\\"PinpadInformation\\\": {\\n        \\\"IsContactless\\\": true,\\n        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n        \\\"Specifications\\\": \\\"1.08\\\"\\n      },\\n      \\\"PinpadMessages\\\": {\\n        \\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n        \\\"CreditLabel\\\": \\\"Crédito\\\",\\n        \\\"DebitLabel\\\": \\\"Débito\\\",\\n        \\\"DeclinedMessage\\\": \\\"Negado\\\",\\n        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n        \\\"TransactionTypeMenuLabel\\\": null\\n      },\\n      \\\"SaleAffiliationKey\\\": \\\"DE756D15640B4242BEC8F94B5ABCB448\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \" <GetAllPinpadsResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors>  </OperationErrors>\\n  <RequestKey>1</RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <CardPaymentAuthorizerCollection>\\n    <CardPaymentAuthorizerContract xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <ConnectionName>COM3</ConnectionName>\\n      <PinpadInformation>\\n        <IsContactless>true</IsContactless>\\n        <ManufacturerName>GERTEC</ManufacturerName>\\n        <ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n        <Model>PPC920;10MB;U</Model>\\n        <OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n        <SerialNumber>7101761507003063 </SerialNumber>\\n        <Specifications>1.08</Specifications>\\n      </PinpadInformation>\\n      <PinpadMessages>\\n        <ApprovedMessage >Aprovado</ApprovedMessage>\\n        <CreditLabel>Crédito</CreditLabel>\\n        <DebitLabel >Débito</DebitLabel>\\n        <DeclinedMessage >Negado</DeclinedMessage>\\n        <InitializationMessage>Iniciando</InitializationMessage>\\n        <MainLabel>Stone Pagamentos</MainLabel>\\n        <ProcessingMessage>Processando...</ProcessingMessage>\\n        <TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n      </PinpadMessages>\\n      <SaleAffiliationKey>String content</SaleAffiliationKey>\\n    </CardPaymentAuthorizerContract>\\n    <CardPaymentAuthorizerContract xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <ConnectionName>String content</ConnectionName>\\n      <PinpadInformation>\\n        <IsContactless>true</IsContactless>\\n        <ManufacturerName>GERTEC</ManufacturerName>\\n        <ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n        <Model>PPC920;10MB;U</Model>\\n        <OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n        <SerialNumber>7101761507003063 </SerialNumber>\\n        <Specifications>1.08</Specifications>\\n      </PinpadInformation>\\n      <PinpadMessages>\\n        <ApprovedMessage >Aprovado</ApprovedMessage>\\n        <CreditLabel>Crédito</CreditLabel>\\n        <DebitLabel >Débito</DebitLabel>\\n        <DeclinedMessage >Negado</DeclinedMessage>\\n        <InitializationMessage>Iniciando</InitializationMessage>\\n        <MainLabel>Stone Pagamentos</MainLabel>\\n        <ProcessingMessage>Processando...</ProcessingMessage>\\n        <TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n      </PinpadMessages>\\n      <SaleAffiliationKey>DE756D68F20BASDFSEC8F94B5ABCB448</SaleAffiliationKey>\\n    </CardPaymentAuthorizerContract>\\n  </CardPaymentAuthorizerCollection>\\n</GetAllPinpadsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nBusca todos os pinpad conectados à máquina. Além disso, o pinpad apresentará mensagens default na tela. Mensagens de erro serão retornadas em português.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\\nrequest.StoneCode = stoneCode;\\nGetAllPinpadsResponse response = service.GetAllPinpads(request);\\n\\nif (response.Failure != true)\\n{\\n    CardPaymentAuthorizerContract[] authorizer = response.CardPaymentAuthorizerCollection;\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetAllPinpadsRequest request = new GetAllPinpadsRequest();\\nrequest.setStoneCode(stoneCode);\\nGetAllPinpadsResponse response = service.getAllPinpads(request);\\n\\nif (response.getFailure() != true) {\\n    CardPaymentAuthorizerContract[] authorizer = response.\\n        getCardPaymentAuthorizerCollection();\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo 2\"\n}\n[/block]\nBusca todos os pinpad conectados à máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela de cada pinpad. Mensagens de erro serão retornadas em português.Busca todos os pinpad conectados à máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela de cada pinpad. Mensagens de erro serão retornadas em português.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nDisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\\npinpadMessages.ApprovedMessage = \\\"Aprovada! :-)\\\";\\npinpadMessages.DeclinedMessage = \\\"Declinada :-(\\\";\\npinpadMessages.InitializationMessage = \\\"Olá\\\";\\npinpadMessages.MainLabel =\\\"Stone Pagamentos\\\";\\npinpadMessages.ProcessingMessage = \\\"Processando...\\\";\\n\\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\\nrequest.Language = \\\"pt-BR\\\";\\nrequest.StoneCode = stoneCode;\\nrequest.Language = \\\"pt-BR\\\";\\nrequest.PinpadMessages = pinpadMessages;\\n\\nGetAllPinpadsResponse response = service.GetAllPinpads(request);\\n\\nif (response.Failure != true)\\n{\\n    CardPaymentAuthorizerContract[] authorizer = response.CardPaymentAuthorizerCollection;\\n}\\n\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"DisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\\npinpadMessages.setApprovedMessage(\\\"Aprovada! :-)\\\");\\npinpadMessages.setDeclinedMessage(\\\"Declinada :-(\\\");\\npinpadMessages.setInitializationMessage(\\\"Olá\\\");\\npinpadMessages.setMainLabel(\\\"Stone Pagamentos\\\");\\npinpadMessages.setProcessingMessage(\\\"Processando...\\\");\\n\\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\\nrequest.setLanguage(\\\"pt-BR\\\");\\nrequest.setStoneCode(stoneCode);\\nrequest.setLanguage(\\\"pt-BR\\\");\\nrequest.setPinpadMessages(pinpadMessages);\\n\\nGetAllPinpadsResponse response = service.getAllPinpads(request);\\n\\nif (response.getFailure() != true) {\\n    CardPaymentAuthorizerContract[] authorizer = response.\\n        getCardPaymentAuthorizerCollection();\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ... \",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T15:28:01.734Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":7,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"getallpinpads-1","sync_unique":"","title":"GetAllPinpads","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

GetAllPinpads


Através desta operação é possivel obter uma lista de Authorizers. Cada Authorizer corresponde a um pinpad conectado à máquina. [block:image] { "images": [ { "image": [ "https://files.readme.io/4ec71db-cardPaymentAuthorizerContract2.png", "cardPaymentAuthorizerContract2.png", 759, 250, "#0e0d0e" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "GetAllPinpadsRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "0-1": "string", "0-2": "Não", "2-2": "Não", "3-2": "Não", "1-2": "Sim", "1-1": "string", "2-1": "string", "3-1": "DisplayableMessagesContract", "1-0": "Language", "2-0": "StoneCode", "3-0": "PinpadMessages", "0-3": "Identificador único da requisição. Se não for informado, o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não for informado, o serviço retornará as mensagens em inglês.", "2-3": "StoneCode com Microtef habilitado.", "3-3": "Labels para serem apresentadas na tela do pinpad. Se não for informado, o pinpad exibirá as labels default." }, "cols": 4, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n \"Language\":\"en-US\",\n \"RequestKey\": \"\",\n \"PinpadMessages\":{\n \"ApprovedMessage\":\"Aprovado\",\n \"CreditLabel\":\"Crédito\",\n \"DebitLabel\":\"Débito\",\n \"DeclinedMessage\":\"Não aprovado\",\n \"InitializationMessage\":\"Stone Pagamentos\",\n \"MainLabel\":\"Stone Pagamentos\",\n \"ProcessingMessage\":\"Processando...\",\n \"TransactionTypeMenuLabel\":\"OK\"\n },\n \"StoneCode\":\"1075488962\"\n}", "language": "json" }, { "code": "<GetAllPinpadsRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>en-US</Language>\n <RequestKey>String content</RequestKey>\n <PinpadMessages>\n <ApprovedMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Aprovado</ApprovedMessage>\n <CreditLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Crédito</CreditLabel>\n <DebitLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Débito</DebitLabel>\n <DeclinedMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Não aprovado</DeclinedMessage>\n <InitializationMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Stone Pagamentos</InitializationMessage>\n <MainLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Stone Pagamentos</MainLabel>\n <ProcessingMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Processando...</ProcessingMessage>\n <TransactionTypeMenuLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\"></TransactionTypeMenuLabel>\n </PinpadMessages>\n <StoneCode>1075488962</StoneCode>\n</GetAllPinpadsRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetAllPinpadsResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "CardPaymentAuthorizerCollection", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "4-1": "ICollection<CardPaymentAuthorizerContract>", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "Se Failure igual a False, múltiplos autorizadores serão retornados aqui." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n \"Failure\": false,\n \"OperationErrors\": [],\n \"RequestKey\": \"1\",\n \"StatusCode\": 200,\n \"CardPaymentAuthorizerCollection\": [\n {\n \"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n \"PinpadMessages\": {\n \"ApprovedMessage\": \"Aprovado\",\n \"CreditLabel\": \"Crédito\",\n \"DebitLabel\": \"Débito\",\n \"DeclinedMessage\": \"Negado\",\n \"InitializationMessage\": \"Iniciando\",\n \"MainLabel\": \"Stone Pagamentos\",\n \"ProcessingMessage\": \"Processando...\",\n \"TransactionTypeMenuLabel\": null\n },\n \"SaleAffiliationKey\": \"DE756D15640B4242BEC8F94B5ABCB448\"\n }\n ]\n}", "language": "json" }, { "code": " <GetAllPinpadsResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey>1</RequestKey>\n <StatusCode>200</StatusCode>\n <CardPaymentAuthorizerCollection>\n <CardPaymentAuthorizerContract xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <ConnectionName>COM3</ConnectionName>\n <PinpadInformation>\n <IsContactless>true</IsContactless>\n <ManufacturerName>GERTEC</ManufacturerName>\n <ManufacturerVersion>001.04 130922</ManufacturerVersion>\n <Model>PPC920;10MB;U</Model>\n <OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n <SerialNumber>7101761507003063 </SerialNumber>\n <Specifications>1.08</Specifications>\n </PinpadInformation>\n <PinpadMessages>\n <ApprovedMessage >Aprovado</ApprovedMessage>\n <CreditLabel>Crédito</CreditLabel>\n <DebitLabel >Débito</DebitLabel>\n <DeclinedMessage >Negado</DeclinedMessage>\n <InitializationMessage>Iniciando</InitializationMessage>\n <MainLabel>Stone Pagamentos</MainLabel>\n <ProcessingMessage>Processando...</ProcessingMessage>\n <TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n </PinpadMessages>\n <SaleAffiliationKey>String content</SaleAffiliationKey>\n </CardPaymentAuthorizerContract>\n <CardPaymentAuthorizerContract xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <ConnectionName>String content</ConnectionName>\n <PinpadInformation>\n <IsContactless>true</IsContactless>\n <ManufacturerName>GERTEC</ManufacturerName>\n <ManufacturerVersion>001.04 130922</ManufacturerVersion>\n <Model>PPC920;10MB;U</Model>\n <OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n <SerialNumber>7101761507003063 </SerialNumber>\n <Specifications>1.08</Specifications>\n </PinpadInformation>\n <PinpadMessages>\n <ApprovedMessage >Aprovado</ApprovedMessage>\n <CreditLabel>Crédito</CreditLabel>\n <DebitLabel >Débito</DebitLabel>\n <DeclinedMessage >Negado</DeclinedMessage>\n <InitializationMessage>Iniciando</InitializationMessage>\n <MainLabel>Stone Pagamentos</MainLabel>\n <ProcessingMessage>Processando...</ProcessingMessage>\n <TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n </PinpadMessages>\n <SaleAffiliationKey>DE756D68F20BASDFSEC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizerContract>\n </CardPaymentAuthorizerCollection>\n</GetAllPinpadsResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] Busca todos os pinpad conectados à máquina. Além disso, o pinpad apresentará mensagens default na tela. Mensagens de erro serão retornadas em português. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\nrequest.StoneCode = stoneCode;\nGetAllPinpadsResponse response = service.GetAllPinpads(request);\n\nif (response.Failure != true)\n{\n CardPaymentAuthorizerContract[] authorizer = response.CardPaymentAuthorizerCollection;\n}", "language": "csharp" }, { "code": "GetAllPinpadsRequest request = new GetAllPinpadsRequest();\nrequest.setStoneCode(stoneCode);\nGetAllPinpadsResponse response = service.getAllPinpads(request);\n\nif (response.getFailure() != true) {\n CardPaymentAuthorizerContract[] authorizer = response.\n getCardPaymentAuthorizerCollection();\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo 2" } [/block] Busca todos os pinpad conectados à máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela de cada pinpad. Mensagens de erro serão retornadas em português.Busca todos os pinpad conectados à máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela de cada pinpad. Mensagens de erro serão retornadas em português. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nDisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\npinpadMessages.ApprovedMessage = \"Aprovada! :-)\";\npinpadMessages.DeclinedMessage = \"Declinada :-(\";\npinpadMessages.InitializationMessage = \"Olá\";\npinpadMessages.MainLabel =\"Stone Pagamentos\";\npinpadMessages.ProcessingMessage = \"Processando...\";\n\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\nrequest.Language = \"pt-BR\";\nrequest.StoneCode = stoneCode;\nrequest.Language = \"pt-BR\";\nrequest.PinpadMessages = pinpadMessages;\n\nGetAllPinpadsResponse response = service.GetAllPinpads(request);\n\nif (response.Failure != true)\n{\n CardPaymentAuthorizerContract[] authorizer = response.CardPaymentAuthorizerCollection;\n}\n", "language": "csharp" }, { "code": "DisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\npinpadMessages.setApprovedMessage(\"Aprovada! :-)\");\npinpadMessages.setDeclinedMessage(\"Declinada :-(\");\npinpadMessages.setInitializationMessage(\"Olá\");\npinpadMessages.setMainLabel(\"Stone Pagamentos\");\npinpadMessages.setProcessingMessage(\"Processando...\");\n\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\nrequest.setLanguage(\"pt-BR\");\nrequest.setStoneCode(stoneCode);\nrequest.setLanguage(\"pt-BR\");\nrequest.setPinpadMessages(pinpadMessages);\n\nGetAllPinpadsResponse response = service.getAllPinpads(request);\n\nif (response.getFailure() != true) {\n CardPaymentAuthorizerContract[] authorizer = response.\n getCardPaymentAuthorizerCollection();\n}", "language": "java" }, { "code": "// Em breve ... ", "language": "csharp", "name": "Delphi" } ] } [/block]
Através desta operação é possivel obter uma lista de Authorizers. Cada Authorizer corresponde a um pinpad conectado à máquina. [block:image] { "images": [ { "image": [ "https://files.readme.io/4ec71db-cardPaymentAuthorizerContract2.png", "cardPaymentAuthorizerContract2.png", 759, 250, "#0e0d0e" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "GetAllPinpadsRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "0-1": "string", "0-2": "Não", "2-2": "Não", "3-2": "Não", "1-2": "Sim", "1-1": "string", "2-1": "string", "3-1": "DisplayableMessagesContract", "1-0": "Language", "2-0": "StoneCode", "3-0": "PinpadMessages", "0-3": "Identificador único da requisição. Se não for informado, o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não for informado, o serviço retornará as mensagens em inglês.", "2-3": "StoneCode com Microtef habilitado.", "3-3": "Labels para serem apresentadas na tela do pinpad. Se não for informado, o pinpad exibirá as labels default." }, "cols": 4, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n \"Language\":\"en-US\",\n \"RequestKey\": \"\",\n \"PinpadMessages\":{\n \"ApprovedMessage\":\"Aprovado\",\n \"CreditLabel\":\"Crédito\",\n \"DebitLabel\":\"Débito\",\n \"DeclinedMessage\":\"Não aprovado\",\n \"InitializationMessage\":\"Stone Pagamentos\",\n \"MainLabel\":\"Stone Pagamentos\",\n \"ProcessingMessage\":\"Processando...\",\n \"TransactionTypeMenuLabel\":\"OK\"\n },\n \"StoneCode\":\"1075488962\"\n}", "language": "json" }, { "code": "<GetAllPinpadsRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>en-US</Language>\n <RequestKey>String content</RequestKey>\n <PinpadMessages>\n <ApprovedMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Aprovado</ApprovedMessage>\n <CreditLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Crédito</CreditLabel>\n <DebitLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Débito</DebitLabel>\n <DeclinedMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Não aprovado</DeclinedMessage>\n <InitializationMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Stone Pagamentos</InitializationMessage>\n <MainLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Stone Pagamentos</MainLabel>\n <ProcessingMessage xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">Processando...</ProcessingMessage>\n <TransactionTypeMenuLabel xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\"></TransactionTypeMenuLabel>\n </PinpadMessages>\n <StoneCode>1075488962</StoneCode>\n</GetAllPinpadsRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetAllPinpadsResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "CardPaymentAuthorizerCollection", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "4-1": "ICollection<CardPaymentAuthorizerContract>", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "Se Failure igual a False, múltiplos autorizadores serão retornados aqui." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n \"Failure\": false,\n \"OperationErrors\": [],\n \"RequestKey\": \"1\",\n \"StatusCode\": 200,\n \"CardPaymentAuthorizerCollection\": [\n {\n \"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n \"PinpadMessages\": {\n \"ApprovedMessage\": \"Aprovado\",\n \"CreditLabel\": \"Crédito\",\n \"DebitLabel\": \"Débito\",\n \"DeclinedMessage\": \"Negado\",\n \"InitializationMessage\": \"Iniciando\",\n \"MainLabel\": \"Stone Pagamentos\",\n \"ProcessingMessage\": \"Processando...\",\n \"TransactionTypeMenuLabel\": null\n },\n \"SaleAffiliationKey\": \"DE756D15640B4242BEC8F94B5ABCB448\"\n }\n ]\n}", "language": "json" }, { "code": " <GetAllPinpadsResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey>1</RequestKey>\n <StatusCode>200</StatusCode>\n <CardPaymentAuthorizerCollection>\n <CardPaymentAuthorizerContract xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <ConnectionName>COM3</ConnectionName>\n <PinpadInformation>\n <IsContactless>true</IsContactless>\n <ManufacturerName>GERTEC</ManufacturerName>\n <ManufacturerVersion>001.04 130922</ManufacturerVersion>\n <Model>PPC920;10MB;U</Model>\n <OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n <SerialNumber>7101761507003063 </SerialNumber>\n <Specifications>1.08</Specifications>\n </PinpadInformation>\n <PinpadMessages>\n <ApprovedMessage >Aprovado</ApprovedMessage>\n <CreditLabel>Crédito</CreditLabel>\n <DebitLabel >Débito</DebitLabel>\n <DeclinedMessage >Negado</DeclinedMessage>\n <InitializationMessage>Iniciando</InitializationMessage>\n <MainLabel>Stone Pagamentos</MainLabel>\n <ProcessingMessage>Processando...</ProcessingMessage>\n <TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n </PinpadMessages>\n <SaleAffiliationKey>String content</SaleAffiliationKey>\n </CardPaymentAuthorizerContract>\n <CardPaymentAuthorizerContract xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <ConnectionName>String content</ConnectionName>\n <PinpadInformation>\n <IsContactless>true</IsContactless>\n <ManufacturerName>GERTEC</ManufacturerName>\n <ManufacturerVersion>001.04 130922</ManufacturerVersion>\n <Model>PPC920;10MB;U</Model>\n <OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n <SerialNumber>7101761507003063 </SerialNumber>\n <Specifications>1.08</Specifications>\n </PinpadInformation>\n <PinpadMessages>\n <ApprovedMessage >Aprovado</ApprovedMessage>\n <CreditLabel>Crédito</CreditLabel>\n <DebitLabel >Débito</DebitLabel>\n <DeclinedMessage >Negado</DeclinedMessage>\n <InitializationMessage>Iniciando</InitializationMessage>\n <MainLabel>Stone Pagamentos</MainLabel>\n <ProcessingMessage>Processando...</ProcessingMessage>\n <TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n </PinpadMessages>\n <SaleAffiliationKey>DE756D68F20BASDFSEC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizerContract>\n </CardPaymentAuthorizerCollection>\n</GetAllPinpadsResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] Busca todos os pinpad conectados à máquina. Além disso, o pinpad apresentará mensagens default na tela. Mensagens de erro serão retornadas em português. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\nrequest.StoneCode = stoneCode;\nGetAllPinpadsResponse response = service.GetAllPinpads(request);\n\nif (response.Failure != true)\n{\n CardPaymentAuthorizerContract[] authorizer = response.CardPaymentAuthorizerCollection;\n}", "language": "csharp" }, { "code": "GetAllPinpadsRequest request = new GetAllPinpadsRequest();\nrequest.setStoneCode(stoneCode);\nGetAllPinpadsResponse response = service.getAllPinpads(request);\n\nif (response.getFailure() != true) {\n CardPaymentAuthorizerContract[] authorizer = response.\n getCardPaymentAuthorizerCollection();\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo 2" } [/block] Busca todos os pinpad conectados à máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela de cada pinpad. Mensagens de erro serão retornadas em português.Busca todos os pinpad conectados à máquina. Além disso, faz a configuração das mensagens a serem mostradas na tela de cada pinpad. Mensagens de erro serão retornadas em português. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nDisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\npinpadMessages.ApprovedMessage = \"Aprovada! :-)\";\npinpadMessages.DeclinedMessage = \"Declinada :-(\";\npinpadMessages.InitializationMessage = \"Olá\";\npinpadMessages.MainLabel =\"Stone Pagamentos\";\npinpadMessages.ProcessingMessage = \"Processando...\";\n\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\nrequest.Language = \"pt-BR\";\nrequest.StoneCode = stoneCode;\nrequest.Language = \"pt-BR\";\nrequest.PinpadMessages = pinpadMessages;\n\nGetAllPinpadsResponse response = service.GetAllPinpads(request);\n\nif (response.Failure != true)\n{\n CardPaymentAuthorizerContract[] authorizer = response.CardPaymentAuthorizerCollection;\n}\n", "language": "csharp" }, { "code": "DisplayableMessagesContract pinpadMessages = new DisplayableMessagesContract();\npinpadMessages.setApprovedMessage(\"Aprovada! :-)\");\npinpadMessages.setDeclinedMessage(\"Declinada :-(\");\npinpadMessages.setInitializationMessage(\"Olá\");\npinpadMessages.setMainLabel(\"Stone Pagamentos\");\npinpadMessages.setProcessingMessage(\"Processando...\");\n\nGetAllPinpadsRequest request = new GetAllPinpadsRequest();\nrequest.setLanguage(\"pt-BR\");\nrequest.setStoneCode(stoneCode);\nrequest.setLanguage(\"pt-BR\");\nrequest.setPinpadMessages(pinpadMessages);\n\nGetAllPinpadsResponse response = service.getAllPinpads(request);\n\nif (response.getFailure() != true) {\n CardPaymentAuthorizerContract[] authorizer = response.\n getCardPaymentAuthorizerCollection();\n}", "language": "java" }, { "code": "// Em breve ... ", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"58594ff48f0b4a2f00697899","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Através desta operação é possível obter **um Authorizer que já tenha sido previamente criado pela operação** GetOneOrFirstPinpad.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"RetrieveAvailableDeviceRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não for informado, o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se for não informado, o serviço retornará as mensagens em inglês.\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"String content\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<RetrieveAvailableDeviceRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n</RetrieveAvailableDeviceRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"RetrieveAvailableDeviceResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Failure\",\n    \"2-0\": \"OperationErrors\",\n    \"3-0\": \"StatusCode\",\n    \"4-0\": \"CardPaymentAuthorizer\",\n    \"0-1\": \"string\",\n    \"1-1\": \"bool\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"3-1\": \"int\",\n    \"4-1\": \"CardPaymentAuthorizerContract\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-2\": \"Autorizadores disponível, se Failure igual a False.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"Failure\\\": false,\\n  \\\"OperationErrors\\\": [],\\n  \\\"RequestKey\\\": \\\"ee572532-c796-4e82-814e-d3ec49d7205b\\\",\\n  \\\"StatusCode\\\": 200,\\n  \\\"CardPaymentAuthorizer\\\": {\\n    \\\"ConnectionName\\\": \\\"COM3\\\",\\n    \\\"PinpadInformation\\\": {\\n      \\\"IsContactless\\\": true,\\n      \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n      \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n      \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n      \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n      \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n      \\\"Specifications\\\": \\\"1.08\\\"\\n    },\\n\\t\\t\\\"PinpadMessages\\\": {\\n        \\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n        \\\"CreditLabel\\\": \\\"Crédito\\\",\\n        \\\"DebitLabel\\\": \\\"Débito\\\",\\n        \\\"DeclinedMessage\\\": \\\"Negado\\\",\\n        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n        \\\"TransactionTypeMenuLabel\\\": null\\n      },\\n    \\\"SaleAffiliationKey\\\": \\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<RetrieveAvailableDeviceResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors> </OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n</RetrieveAvailableDeviceResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();            \\n\\n// ... Faz a conexão com um pinpad ...\\n\\nRetrieveAvailableDeviceRequest request = new RetrieveAvailableDeviceRequest();\\nRetrieveAvailableDeviceResponse response = service.RetrieveAvailableDevice(request);\\nCardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"IMicroPosServiceProxy service = new IMicroPosServiceProxy();\\n\\n// ... Faz a conexão com um pinpad ...\\n\\nRetrieveAvailableDeviceRequest request = new RetrieveAvailableDeviceRequest();\\nRetrieveAvailableDeviceResponse response = service.RetrieveAvailableDevice(request);\\nCardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T15:36:20.797Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":8,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"retrieveavailabledevice-1","sync_unique":"","title":"RetrieveAvailableDevice","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

RetrieveAvailableDevice


Através desta operação é possível obter **um Authorizer que já tenha sido previamente criado pela operação** GetOneOrFirstPinpad. [block:api-header] { "type": "basic", "title": "RetrieveAvailableDeviceRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "0-1": "string", "1-1": "string", "0-2": "Não", "1-2": "Não", "0-3": "Identificador único da requisição. Se não for informado, o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se for não informado, o serviço retornará as mensagens em inglês." }, "cols": 4, "rows": 2 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"String content\"\n}", "language": "json" }, { "code": "<RetrieveAvailableDeviceRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n</RetrieveAvailableDeviceRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "RetrieveAvailableDeviceResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "CardPaymentAuthorizer", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "4-1": "CardPaymentAuthorizerContract", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "Autorizadores disponível, se Failure igual a False." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n \"Failure\": false,\n \"OperationErrors\": [],\n \"RequestKey\": \"ee572532-c796-4e82-814e-d3ec49d7205b\",\n \"StatusCode\": 200,\n \"CardPaymentAuthorizer\": {\n \"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n\t\t\"PinpadMessages\": {\n \"ApprovedMessage\": \"Aprovado\",\n \"CreditLabel\": \"Crédito\",\n \"DebitLabel\": \"Débito\",\n \"DeclinedMessage\": \"Negado\",\n \"InitializationMessage\": \"Iniciando\",\n \"MainLabel\": \"Stone Pagamentos\",\n \"ProcessingMessage\": \"Processando...\",\n \"TransactionTypeMenuLabel\": null\n },\n \"SaleAffiliationKey\": \"DE756D68F20BAWEAC8F94B5ABCB448\"\n }\n}", "language": "json" }, { "code": "<RetrieveAvailableDeviceResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey></RequestKey>\n <StatusCode>2147483647</StatusCode>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n</RetrieveAvailableDeviceResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient(); \n\n// ... Faz a conexão com um pinpad ...\n\nRetrieveAvailableDeviceRequest request = new RetrieveAvailableDeviceRequest();\nRetrieveAvailableDeviceResponse response = service.RetrieveAvailableDevice(request);\nCardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;", "language": "csharp" }, { "code": "IMicroPosServiceProxy service = new IMicroPosServiceProxy();\n\n// ... Faz a conexão com um pinpad ...\n\nRetrieveAvailableDeviceRequest request = new RetrieveAvailableDeviceRequest();\nRetrieveAvailableDeviceResponse response = service.RetrieveAvailableDevice(request);\nCardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Através desta operação é possível obter **um Authorizer que já tenha sido previamente criado pela operação** GetOneOrFirstPinpad. [block:api-header] { "type": "basic", "title": "RetrieveAvailableDeviceRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "0-1": "string", "1-1": "string", "0-2": "Não", "1-2": "Não", "0-3": "Identificador único da requisição. Se não for informado, o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se for não informado, o serviço retornará as mensagens em inglês." }, "cols": 4, "rows": 2 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"String content\"\n}", "language": "json" }, { "code": "<RetrieveAvailableDeviceRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n</RetrieveAvailableDeviceRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "RetrieveAvailableDeviceResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "CardPaymentAuthorizer", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "4-1": "CardPaymentAuthorizerContract", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "Autorizadores disponível, se Failure igual a False." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n \"Failure\": false,\n \"OperationErrors\": [],\n \"RequestKey\": \"ee572532-c796-4e82-814e-d3ec49d7205b\",\n \"StatusCode\": 200,\n \"CardPaymentAuthorizer\": {\n \"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n\t\t\"PinpadMessages\": {\n \"ApprovedMessage\": \"Aprovado\",\n \"CreditLabel\": \"Crédito\",\n \"DebitLabel\": \"Débito\",\n \"DeclinedMessage\": \"Negado\",\n \"InitializationMessage\": \"Iniciando\",\n \"MainLabel\": \"Stone Pagamentos\",\n \"ProcessingMessage\": \"Processando...\",\n \"TransactionTypeMenuLabel\": null\n },\n \"SaleAffiliationKey\": \"DE756D68F20BAWEAC8F94B5ABCB448\"\n }\n}", "language": "json" }, { "code": "<RetrieveAvailableDeviceResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey></RequestKey>\n <StatusCode>2147483647</StatusCode>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n</RetrieveAvailableDeviceResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient(); \n\n// ... Faz a conexão com um pinpad ...\n\nRetrieveAvailableDeviceRequest request = new RetrieveAvailableDeviceRequest();\nRetrieveAvailableDeviceResponse response = service.RetrieveAvailableDevice(request);\nCardPaymentAuthorizerContract authorizer = response.CardPaymentAuthorizer;", "language": "csharp" }, { "code": "IMicroPosServiceProxy service = new IMicroPosServiceProxy();\n\n// ... Faz a conexão com um pinpad ...\n\nRetrieveAvailableDeviceRequest request = new RetrieveAvailableDeviceRequest();\nRetrieveAvailableDeviceResponse response = service.RetrieveAvailableDevice(request);\nCardPaymentAuthorizerContract authorizer = response.getCardPaymentAuthorizer();", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"585951d944de5c2500723283","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Através desta operação é possivel obter **um Authorizer disponivel desde que tenham sido criados pelas operações** GetOneOrFirstPinpad ou GetAllPinpads.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"RetrieveAvailableDevicesRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-br\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<RetrieveAvailableDevicesRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n</RetrieveAvailableDevicesRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"RetrieveAvailableDevicesResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\": \\\"ee572532-c796-4e82-814e-d3ec49d7205b\\\",\\n\\t\\\"StatusCode\\\": 200,\\n\\t\\\"CardPaymentAuthorizer\\\": {\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\\"IsContactless\\\": true,\\n\\t\\t\\t\\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t},\\n\\t\\t\\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t},\\n\\t\\t\\t\\\"SaleAffiliationKey\\\": \\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t}]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<RetrieveAvailableDevicesResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors> </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <CardPaymentAuthorizerCollection>\\n    <CardPaymentAuthorizerContract xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n\\t\\t<ConnectionName >COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n\\t\\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n    </CardPaymentAuthorizerContract>\\n    <CardPaymentAuthorizerContract xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n\\t\\t<ConnectionName >COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n\\t\\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n    </CardPaymentAuthorizerContract>\\n  </CardPaymentAuthorizerCollection>\\n</RetrieveAvailableDevicesResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\n// ... Faz a conexão com 3 pinpad conectados à máquina ...\\n\\nRetrieveAvailableDevicesRequest request = new RetrieveAvailableDevicesRequest();\\nRetrieveAvailableDevicesResponse response = service.RetrieveAvailableDevices(request);\\nCardPaymentAuthorizerContract[] athorizers = response.CardPaymentAuthorizerCollection;\\n\\nConsole.Write(\\\"Pinpads disponíveis: \\\" + athorizers.Length);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"IMicroPosServiceProxy service = new IMicroPosServiceProxy();\\n\\n// ... Faz a conexão com 3 pinpad conectados à máquina ...\\n\\nRetrieveAvailableDevicesRequest request = new RetrieveAvailableDevicesRequest();\\nGetAvailableDevicesResponse response = service.getAvailableDevices(request);\\nCardPaymentAuthorizerContract [] athorizers = response.getCardPaymentAuthorizerCollection();\\n\\nSystem.out.println(\\\"Pinpads disponíveis: \\\" + authorizers.length);\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\n**Output esperado:** \n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Pinpads disponíveis: 3\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T15:44:25.160Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":9,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"retrieveavailabledevices-1","sync_unique":"","title":"RetrieveAvailableDevices","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

RetrieveAvailableDevices


Através desta operação é possivel obter **um Authorizer disponivel desde que tenham sido criados pelas operações** GetOneOrFirstPinpad ou GetAllPinpads. [block:api-header] { "type": "basic", "title": "RetrieveAvailableDevicesRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "0-1": "string", "1-1": "string", "0-2": "Não", "1-2": "Não", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão." }, "cols": 4, "rows": 2 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-br\",\n\t\"RequestKey\":\"\"\n}", "language": "json" }, { "code": "<RetrieveAvailableDevicesRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n</RetrieveAvailableDevicesRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "RetrieveAvailableDevicesResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\": \"ee572532-c796-4e82-814e-d3ec49d7205b\",\n\t\"StatusCode\": 200,\n\t\"CardPaymentAuthorizer\": {\n\t\t\"ConnectionName\": \"COM3\",\n\t\t\"PinpadInformation\": {\n\t\t\t\"IsContactless\": true,\n\t\t\t\"ManufacturerName\": \"GERTEC \",\n\t\t\t\"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\"Model\": \"PPC920;10MB;U \",\n\t\t\t\"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\"SerialNumber\": \"7101761507003063 \",\n\t\t\t\"Specifications\": \"1.08\"\n\t\t},\n\t\t\"PinpadMessages\": {\n\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t\t},\n\t\t\t\"SaleAffiliationKey\": \"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t}]\n}", "language": "json" }, { "code": "<RetrieveAvailableDevicesResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>2147483647</StatusCode>\n <CardPaymentAuthorizerCollection>\n <CardPaymentAuthorizerContract xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n\t\t<ConnectionName >COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n\t\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizerContract>\n <CardPaymentAuthorizerContract xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n\t\t<ConnectionName >COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n\t\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizerContract>\n </CardPaymentAuthorizerCollection>\n</RetrieveAvailableDevicesResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\n// ... Faz a conexão com 3 pinpad conectados à máquina ...\n\nRetrieveAvailableDevicesRequest request = new RetrieveAvailableDevicesRequest();\nRetrieveAvailableDevicesResponse response = service.RetrieveAvailableDevices(request);\nCardPaymentAuthorizerContract[] athorizers = response.CardPaymentAuthorizerCollection;\n\nConsole.Write(\"Pinpads disponíveis: \" + athorizers.Length);", "language": "csharp" }, { "code": "IMicroPosServiceProxy service = new IMicroPosServiceProxy();\n\n// ... Faz a conexão com 3 pinpad conectados à máquina ...\n\nRetrieveAvailableDevicesRequest request = new RetrieveAvailableDevicesRequest();\nGetAvailableDevicesResponse response = service.getAvailableDevices(request);\nCardPaymentAuthorizerContract [] athorizers = response.getCardPaymentAuthorizerCollection();\n\nSystem.out.println(\"Pinpads disponíveis: \" + authorizers.length);", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block] **Output esperado:** [block:code] { "codes": [ { "code": "Pinpads disponíveis: 3", "language": "text" } ] } [/block]
Através desta operação é possivel obter **um Authorizer disponivel desde que tenham sido criados pelas operações** GetOneOrFirstPinpad ou GetAllPinpads. [block:api-header] { "type": "basic", "title": "RetrieveAvailableDevicesRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "0-1": "string", "1-1": "string", "0-2": "Não", "1-2": "Não", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão." }, "cols": 4, "rows": 2 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-br\",\n\t\"RequestKey\":\"\"\n}", "language": "json" }, { "code": "<RetrieveAvailableDevicesRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n</RetrieveAvailableDevicesRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "RetrieveAvailableDevicesResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\": \"ee572532-c796-4e82-814e-d3ec49d7205b\",\n\t\"StatusCode\": 200,\n\t\"CardPaymentAuthorizer\": {\n\t\t\"ConnectionName\": \"COM3\",\n\t\t\"PinpadInformation\": {\n\t\t\t\"IsContactless\": true,\n\t\t\t\"ManufacturerName\": \"GERTEC \",\n\t\t\t\"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\"Model\": \"PPC920;10MB;U \",\n\t\t\t\"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\"SerialNumber\": \"7101761507003063 \",\n\t\t\t\"Specifications\": \"1.08\"\n\t\t},\n\t\t\"PinpadMessages\": {\n\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t\t},\n\t\t\t\"SaleAffiliationKey\": \"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t}]\n}", "language": "json" }, { "code": "<RetrieveAvailableDevicesResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>2147483647</StatusCode>\n <CardPaymentAuthorizerCollection>\n <CardPaymentAuthorizerContract xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n\t\t<ConnectionName >COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n\t\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizerContract>\n <CardPaymentAuthorizerContract xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n\t\t<ConnectionName >COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n\t\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizerContract>\n </CardPaymentAuthorizerCollection>\n</RetrieveAvailableDevicesResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\n// ... Faz a conexão com 3 pinpad conectados à máquina ...\n\nRetrieveAvailableDevicesRequest request = new RetrieveAvailableDevicesRequest();\nRetrieveAvailableDevicesResponse response = service.RetrieveAvailableDevices(request);\nCardPaymentAuthorizerContract[] athorizers = response.CardPaymentAuthorizerCollection;\n\nConsole.Write(\"Pinpads disponíveis: \" + athorizers.Length);", "language": "csharp" }, { "code": "IMicroPosServiceProxy service = new IMicroPosServiceProxy();\n\n// ... Faz a conexão com 3 pinpad conectados à máquina ...\n\nRetrieveAvailableDevicesRequest request = new RetrieveAvailableDevicesRequest();\nGetAvailableDevicesResponse response = service.getAvailableDevices(request);\nCardPaymentAuthorizerContract [] athorizers = response.getCardPaymentAuthorizerCollection();\n\nSystem.out.println(\"Pinpads disponíveis: \" + authorizers.length);", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block] **Output esperado:** [block:code] { "codes": [ { "code": "Pinpads disponíveis: 3", "language": "text" } ] } [/block]
{"__v":0,"_id":"58594abc7c26220f00bd60fc","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T15:14:04.183Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":10,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"manipulação-de-pinpads-1","sync_unique":"","title":"Manipulação de pinpads","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

Manipulação de pinpads


{"__v":0,"_id":"58405e02c050731900063531","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por verificar se o pinpad está conectado. Ela fará um ping a porta na qual ele estiver conectado, esta porta é definida no momento da criação e fica dentro do authorizer obtido pelos métodos GetOneOrFirstPinpad ou GetAllPinpads.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/5217967-ping.png\",\n        \"ping.png\",\n        841,\n        503,\n        \"#1e1b1c\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PingRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"1-0\": \"Language\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador ligado ao pinpad ao qual será enviado o Ping.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n      \\\"PinpadInformation\\\": {\\n        \\\"IsContactless\\\": true,\\n        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n        \\\"Specifications\\\": \\\"1.08\\\"\\n      },\\n\\t\\t\\t\\\"PinpadMessages\\\": {\\n \\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n \\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n \\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n \\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n \\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n \\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n \\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n \\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n \\t\\t\\t\\t},\\n      \\\"SaleAffiliationKey\\\": \\\"DE756D68F20B425*CDF*C8F94B5ABCB448\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<PingRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n  <CardPaymentAuthorizer>\\n\\t<ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t<PinpadInformation>\\n\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t<Specifications>1.08</Specifications>\\n\\t</PinpadInformation>\\n\\t<PinpadMessages>\\n\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t</PinpadMessages>\\n\\t\\t<SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n</PingRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PingResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Failure\",\n    \"2-0\": \"OperationErrors\",\n    \"3-0\": \"StatusCode\",\n    \"4-0\": \"IsConnected\",\n    \"0-1\": \"string\",\n    \"1-1\": \"bool\",\n    \"4-1\": \"bool\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"3-1\": \"int\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-2\": \"True se o pinpad está conectado e False se não está.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"IsConnected\\\":true\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<PingResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors>\\n  </OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <IsConnected>true</IsConnected>\\n</PingResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta etabelecer conexão com o pinpad. Se não conseguir, mostra os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nPingRequest request = new PingRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nPingResponse response = service.Ping(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.IsConnected);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"PingRequest request = new PingRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nPingResponse response = service.ping(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getIsConnected());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:29:38.184Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":11,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"manipulação-de-pinpads","sync_unique":"","title":"Ping","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[{"__v":0,"_id":"58405f13c6c9322300273fa9","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por verificar se o pinpad está conectado. Ela fará um ping a porta na qual ele estiver conectado, esta porta é definida no momento da criação e fica dentro do authorizer obtido pelos métodos ``GetOneOrFirstPinpad`` ou ``GetAllPinpads``.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/e5a79e3-ping.png\",\n        \"ping.png\",\n        841,\n        503,\n        \"#1e1b1c\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PingRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador ligado ao pinpad ao qual será enviado o Ping.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n      \\\"PinpadInformation\\\": {\\n        \\\"IsContactless\\\": true,\\n        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n        \\\"Specifications\\\": \\\"1.08\\\"\\n      },\\n\\t\\t\\t\\\"PinpadMessages\\\": {\\n \\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n \\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n \\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n \\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n \\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n \\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n \\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n \\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n \\t\\t\\t\\t},\\n      \\\"SaleAffiliationKey\\\": \\\"DE756D68F20B425*CDF*C8F94B5ABCB448\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<PingRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n  <CardPaymentAuthorizer>\\n\\t<ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t<PinpadInformation>\\n\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t<Specifications>1.08</Specifications>\\n\\t</PinpadInformation>\\n\\t<PinpadMessages>\\n\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t</PinpadMessages>\\n\\t\\t<SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n</PingRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PingResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"IsConnected\",\n    \"4-1\": \"bool\",\n    \"4-2\": \"True se o pinpad está conectado e False se não está.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"IsConnected\\\":true\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<PingResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors>\\n  </OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <IsConnected>true</IsConnected>\\n</PingResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta etabelecer conexão com o pinpad. Se não conseguir, mostra os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nPingRequest request = new PingRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nPingResponse response = service.Ping(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.IsConnected);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"PingRequest request = new PingRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nPingResponse response = service.ping(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getIsConnected());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:34:11.061Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":0,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"ping","sync_unique":"","title":"Ping","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405f1f63e13523002d01ba","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por retirar conexão lógica com o pinpad e fechar a conexão física em uma porta serial. Esta porta é definida no momento da criação e **fica dentro do Authorizer obtido pelos métodos** ``GetOneOrFirstPinpad`` ou ``GetAllPinpads``.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ClosePinpadConnectionRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador ligado ao pinpad que será desconectado.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\": [\\n    {\\n      \\\"ConnectionName\\\": \\\"COM3\\\",\\n      \\\"PinpadInformation\\\": {\\n        \\\"IsContactless\\\": true,\\n        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n        \\\"Specifications\\\": \\\"1.08\\\"\\n      },\\n\\t\\t\\t\\\"PinpadMessages\\\": {\\n\\t        \\\"ApprovedMessage\\\": \\\"APROVADO\\\",\\n\\t        \\\"CreditLabel\\\": null,\\n\\t        \\\"DebitLabel\\\": null,\\n\\t        \\\"DeclinedMessage\\\": \\\"NEGADO\\\",\\n\\t        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t        \\\"TransactionTypeMenuLabel\\\": null\\n\\t      },\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ClosePinpadConnectionRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n</ClosePinpadConnectionRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ClosePinpadConnectionResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"IsClosed\",\n    \"4-1\": \"bool\",\n    \"4-2\": \"True se o pinpad foi desconectado e False se não foi.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":false,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"IsClosed\\\":true\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ClosePinpadConnectionResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>  \\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <IsClosed>true</IsClosed>\\n</ClosePinpadConnectionResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta fechar a conexão com o pinpad. Se não conseguir, mostra os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nClosePinpadConnectionResponse response = service.ClosePinpadConnection(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.IsClosed);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"ClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nClosePinpadConnectionResponse response = service.closePinpadConnection(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getIsClosed());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:34:23.543Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":1,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"closepinpadconnection","sync_unique":"","title":"ClosePinpadConnection","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405f2863e13523002d01bb","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por exibir mensagem na tela do pinpad.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ShowMessageRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador ligado ao pinpad ao qual será mostrada a mensagem.\",\n    \"3-0\": \"FirstLine\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Não\",\n    \"3-3\": \"Mensagem a ser mostrada na primeira linha do pinpad. Possui tamanho máximo de 16 caracteres.\",\n    \"4-0\": \"SecondLine\",\n    \"4-1\": \"string\",\n    \"4-2\": \"Não\",\n    \"4-3\": \"Mensagema ser mostrada na segunda linha do pinpad. Possui tamanho máximo de 16 caracteres.\",\n    \"5-0\": \"Padding\",\n    \"5-1\": \"string\",\n    \"5-2\": \"Não\",\n    \"5-3\": \"Rpresenta o modo como e mensagem será alinhada na tela do pinpad. Se deixado em branco, o valor default será Left.\"\n  },\n  \"cols\": 4,\n  \"rows\": 6\n}\n[/block]\n**Códigos do padding disponiveis:**\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Ação\",\n    \"0-0\": \"Left\",\n    \"0-1\": \"Alinha a mensagem à esquerda do pinpad.\",\n    \"1-0\": \"Center\",\n    \"1-1\": \"Centraliza a mensagem na tela do pinpad.\",\n    \"2-0\": \"Right\",\n    \"2-1\": \"Alinha a mensagem à direita do pinpad.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t      \\\"PinpadInformation\\\": {\\n\\t        \\\"IsContactless\\\": true,\\n\\t        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t        \\\"Specifications\\\": \\\"1.08\\\"\\n\\t      },\\n\\t\\t\\t\\t\\\"PinpadMessages\\\": {\\n\\t \\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t \\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t \\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t \\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t \\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t \\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t \\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t \\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t \\t\\t\\t\\t},\\n\\t      \\\"SaleAffiliationKey\\\": \\\"DE756D68F20B425*CDF*C8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"FirstLine\\\":\\\"String content\\\",\\n\\t\\\"Padding\\\":\\\"String content\\\",\\n\\t\\\"SecondLine\\\":\\\"String content\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ShowMessageRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n\\t<ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t<PinpadInformation>\\n\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t<Specifications>1.08</Specifications>\\n\\t</PinpadInformation>\\n\\t<PinpadMessages>\\n\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t</PinpadMessages>\\n\\t\\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <FirstLine>String content</FirstLine>\\n  <Padding>String content</Padding>\\n  <SecondLine>String content</SecondLine>\\n</ShowMessageRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ShowMessageResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"WasDisplayed\",\n    \"4-1\": \"bool\",\n    \"4-2\": \"True se a mensagem foi recebida e exibida e False caso contrário.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":false,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"WasDisplayed\\\":true\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ShowMessageResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors>  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <WasDisplayed>true</WasDisplayed>\\n</ShowMessageResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo, se ``Failure`` for ``False``, mostra mensagem\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HELLO\\nWORLD\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nna tela do pinpad, alinhados à direita. Se ``Failure`` for ``True``, mostrará os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nShowMessageRequest request = new ShowMessageRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nrequest.FirstLine = \\\"HELLO\\\";\\nrequest.SecondLine = \\\"WORLD\\\";\\nrequest.Padding = \\\"Right\\\";\\n\\nShowMessageResponse response = service.ShowMessage(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.WasDisplayed);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"ShowMessageRequest request = new ShowMessageRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nrequest.setFirstLine(\\\"HELLO\\\");\\nrequest.setSecondLine(\\\"WORLD\\\");\\nrequest.setPadding(\\\"Right\\\");\\n\\nShowMessageResponse response = service.showMessage(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getWasDisplayed());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:34:32.192Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":2,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"showmessage","sync_unique":"","title":"ShowMessage","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405f31c050731900063535","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por recuperar PAN (Primary Account Number, ou melhor, aquele número de 12 à 16 caracteres impresso na frente do cartão) mascarado do cartão fornecido.\n\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Essa operação é bastante usada no caso de querer cancelar uma transação obrigando a ter cartão presencial.\",\n  \"title\": \"Dica\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetSecurePanRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador ligado ao pinpad ao qual será lido o PAN do cartão.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"PT\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\":\\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\t \\\"IsContactless\\\": true,\\n\\t\\t\\t\\t \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\t \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\t \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\t \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\t \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\t \\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t\\t },\\n\\t\\t \\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t\\t},\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"String content\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetSecurePanRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName>COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n\\t\\t  <SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n</GetSecurePanRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetSecurePanResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"MaskedPan\",\n    \"4-1\": \"string\",\n    \"4-2\": \"PAN mascarado se cartão o foi fornecido.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"MaskedPan\\\":\\\"\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetSecurePanResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors></OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <MaskedPan>String content</MaskedPan>\\n</GetSecurePanResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta ler o PAN de um cartão. Se um cartão foi fornecido, mostra o PAN mascarado. Senão, mostra os erros ocorridos na operação.\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetSecurePanRequest request = new GetSecurePanRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nGetSecurePanResponse response = service.GetSecurePan(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.MaskedPan);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetSecurePanRequest request = new GetSecurePanRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nGetSecurePanResponse response = service.getSecurePan(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getMaskedPan());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:34:41.951Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":3,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"getsecurepan","sync_unique":"","title":"GetSecurePan","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405f3ccee8ec1900c4580b","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por recuperar **tecla de controle** pressionada no pinpad.\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetKeyRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador ligado ao pinpad que lerá a tecla.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\": [\\n\\t\\t{\\n\\t\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\t\\\"IsContactless\\\": true,\\n\\t\\t\\t\\t\\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\t\\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\t\\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\t\\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\t\\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\t\\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t\\t},\\n\\t\\t\\t\\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t\\t},\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetKeyRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n\\t<CardPaymentAuthorizer>\\n\\t\\t<ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n\\t\\t<SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n\\t</CardPaymentAuthorizer>\\n</GetKeyRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetKeyResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"KeyPressed\",\n    \"4-1\": \"string\",\n    \"4-2\": \"Nome da tecla pressionada.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[{\\n\\t\\t\\\"Code\\\":\\\"String content\\\",\\n\\t\\t\\\"Field\\\":\\\"String content\\\",\\n\\t\\t\\\"Message\\\":\\\"String content\\\"\\n\\t}],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":2147483647,\\n\\t\\\"KeyPressed\\\":\\\"String content\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetKeyResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <KeyPressed>String content</KeyPressed>\\n</GetKeyResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta ler uma tecla de controle do pinpad. Se conseguir, mostra o nome da tecla. Se não conseguir, mostra os erros ocorridos na operação.\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetKeyRequest request = new GetKeyRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nGetKeyResponse response = service.GetKey(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.KeyPressed);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetKeyRequest request = new GetKeyRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nGetKeyResponse response = service.getKey(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getKeyPressed());  \\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Tabela de Códigos de Teclas\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Tecla\",\n    \"0-0\": \"Backspace\",\n    \"0-1\": \"Tecla de backspace .\",\n    \"1-0\": \"Cancel\",\n    \"1-1\": \"Tecla de cancel.\",\n    \"2-0\": \"Decimal0\",\n    \"2-1\": \"Tecla númerica 0.\",\n    \"3-0\": \"Decimal1\",\n    \"3-1\": \"Tecla númerica 1.\",\n    \"4-0\": \"Decimal2\",\n    \"4-1\": \"Tecla númerica 2.\",\n    \"5-0\": \"Decimal3\",\n    \"5-1\": \"Tecla númerica 3.\",\n    \"6-0\": \"Decimal4\",\n    \"6-1\": \"Tecla númerica 4.\",\n    \"7-0\": \"Decimal5\",\n    \"7-1\": \"Tecla númerica 5.\",\n    \"8-0\": \"Decimal6\",\n    \"8-1\": \"Tecla númerica 6.\",\n    \"9-0\": \"Decimal7\",\n    \"9-1\": \"Tecla númerica 7.\",\n    \"10-0\": \"Decimal8\",\n    \"10-1\": \"Tecla númerica 8.\",\n    \"11-0\": \"Decimal9\",\n    \"11-1\": \"Tecla númerica 9.\",\n    \"12-0\": \"Function1\",\n    \"12-1\": \"Tecla de função 1.\",\n    \"13-0\": \"Function2\",\n    \"13-1\": \"Tecla de função 2.\",\n    \"14-0\": \"Function3\",\n    \"14-1\": \"Tecla de função 3.\",\n    \"15-0\": \"Function4\",\n    \"15-1\": \"Tecla de função 4.\",\n    \"16-0\": \"Return\",\n    \"16-1\": \"Tecla de enter.\"\n  },\n  \"cols\": 2,\n  \"rows\": 17\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:34:52.690Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":4,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"getkey","sync_unique":"","title":"GetKey","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405f49c050731900063536","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por recuperar input númerico do pinpad.\n\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Aviso\",\n  \"body\": \"Operação unicamente suportado nos pinpads do modelo Gertec Mobi Pin 10.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericInputRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador ligado ao pinpad ao qual será lido o input.\",\n    \"3-0\": \"FirstLine\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Sim\",\n    \"3-3\": \"Código do texto a ser exibido na primeira linha da tela do pinpad.\",\n    \"4-0\": \"SecondLine\",\n    \"4-1\": \"string\",\n    \"4-2\": \"Sim\",\n    \"4-3\": \"Código do texto a ser exibido na segunda linha da tela do pinpad.\",\n    \"5-0\": \"MinimumLength\",\n    \"5-1\": \"int\",\n    \"5-2\": \"Sim\",\n    \"5-3\": \"Tamanho mínimo do input. De 0 a 99.\",\n    \"6-0\": \"MaximumLength\",\n    \"6-1\": \"int\",\n    \"6-2\": \"Sim\",\n    \"6-3\": \"Tamanho máximo do input. De 0 a 99.\",\n    \"7-0\": \"TimeOut\",\n    \"7-1\": \"int\",\n    \"7-2\": \"Sim\",\n    \"7-3\": \"Tempo para time out, definido em segundos. De 0 a 999.\"\n  },\n  \"cols\": 4,\n  \"rows\": 8\n}\n[/block]\n**Códigos do texto a ser exibido na primeira linha:**\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Mensagem a ser exibida na primeira linha\",\n    \"0-0\": \"Type\",\n    \"0-1\": \"Digite\",\n    \"1-0\": \"Retype\",\n    \"1-1\": \"Redigite\",\n    \"2-0\": \"Enter\",\n    \"2-1\": \"Entre\",\n    \"3-0\": \"ReEnter\",\n    \"3-1\": \"Re-entre\",\n    \"4-0\": \"Insert\",\n    \"4-1\": \"Insira\",\n    \"5-0\": \"Reinsert\",\n    \"5-1\": \"Reinsira\",\n    \"6-0\": \"Number\",\n    \"6-1\": \"Numero\",\n    \"7-0\": \"TypeNumber\",\n    \"7-1\": \"Digite o numero\",\n    \"8-0\": \"RetypeNumber\",\n    \"8-1\": \"Redigite numero\",\n    \"9-0\": \"EnterNumber\",\n    \"9-1\": \"Entre o numero\",\n    \"10-0\": \"ReEnterNumber\",\n    \"10-1\": \"Re-entre numero\",\n    \"11-0\": \"InsertNumber\",\n    \"11-1\": \"Insira o numero\",\n    \"12-0\": \"ReinsertNumber\",\n    \"12-1\": \"Reinsira numero\",\n    \"13-0\": \"TypeCode\",\n    \"13-1\": \"Digite o codigo\",\n    \"14-0\": \"RetypeCode\",\n    \"14-1\": \"Redigite codigo\",\n    \"15-0\": \"EnterCode\",\n    \"15-1\": \"Entre o codigo\",\n    \"16-0\": \"ReEnterCode\",\n    \"16-1\": \"Re-entre codigo\",\n    \"17-0\": \"InsertCode\",\n    \"17-1\": \"Insira o codigo\",\n    \"18-0\": \"ReinsertCode\",\n    \"18-1\": \"Reinsira codigo\"\n  },\n  \"cols\": 2,\n  \"rows\": 19\n}\n[/block]\n**Códigos do texto a ser exibido na segunda linha:**\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Mensagem a ser exibida na segunda linha\",\n    \"0-0\": \"TelephoneNumber\",\n    \"0-1\": \"Numero telefone\",\n    \"1-0\": \"TelephoneAreaCode\",\n    \"1-1\": \"Codigo de area\",\n    \"2-0\": \"TelephoneNumberAndArea\",\n    \"2-1\": \"Cod. area + tel.\",\n    \"3-0\": \"SocialSecurityDocument\",\n    \"3-1\": \"CPF\",\n    \"4-0\": \"CnpjDocument\",\n    \"4-1\": \"CNPJ\",\n    \"5-0\": \"RgDocument\",\n    \"5-1\": \"RG\",\n    \"6-0\": \"PisDocument\",\n    \"6-1\": \"PIS\",\n    \"7-0\": \"HealthDocument\",\n    \"7-1\": \"SUS\",\n    \"8-0\": \"DriversLicense\",\n    \"8-1\": \"CNH\",\n    \"9-0\": \"Passport\",\n    \"9-1\": \"Passaporte\",\n    \"10-0\": \"Last4Digits\",\n    \"10-1\": \"Ult. 4 digitos\",\n    \"11-0\": \"CardSecurityCode\",\n    \"11-1\": \"Cod. segurança\",\n    \"12-0\": \"AmountInReais\",\n    \"12-1\": \"Valor (R$)\",\n    \"13-0\": \"AmountInDollars\",\n    \"13-1\": \"Valor (US$)\",\n    \"14-0\": \"AmountInEuros\",\n    \"14-1\": \"Valor (€)\",\n    \"15-0\": \"AmountInPounds\",\n    \"15-1\": \"Valor (£)\",\n    \"16-0\": \"AmountInYen\",\n    \"16-1\": \"Valor (¥)\",\n    \"17-0\": \"Ticket\",\n    \"17-1\": \"Ingresso\",\n    \"18-0\": \"Entrance\",\n    \"18-1\": \"Entrada\",\n    \"19-0\": \"GasPump\",\n    \"19-1\": \"Bomba gasolina\",\n    \"20-0\": \"Scale\",\n    \"20-1\": \"Balança\",\n    \"21-0\": \"PointOfSale\",\n    \"21-1\": \"Ponto de Venda\",\n    \"22-0\": \"Station\",\n    \"22-1\": \"Estação\",\n    \"23-0\": \"Cashier\",\n    \"23-1\": \"Caixa\",\n    \"24-0\": \"Terminal\",\n    \"24-1\": \"Terminal\",\n    \"25-0\": \"Board\",\n    \"25-1\": \"Mesa\",\n    \"26-0\": \"Section\",\n    \"26-1\": \"Seção\"\n  },\n  \"cols\": 2,\n  \"rows\": 27\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n  \\\"PinpadInformation\\\": {\\n    \\\"IsContactless\\\": true,\\n    \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n    \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n    \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n    \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n    \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n    \\\"Specifications\\\": \\\"1.08\\\"\\n  },\\n\\t\\\"PinpadMessages\\\": {\\n\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t},\\n  \\\"SaleAffiliationKey\\\": \\\"DE756D68F20B425*CDF*C8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"FirstLine\\\":\\\"1\\\",\\n\\t\\\"MaximumLength\\\":80,\\n\\t\\\"MinimumLength\\\":80,\\n\\t\\\"SecondLine\\\":\\\"2\\\",\\n\\t\\\"TimeOut\\\":100\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericInputRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n\\t<CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <FirstLine>1</FirstLine>\\n  <MaximumLength>80</MaximumLength>\\n  <MinimumLength>80</MinimumLength>\\n  <SecondLine>2</SecondLine>\\n  <TimeOut>100</TimeOut>\\n</GetNumericInputRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericInputResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"Input\",\n    \"4-1\": \"string\",\n    \"4-2\": \"Valor do inputado.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":false,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"Input\\\":\\\"10\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericInputResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors></OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <Input>10</Input>\\n</GetNumericInputResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta ler um input numérico com as seguintes configuranções:\n\n* Na primeira linha, será exibido: \"Entre\"\n\n* Na segunda linha, será exibido: \"Mesa\"\n\n* O operador do pinpad poderá digitar entre 0 e 2 números\n\n* O timeout da operação é 1 minuto (60 segundos)\n\nSe houver algum input, o código abaixo deverá exibir o input lido. Se não houver, mostrará os erros ocorridos na operação.\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetNumericInputRequest request = new GetNumericInputRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nrequest.FirstLine = \\\"Enter\\\";\\nrequest.SecondLine = \\\"Board\\\";\\nrequest.MinimumLength = 0;\\nrequest.MaximumLength = 2;\\nrequest.TimeOut = 60;\\n\\nGetNumericInputResponse response = service.GetNumericInput(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.Input);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\\n\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetNumericInputRequest request = new GetNumericInputRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nrequest.setFirstLine(\\\"Enter\\\");\\nrequest.setSecondLine(\\\"Board\\\");\\nrequest.setMinimumLength(0);\\nrequest.setMaximumLength(2);\\nrequest.setTimeOut(60);\\n\\nGetNumericInputResponse response = service.getNumericInput(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getInput());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:35:05.246Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":5,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"getnumericinput","sync_unique":"","title":"GetNumericInput","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405f5ee3e04b230055c6d1","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por recuperar valor monetário informado no pinpad.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Aviso\",\n  \"body\": \"Operação unicamente suportada nos pinpads do modelo Gertec Mobi Pin 10\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetAmountRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador ligado ao pinpad ao qual será lido o valor monetário.\",\n    \"3-0\": \"Currency\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Sim\",\n    \"3-3\": \"Código do ícone da moeda.\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\t\\\"ConnectionName\\\":\\\"COM3\\\",\\n\\t\\t\\t\\\"PinpadInformation\\\": {\\n\\t       \\\"IsContactless\\\": true,\\n\\t       \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t       \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t       \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t       \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t       \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t       \\\"Specifications\\\": \\\"1.08\\\"\\n\\t     },\\n\\t\\t\\t \\\"PinpadMessages\\\": {\\n\\t \\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t \\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t \\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t \\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t \\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t \\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t \\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t \\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t \\t\\t\\t},\\n\\t\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Currency\\\":\\\"Real\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetAmountRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <Currency>Real</Currency>\\n</GetAmountRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n**Códigos das moedas disponiveis:**\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Real\",\n    \"h-0\": \"Código\",\n    \"h-1\": \"Ícone\",\n    \"0-1\": \"R$\",\n    \"1-0\": \"Dollar\",\n    \"1-1\": \"$\",\n    \"2-0\": \"Euro\",\n    \"2-1\": \"€\",\n    \"3-0\": \"Pound\",\n    \"3-1\": \"£\",\n    \"4-0\": \"Yen\",\n    \"4-1\": \"¥\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetAmountResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"Request\",\n    \"1-0\": \"Failure\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"Amount\",\n    \"4-1\": \"decimal?\",\n    \"4-2\": \"Valor monetário informado.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"Amount\\\":100\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetAmountResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors> </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <Amount>100</Amount>\\n</GetAmountResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\nO exemplo abaixo tenta ler o valor monetário do pinpad. Se não conseguir, mostra os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\n           GetAmountRequest request = new GetAmountRequest();\\n           request.CardPaymentAuthorizer = cardPaymentAuthorizer; // Obrigatório\\n           request.Currency = \\\"Real\\\";\\n\\n           GetAmountResponse response = service.GetAmount(request);\\n\\n           if (response.Failure == false)\\n           {\\n               Console.WriteLine(response.Amount);\\n           }\\n           else\\n           {\\n               foreach (ErrorReport report in response.OperationErrors)\\n               {\\n                   Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n               }\\n           }\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetAmountRequest request = new GetAmountRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer); // Obrigatório\\n\\nrequest.setCurrency(\\\"Real\\\");\\n\\nGetAmountResponse response = service.getAmount(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getAmount());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:35:26.471Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":6,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"getamount","sync_unique":"","title":"GetAmount","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405f7a63e13523002d01bc","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"O _DataPicker_ possibilita a interação do usuário através de um menu navegável exibido na tela do pinpad. A navegação é dada com o auxilio das teclas de setas no teclado do pinpad.\n\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Modelos de pinpads com teclas mapeadas\"\n}\n[/block]\n**O valor das teclas utilizadas para navegação por cada modelo de pinpad podem mudar.**\n\nOs modelos que tiveram suas teclas mapeadas para esta funcionalidade são:\n\n- Gertec PPC920\n\n- Ingenico iPP320\n\n- Verifone Vx820\n\nQualquer modelo não mapeado, assumirá como padrão os valores das teclas utilizadas pelo _Gertec PPC920_.  Caso queira usar outro Pinpad, e saiba os valores das teclas de navegação desse pinpad, basta modificar o valor default delas.\n\nVocê também pode entrar em contato com a gente informando o modelo do pinpad, para que o valor dele seja acrescentado ao mapeamento dentro do serviço.\n\n**Como definir valores personalizados para as teclas de navegação?**\n\nEm primeiro lugar, para descobrir o valor associado às teclas de navegação do seu _pinpad_ você pode utilizar a operação [GetKey](GetKey.md). Após descobrir esses valores, você deve utilizar a operação [ChangeDataPickerKeys](ChangeDataPickerKeys.md) para definir esses novos valores.\n\n**Operações disponibilizadas pelo Data Picker.**\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Operação\",\n    \"h-1\": \"Descrição\",\n    \"0-0\": \"GetNumericValueInRange\",\n    \"0-1\": \"Possibilita a escolha de valor dentro de um _range_ definido pelos valores de máximo e mínimo passados.\",\n    \"1-0\": \"GetNumericValueInOptionsRequest\",\n    \"1-1\": \"Possibilita a escolha de um valor numérico dentro das opções passadas.\",\n    \"2-1\": \"Possibilita a escolha de um valor textual dentro das opções passadas.\",\n    \"2-0\": \"GetTextValueInOptionsRequest\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:35:54.401Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":7,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"date-picker","sync_unique":"","title":"Data Picker","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405fd8c6c9322300273fab","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação que permite selecionar um número através de um menu navegável no pinpad dentro de um range com os valores de máximo e mínimo passados ao serviço.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericValueInRangeRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador\",\n    \"3-0\": \"Label\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Sim\",\n    \"3-3\": \"Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \\\":\\\".\",\n    \"4-0\": \"MinimumLimit\",\n    \"4-1\": \"short\",\n    \"5-1\": \"short\",\n    \"4-2\": \"Sim\",\n    \"5-2\": \"Sim\",\n    \"4-3\": \"Valor mínimo no intervalo desejado.\",\n    \"5-3\": \"Valor máximo no intervalo desejado.\",\n    \"5-0\": \"MaximumLimit\"\n  },\n  \"cols\": 4,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\":\\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\t \\\"IsContactless\\\": true,\\n\\t\\t\\t\\t \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\t \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\t \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\t \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\t \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\t \\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t\\t },\\n\\t\\t\\t \\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t\\t},\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Label\\\":\\\"1\\\",\\n\\t\\\"MaximumLimit\\\":80,\\n\\t\\\"MinimumLimit\\\": 80\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericValueInRangeRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage>Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <Label>1</Label>\\n  <MaximumLimit>80</MaximumLimit>\\n  <MinimumLimit>80</MinimumLimit>\\n</GetNumericValueInRangeRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericValueInRangeResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"Value\",\n    \"3-1\": \"short\",\n    \"3-2\": \"Valor selecionado ou null em caso de time out ou operação cancelada.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"Value\\\":null\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericValueInRangeResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <Value>32767</Value>\\n</GetNumericValueInRangeResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetNumericValueInRangeRequest request = new GetNumericValueInRangeRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\nrequest.Label = \\\"Parcelas\\\";\\nrequest.MinimumLimit = ((short)1);\\nrequest.MaximumLimit = ((short)12);\\n\\nGetNumericValueInRangeResponse response = service.GetNumericValueInRange(request);\\n\\nif (response.Failure != true)\\n{\\n    Console.WriteLine(response.Value);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\\n\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetNumericValueInRangeRequest request = new GetNumericValueInRangeRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\nrequest.setLabel(\\\"Parcelas\\\");\\nrequest.setMinimumLimit((short) 1);\\nrequest.setMaximumLimit((short) 12);\\n\\nGetNumericValueInRangeResponse response = service.getNumericValueInRange(request);\\n\\nif (response.getFailure() != true) {\\n    System.out.println(response.getValue());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:37:28.604Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":8,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"getnumericvalueinrange","sync_unique":"","title":"GetNumericValueInRange","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58405ff3c050731900063538","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação que permite selecionar um valor numérico através de um menu navegável no pinpad dentro de opções passados ao serviço.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericValueInOptionsRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador\",\n    \"3-0\": \"Label\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Sim\",\n    \"3-3\": \"Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \\\":\\\".\",\n    \"4-0\": \"Options\",\n    \"4-1\": \"short []\",\n    \"4-2\": \"Sim\",\n    \"4-3\": \"Lista de opções.\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\":\\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n         \\\"IsContactless\\\": true,\\n         \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n         \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n         \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n         \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n         \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n         \\\"Specifications\\\": \\\"1.08\\\"\\n       },\\n\\t\\t  \\\"PinpadMessages\\\": {\\n \\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n \\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n \\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n \\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n \\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n \\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n \\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n \\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n \\t\\t\\t\\t},\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Label\\\":\\\"String content\\\",\\n\\t\\\"Options\\\":[32767]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericValueInOptionsRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <Label>String content</Label>\\n  <Options>\\n    <short xmlns=\\\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\\\">32767</short>\\n    <short xmlns=\\\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\\\">32767</short>\\n  </Options>\\n</GetNumericValueInOptionsRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericValueInOptionsResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"Value\",\n    \"3-1\": \"short\",\n    \"3-2\": \"Valor selecionado ou null em caso de time out ou operação cancelada.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"Value\\\":\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericValueInOptionsResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors>\\n  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>16528409</StatusCode>\\n  <Value>32767</Value>\\n</GetNumericValueInOptionsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\n            GetNumericValueInOptionsRequest request = new GetNumericValueInOptionsRequest();\\n            request.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n            request.Label = \\\"Assinatura\\\";\\n            request.Options = new short[] { 3, 6, 12 };\\n\\n            GetNumericValueInOptionsResponse response = service.GetNumericValueInOptions(request);\\n\\n            if (response.Failure != true)\\n            {\\n                Console.WriteLine(response.Value);\\n            }\\n            else\\n            {\\n                foreach (ErrorReport report in response.OperationErrors)\\n                {\\n                    Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n                }\\n            }\\n\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetNumericValueInOptionsRequest request = new GetNumericValueInOptionsRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\nrequest.setLabel(\\\"Assinatura\\\");\\nrequest.setOptions(new short[] {3, 6, 12});\\n\\nGetNumericValueInOptionsResponse response = service.getNumericValueInOptions(request);\\n\\nif (response.getFailure() != true) {\\n    System.out.println(response.getValue());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:37:55.046Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":9,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"getnumericvalueinoptions","sync_unique":"","title":"GetNumericValueInOptions","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"5840600129e3ff0f000d85ef","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação que permite selecionar um valor textual através de um menu navegável no pinpad dentro de opções passados ao serviço.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetTextValueInOptionsRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador\",\n    \"3-0\": \"Label\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Sim\",\n    \"3-3\": \"Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \\\":\\\".\",\n    \"4-0\": \"Options\",\n    \"4-1\": \"string []\",\n    \"4-2\": \"Sim\",\n    \"4-3\": \"Lista de opções.\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\":\\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\t \\\"IsContactless\\\": true,\\n\\t\\t\\t\\t \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\t \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\t \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\t \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\t \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\t \\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t\\t },\\n\\t\\t \\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t\\t},\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Label\\\":\\\"1\\\",\\n\\t\\\"Options\\\":[1,2]\\n}\\n\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetTextValueInOptionsRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n\\t<CardPaymentAuthorizer>\\n\\t\\t<ConnectionName>COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n\\t\\t\\t<SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n\\t</CardPaymentAuthorizer>\\n  <Label>String content</Label>\\n  <Options>\\n    <string xmlns=\\\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\\\">1</string>\\n    <string xmlns=\\\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\\\">2</string>\\n  </Options>\\n</GetTextValueInOptionsRequest>\\n\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetTextValueInOptionsResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"Value\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Valor selecionado ou null em caso de time out ou operação cancelada.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"Value\\\":\\\"String content\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetTextValueInOptionsResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors>  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <Value></Value>\\n</GetTextValueInOptionsResponse>\\n\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetTextValueInOptionsRequest request = new GetTextValueInOptionsRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\nrequest.Label = \\\"Tipo\\\";\\nrequest.Options = new String[] { \\\"Debito\\\", \\\"Credito\\\" };\\n\\nGetTextValueInOptionsResponse response = service.GetTextValueInOptions(request);\\n\\nif (response.Failure != true)\\n{\\n    Console.WriteLine(response.Value);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetTextValueInOptionsRequest request = new GetTextValueInOptionsRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\nrequest.setLabel(\\\"Tipo\\\");\\nrequest.setOptions(new String[] {\\\"Debito\\\", \\\"Credito\\\"});\\n\\nGetTextValueInOptionsResponse response = service.getTextValueInOptions(request);\\n\\nif (response.getFailure() != true) {\\n    System.out.println(response.getValue());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:38:09.766Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":10,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"gettextvalueinoptions","sync_unique":"","title":"GetTextValueInOptions","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"5840601463e13523002d01bd","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por definir novas teclas de para cima e para baixo para utilizar nas operações de DataPicker.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ChangeDataPickerKeyRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador\",\n    \"3-0\": \"UpKey\",\n    \"3-1\": \"string\",\n    \"4-1\": \"string\",\n    \"3-2\": \"Sim\",\n    \"4-2\": \"Sim\",\n    \"3-3\": \"Valor da tecla de para cima. Apenas teclas de função 1, 2, 3 e 4 são permitidas.\",\n    \"4-3\": \"Valor da tecla de para baixo. Apenas teclas de função 1, 2, 3 e 4 são permitidas.\",\n    \"4-0\": \"DownKey\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizerCollection\\\":\\n\\t{\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\\"IsContactless\\\": true,\\n\\t\\t\\t\\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t},\\n\\t\\t\\\"PinpadMessages\\\": {\\n        \\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n        \\\"CreditLabel\\\": \\\"Crédito\\\",\\n        \\\"DebitLabel\\\": \\\"Débito\\\",\\n        \\\"DeclinedMessage\\\": \\\"Negado\\\",\\n        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n        \\\"TransactionTypeMenuLabel\\\": null\\n      },\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"DownKey\\\":\\\"1\\\",\\n\\t\\\"UpKey\\\":\\\"2\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ChangeDataPickerKeysRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n\\t<CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <DownKey>1</DownKey>\\n  <UpKey>2</UpKey>\\n</ChangeDataPickerKeysRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Tabela de Códigos de Teclas\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Tecla\",\n    \"0-0\": \"Backspace\",\n    \"0-1\": \"Tecla de backspace .\",\n    \"1-0\": \"Cancel\",\n    \"1-1\": \"Tecla de cancel.\",\n    \"2-0\": \"Decimal0\",\n    \"2-1\": \"Tecla númerica 0.\",\n    \"3-0\": \"Decimal1\",\n    \"3-1\": \"Tecla númerica 1.\",\n    \"4-0\": \"Decimal2\",\n    \"4-1\": \"Tecla númerica 2.\",\n    \"5-0\": \"Decimal3\",\n    \"5-1\": \"Tecla númerica 3.\",\n    \"6-0\": \"Decimal4\",\n    \"6-1\": \"Tecla númerica 4.\",\n    \"7-0\": \"Decimal5\",\n    \"7-1\": \"Tecla númerica 5.\",\n    \"8-0\": \"Decimal6\",\n    \"8-1\": \"Tecla númerica 6.\",\n    \"9-0\": \"Decimal7\",\n    \"9-1\": \"Tecla númerica 7.\",\n    \"10-0\": \"Decimal8\",\n    \"10-1\": \"Tecla númerica 8.\",\n    \"11-0\": \"Decimal9\",\n    \"11-1\": \"Tecla númerica 9.\",\n    \"12-0\": \"Function1\",\n    \"12-1\": \"Tecla de função 1.\",\n    \"13-0\": \"Function2\",\n    \"13-1\": \"Tecla de função 2.\",\n    \"14-0\": \"Function3\",\n    \"14-1\": \"Tecla de função 3.\",\n    \"15-0\": \"Function4\",\n    \"15-1\": \"Tecla de função 4.\",\n    \"16-0\": \"Return\",\n    \"16-1\": \"Tecla de enter.\"\n  },\n  \"cols\": 2,\n  \"rows\": 17\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ChangeDataPickerKeyResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ChangeDataPickerKeysResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors> </OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>200</StatusCode>\\n</ChangeDataPickerKeysResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nChangeDataPickerKeysRequest request = new ChangeDataPickerKeysRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\nrequest.UpKey = \\\"Function1\\\";\\nrequest.DownKey = \\\"Function2\\\";\\n\\nChangeDataPickerKeysResponse response = service.ChangeDataPickerKeys(request);\\n\\nif (response.Failure == true)\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"ChangeDataPickerKeyRequest request = new ChangeDataPickerKeyRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\nrequest.setUpKey(\\\"Function1\\\");\\nrequest.setDownKey(\\\"Function2\\\");\\n\\nChangeDataPickerKeyResponse response = service.changeDataPickerKey(request);\\n\\nif (response.getFailure() == true) {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:38:28.351Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":11,"parentDoc":"58405e02c050731900063531","project":"584054a2e3e04b230055c6b0","slug":"changedatapickerkey","sync_unique":"","title":"ChangeDataPickerKey","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"}]}

Ping


Operação responsável por verificar se o pinpad está conectado. Ela fará um ping a porta na qual ele estiver conectado, esta porta é definida no momento da criação e fica dentro do authorizer obtido pelos métodos GetOneOrFirstPinpad ou GetAllPinpads. [block:image] { "images": [ { "image": [ "https://files.readme.io/5217967-ping.png", "ping.png", 841, 503, "#1e1b1c" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "PingRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "2-0": "CardPaymentAuthorizer", "1-0": "Language", "0-1": "string", "1-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad ao qual será enviado o Ping." }, "cols": 4, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"String content\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n\t\t\t\"PinpadMessages\": {\n \t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n \t\t\t\t\t\"CreditLabel\": \"Crédito\",\n \t\t\t\t\t\"DebitLabel\": \"Débito\",\n \t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n \t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n \t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n \t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n \t\t\t\t\t\"TransactionTypeMenuLabel\": null\n \t\t\t\t},\n \"SaleAffiliationKey\": \"DE756D68F20B425*CDF*C8F94B5ABCB448\"\n\t}\n}", "language": "json" }, { "code": "<PingRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>String content</Language>\n <RequestKey>String content</RequestKey>\n <CardPaymentAuthorizer>\n\t<ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t<PinpadInformation>\n\t\t<IsContactless>true</IsContactless>\n\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t<Model>PPC920;10MB;U</Model>\n\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t<Specifications>1.08</Specifications>\n\t</PinpadInformation>\n\t<PinpadMessages>\n\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t<DebitLabel >Débito</DebitLabel>\n\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t</PinpadMessages>\n\t\t<SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n</PingRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "PingResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "IsConnected", "0-1": "string", "1-1": "bool", "4-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "True se o pinpad está conectado e False se não está." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200,\n\t\"IsConnected\":true\n}", "language": "json" }, { "code": "<PingResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors>\n </OperationErrors>\n <RequestKey></RequestKey>\n <StatusCode>200</StatusCode>\n <IsConnected>true</IsConnected>\n</PingResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta etabelecer conexão com o pinpad. Se não conseguir, mostra os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nPingRequest request = new PingRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nPingResponse response = service.Ping(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.IsConnected);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "PingRequest request = new PingRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nPingResponse response = service.ping(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getIsConnected());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Operação responsável por verificar se o pinpad está conectado. Ela fará um ping a porta na qual ele estiver conectado, esta porta é definida no momento da criação e fica dentro do authorizer obtido pelos métodos GetOneOrFirstPinpad ou GetAllPinpads. [block:image] { "images": [ { "image": [ "https://files.readme.io/5217967-ping.png", "ping.png", 841, 503, "#1e1b1c" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "PingRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "2-0": "CardPaymentAuthorizer", "1-0": "Language", "0-1": "string", "1-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad ao qual será enviado o Ping." }, "cols": 4, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"String content\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n\t\t\t\"PinpadMessages\": {\n \t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n \t\t\t\t\t\"CreditLabel\": \"Crédito\",\n \t\t\t\t\t\"DebitLabel\": \"Débito\",\n \t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n \t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n \t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n \t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n \t\t\t\t\t\"TransactionTypeMenuLabel\": null\n \t\t\t\t},\n \"SaleAffiliationKey\": \"DE756D68F20B425*CDF*C8F94B5ABCB448\"\n\t}\n}", "language": "json" }, { "code": "<PingRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>String content</Language>\n <RequestKey>String content</RequestKey>\n <CardPaymentAuthorizer>\n\t<ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t<PinpadInformation>\n\t\t<IsContactless>true</IsContactless>\n\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t<Model>PPC920;10MB;U</Model>\n\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t<Specifications>1.08</Specifications>\n\t</PinpadInformation>\n\t<PinpadMessages>\n\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t<DebitLabel >Débito</DebitLabel>\n\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t</PinpadMessages>\n\t\t<SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n</PingRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "PingResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "IsConnected", "0-1": "string", "1-1": "bool", "4-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "True se o pinpad está conectado e False se não está." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200,\n\t\"IsConnected\":true\n}", "language": "json" }, { "code": "<PingResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors>\n </OperationErrors>\n <RequestKey></RequestKey>\n <StatusCode>200</StatusCode>\n <IsConnected>true</IsConnected>\n</PingResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta etabelecer conexão com o pinpad. Se não conseguir, mostra os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nPingRequest request = new PingRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nPingResponse response = service.Ping(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.IsConnected);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "PingRequest request = new PingRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nPingResponse response = service.ping(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getIsConnected());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"585954978f0b4a2f006978a9","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por retirar conexão lógica com o pinpad e fechar a conexão física em uma porta serial. Esta porta é definida no momento da criação e** fica dentro do Authorizer obtido pelos métodos** GetOneOrFirstPinpad ou GetAllPinpads.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ClosePinpadConnectionRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador ligado ao pinpad que será desconectado.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\": [\\n    {\\n      \\\"ConnectionName\\\": \\\"COM3\\\",\\n      \\\"PinpadInformation\\\": {\\n        \\\"IsContactless\\\": true,\\n        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n        \\\"Specifications\\\": \\\"1.08\\\"\\n      },\\n\\t\\t\\t\\\"PinpadMessages\\\": {\\n\\t        \\\"ApprovedMessage\\\": \\\"APROVADO\\\",\\n\\t        \\\"CreditLabel\\\": null,\\n\\t        \\\"DebitLabel\\\": null,\\n\\t        \\\"DeclinedMessage\\\": \\\"NEGADO\\\",\\n\\t        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t        \\\"TransactionTypeMenuLabel\\\": null\\n\\t      },\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ClosePinpadConnectionRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n</ClosePinpadConnectionRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ClosePinpadConnectionResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Desrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Failure\",\n    \"2-0\": \"OperationErrors\",\n    \"3-0\": \"StatusCode\",\n    \"4-0\": \"IsClosed\",\n    \"0-1\": \"string\",\n    \"1-1\": \"bool\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"3-1\": \"int\",\n    \"4-1\": \"bool\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-2\": \"True se o pinpad foi desconectado e False se não foi.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":false,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"IsClosed\\\":true\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ClosePinpadConnectionResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>  \\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <IsClosed>true</IsClosed>\\n</ClosePinpadConnectionResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta fechar a conexão com o pinpad. Se não conseguir, mostra os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nClosePinpadConnectionResponse response = service.ClosePinpadConnection(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.IsClosed);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}ClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nClosePinpadConnectionResponse response = service.closePinpadConnection(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getIsClosed());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"ClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nClosePinpadConnectionResponse response = service.closePinpadConnection(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getIsClosed());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T15:56:07.002Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":12,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"closepinpadconnection-1","sync_unique":"","title":"ClosePinpadConnection","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

ClosePinpadConnection


Operação responsável por retirar conexão lógica com o pinpad e fechar a conexão física em uma porta serial. Esta porta é definida no momento da criação e** fica dentro do Authorizer obtido pelos métodos** GetOneOrFirstPinpad ou GetAllPinpads. [block:api-header] { "type": "basic", "title": "ClosePinpadConnectionRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "0-1": "string", "1-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad que será desconectado." }, "cols": 4, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\": [\n {\n \"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n\t\t\t\"PinpadMessages\": {\n\t \"ApprovedMessage\": \"APROVADO\",\n\t \"CreditLabel\": null,\n\t \"DebitLabel\": null,\n\t \"DeclinedMessage\": \"NEGADO\",\n\t \"InitializationMessage\": \"Iniciando\",\n\t \"MainLabel\": \"Stone Pagamentos\",\n\t \"ProcessingMessage\": \"Processando...\",\n\t \"TransactionTypeMenuLabel\": null\n\t },\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t}\n}", "language": "json" }, { "code": "<ClosePinpadConnectionRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n</ClosePinpadConnectionRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "ClosePinpadConnectionResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Desrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "IsClosed", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "4-1": "bool", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "True se o pinpad foi desconectado e False se não foi." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":false,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"String content\",\n\t\"StatusCode\":200,\n\t\"IsClosed\":true\n}", "language": "json" }, { "code": "<ClosePinpadConnectionResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure> \n <RequestKey>String content</RequestKey>\n <StatusCode>200</StatusCode>\n <IsClosed>true</IsClosed>\n</ClosePinpadConnectionResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta fechar a conexão com o pinpad. Se não conseguir, mostra os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nClosePinpadConnectionResponse response = service.ClosePinpadConnection(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.IsClosed);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}ClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nClosePinpadConnectionResponse response = service.closePinpadConnection(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getIsClosed());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "csharp" }, { "code": "ClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nClosePinpadConnectionResponse response = service.closePinpadConnection(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getIsClosed());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Operação responsável por retirar conexão lógica com o pinpad e fechar a conexão física em uma porta serial. Esta porta é definida no momento da criação e** fica dentro do Authorizer obtido pelos métodos** GetOneOrFirstPinpad ou GetAllPinpads. [block:api-header] { "type": "basic", "title": "ClosePinpadConnectionRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "0-1": "string", "1-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad que será desconectado." }, "cols": 4, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\": [\n {\n \"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n\t\t\t\"PinpadMessages\": {\n\t \"ApprovedMessage\": \"APROVADO\",\n\t \"CreditLabel\": null,\n\t \"DebitLabel\": null,\n\t \"DeclinedMessage\": \"NEGADO\",\n\t \"InitializationMessage\": \"Iniciando\",\n\t \"MainLabel\": \"Stone Pagamentos\",\n\t \"ProcessingMessage\": \"Processando...\",\n\t \"TransactionTypeMenuLabel\": null\n\t },\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t}\n}", "language": "json" }, { "code": "<ClosePinpadConnectionRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n</ClosePinpadConnectionRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "ClosePinpadConnectionResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Desrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "IsClosed", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "4-1": "bool", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "True se o pinpad foi desconectado e False se não foi." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":false,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"String content\",\n\t\"StatusCode\":200,\n\t\"IsClosed\":true\n}", "language": "json" }, { "code": "<ClosePinpadConnectionResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure> \n <RequestKey>String content</RequestKey>\n <StatusCode>200</StatusCode>\n <IsClosed>true</IsClosed>\n</ClosePinpadConnectionResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta fechar a conexão com o pinpad. Se não conseguir, mostra os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nClosePinpadConnectionResponse response = service.ClosePinpadConnection(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.IsClosed);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}ClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nClosePinpadConnectionResponse response = service.closePinpadConnection(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getIsClosed());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "csharp" }, { "code": "ClosePinpadConnectionRequest request = new ClosePinpadConnectionRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nClosePinpadConnectionResponse response = service.closePinpadConnection(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getIsClosed());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"58595546a305f83900831bd9","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por exibir mensagem na tela do pinpad.+\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ShowMessageRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"3-1\": \"string\",\n    \"4-1\": \"string\",\n    \"5-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"3-2\": \"Não\",\n    \"4-2\": \"Não\",\n    \"5-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"3-0\": \"FirstLine\",\n    \"4-0\": \"SecondLine\",\n    \"5-0\": \"Padding\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador ligado ao pinpad ao qual será mostrada a mensagem.\",\n    \"3-3\": \"Mensagem a ser mostrada na primeira linha do pinpad. Possui tamanho máximo de 16 caracteres.\",\n    \"4-3\": \"Mensagem a ser mostrada na segunda linha do pinpad. Possui tamanho máximo de 16 caracteres.\",\n    \"5-3\": \"Representa o modo como e mensagem será alinhada na tela do pinpad. Se deixado em branco, o valor default será Left.\"\n  },\n  \"cols\": 4,\n  \"rows\": 6\n}\n[/block]\n**Códigos do padding disponiveis:** \n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Ação\",\n    \"0-0\": \"Left\",\n    \"1-0\": \"Center\",\n    \"2-0\": \"Right\",\n    \"0-1\": \"Alinha a mensagem à esquerda do pinpad.\",\n    \"1-1\": \"Centraliza a mensagem na tela do pinpad.\",\n    \"2-1\": \"Alinha a mensagem à direita do pinpad.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t      \\\"PinpadInformation\\\": {\\n\\t        \\\"IsContactless\\\": true,\\n\\t        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t        \\\"Specifications\\\": \\\"1.08\\\"\\n\\t      },\\n\\t\\t\\t\\t\\\"PinpadMessages\\\": {\\n\\t \\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t \\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t \\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t \\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t \\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t \\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t \\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t \\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t \\t\\t\\t\\t},\\n\\t      \\\"SaleAffiliationKey\\\": \\\"DE756D68F20B425*CDF*C8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"FirstLine\\\":\\\"String content\\\",\\n\\t\\\"Padding\\\":\\\"String content\\\",\\n\\t\\\"SecondLine\\\":\\\"String content\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ShowMessageRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n\\t<ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t<PinpadInformation>\\n\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t<Specifications>1.08</Specifications>\\n\\t</PinpadInformation>\\n\\t<PinpadMessages>\\n\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t</PinpadMessages>\\n\\t\\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <FirstLine>String content</FirstLine>\\n  <Padding>String content</Padding>\\n  <SecondLine>String content</SecondLine>\\n</ShowMessageRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ShowMessageResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"WasDisplayed\",\n    \"4-1\": \"bool\",\n    \"4-2\": \"True se a mensagem foi recebida e exibida e False caso contrário.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":false,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"WasDisplayed\\\":true\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ShowMessageResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors>  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <WasDisplayed>true</WasDisplayed>\\n</ShowMessageResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo, se Failure for False, mostra mensagem\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HELLO\\nWORLD\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nna tela do pinpad, alinhados à direita. Se Failure for True, mostrará os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nShowMessageRequest request = new ShowMessageRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nrequest.FirstLine = \\\"HELLO\\\";\\nrequest.SecondLine = \\\"WORLD\\\";\\nrequest.Padding = \\\"Right\\\";\\n\\nShowMessageResponse response = service.ShowMessage(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.WasDisplayed);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"ShowMessageRequest request = new ShowMessageRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nrequest.setFirstLine(\\\"HELLO\\\");\\nrequest.setSecondLine(\\\"WORLD\\\");\\nrequest.setPadding(\\\"Right\\\");\\n\\nShowMessageResponse response = service.showMessage(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getWasDisplayed());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T15:59:02.880Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":13,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"showmessage-1","sync_unique":"","title":"ShowMessage","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

ShowMessage


Operação responsável por exibir mensagem na tela do pinpad.+ [block:api-header] { "type": "basic", "title": "ShowMessageRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-1": "string", "1-1": "string", "3-1": "string", "4-1": "string", "5-1": "string", "0-2": "Não", "1-2": "Não", "3-2": "Não", "4-2": "Não", "5-2": "Não", "2-2": "Sim", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "2-1": "CardPaymentAuthorizerContract", "3-0": "FirstLine", "4-0": "SecondLine", "5-0": "Padding", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad ao qual será mostrada a mensagem.", "3-3": "Mensagem a ser mostrada na primeira linha do pinpad. Possui tamanho máximo de 16 caracteres.", "4-3": "Mensagem a ser mostrada na segunda linha do pinpad. Possui tamanho máximo de 16 caracteres.", "5-3": "Representa o modo como e mensagem será alinhada na tela do pinpad. Se deixado em branco, o valor default será Left." }, "cols": 4, "rows": 6 } [/block] **Códigos do padding disponiveis:** [block:parameters] { "data": { "h-0": "Código", "h-1": "Ação", "0-0": "Left", "1-0": "Center", "2-0": "Right", "0-1": "Alinha a mensagem à esquerda do pinpad.", "1-1": "Centraliza a mensagem na tela do pinpad.", "2-1": "Alinha a mensagem à direita do pinpad." }, "cols": 2, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\": \"COM3\",\n\t \"PinpadInformation\": {\n\t \"IsContactless\": true,\n\t \"ManufacturerName\": \"GERTEC \",\n\t \"ManufacturerVersion\": \"001.04 130922 \",\n\t \"Model\": \"PPC920;10MB;U \",\n\t \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t \"SerialNumber\": \"7101761507003063 \",\n\t \"Specifications\": \"1.08\"\n\t },\n\t\t\t\t\"PinpadMessages\": {\n\t \t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t \t\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t \t\t\t\t\t\"DebitLabel\": \"Débito\",\n\t \t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t \t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t \t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t \t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t \t\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t \t\t\t\t},\n\t \"SaleAffiliationKey\": \"DE756D68F20B425*CDF*C8F94B5ABCB448\"\n\t},\n\t\"FirstLine\":\"String content\",\n\t\"Padding\":\"String content\",\n\t\"SecondLine\":\"String content\"\n}", "language": "json" }, { "code": "<ShowMessageRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <CardPaymentAuthorizer>\n\t<ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t<PinpadInformation>\n\t\t<IsContactless>true</IsContactless>\n\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t<Model>PPC920;10MB;U</Model>\n\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t<Specifications>1.08</Specifications>\n\t</PinpadInformation>\n\t<PinpadMessages>\n\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t<DebitLabel >Débito</DebitLabel>\n\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t</PinpadMessages>\n\t\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <FirstLine>String content</FirstLine>\n <Padding>String content</Padding>\n <SecondLine>String content</SecondLine>\n</ShowMessageRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "ShowMessageResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "0-1": "string", "0-2": "Identificador único associado a cada request.", "1-0": "Failure", "1-1": "bool", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-0": "OperationErrors", "2-1": "List<ErrorReport>", "2-2": "Lista com os erros caso o Failure seja True.", "3-0": "StatusCode", "3-1": "int", "3-2": "Código HTTP do erro.", "4-0": "WasDisplayed", "4-1": "bool", "4-2": "True se a mensagem foi recebida e exibida e False caso contrário." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":false,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200,\n\t\"WasDisplayed\":true\n}", "language": "json" }, { "code": "<ShowMessageResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>2147483647</StatusCode>\n <WasDisplayed>true</WasDisplayed>\n</ShowMessageResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo, se Failure for False, mostra mensagem [block:code] { "codes": [ { "code": "HELLO\nWORLD", "language": "text" } ] } [/block] na tela do pinpad, alinhados à direita. Se Failure for True, mostrará os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nShowMessageRequest request = new ShowMessageRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nrequest.FirstLine = \"HELLO\";\nrequest.SecondLine = \"WORLD\";\nrequest.Padding = \"Right\";\n\nShowMessageResponse response = service.ShowMessage(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.WasDisplayed);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "ShowMessageRequest request = new ShowMessageRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nrequest.setFirstLine(\"HELLO\");\nrequest.setSecondLine(\"WORLD\");\nrequest.setPadding(\"Right\");\n\nShowMessageResponse response = service.showMessage(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getWasDisplayed());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Operação responsável por exibir mensagem na tela do pinpad.+ [block:api-header] { "type": "basic", "title": "ShowMessageRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-1": "string", "1-1": "string", "3-1": "string", "4-1": "string", "5-1": "string", "0-2": "Não", "1-2": "Não", "3-2": "Não", "4-2": "Não", "5-2": "Não", "2-2": "Sim", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "2-1": "CardPaymentAuthorizerContract", "3-0": "FirstLine", "4-0": "SecondLine", "5-0": "Padding", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad ao qual será mostrada a mensagem.", "3-3": "Mensagem a ser mostrada na primeira linha do pinpad. Possui tamanho máximo de 16 caracteres.", "4-3": "Mensagem a ser mostrada na segunda linha do pinpad. Possui tamanho máximo de 16 caracteres.", "5-3": "Representa o modo como e mensagem será alinhada na tela do pinpad. Se deixado em branco, o valor default será Left." }, "cols": 4, "rows": 6 } [/block] **Códigos do padding disponiveis:** [block:parameters] { "data": { "h-0": "Código", "h-1": "Ação", "0-0": "Left", "1-0": "Center", "2-0": "Right", "0-1": "Alinha a mensagem à esquerda do pinpad.", "1-1": "Centraliza a mensagem na tela do pinpad.", "2-1": "Alinha a mensagem à direita do pinpad." }, "cols": 2, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\": \"COM3\",\n\t \"PinpadInformation\": {\n\t \"IsContactless\": true,\n\t \"ManufacturerName\": \"GERTEC \",\n\t \"ManufacturerVersion\": \"001.04 130922 \",\n\t \"Model\": \"PPC920;10MB;U \",\n\t \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t \"SerialNumber\": \"7101761507003063 \",\n\t \"Specifications\": \"1.08\"\n\t },\n\t\t\t\t\"PinpadMessages\": {\n\t \t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t \t\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t \t\t\t\t\t\"DebitLabel\": \"Débito\",\n\t \t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t \t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t \t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t \t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t \t\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t \t\t\t\t},\n\t \"SaleAffiliationKey\": \"DE756D68F20B425*CDF*C8F94B5ABCB448\"\n\t},\n\t\"FirstLine\":\"String content\",\n\t\"Padding\":\"String content\",\n\t\"SecondLine\":\"String content\"\n}", "language": "json" }, { "code": "<ShowMessageRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <CardPaymentAuthorizer>\n\t<ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t<PinpadInformation>\n\t\t<IsContactless>true</IsContactless>\n\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t<Model>PPC920;10MB;U</Model>\n\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t<Specifications>1.08</Specifications>\n\t</PinpadInformation>\n\t<PinpadMessages>\n\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t<DebitLabel >Débito</DebitLabel>\n\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t</PinpadMessages>\n\t\t<SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <FirstLine>String content</FirstLine>\n <Padding>String content</Padding>\n <SecondLine>String content</SecondLine>\n</ShowMessageRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "ShowMessageResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "0-1": "string", "0-2": "Identificador único associado a cada request.", "1-0": "Failure", "1-1": "bool", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-0": "OperationErrors", "2-1": "List<ErrorReport>", "2-2": "Lista com os erros caso o Failure seja True.", "3-0": "StatusCode", "3-1": "int", "3-2": "Código HTTP do erro.", "4-0": "WasDisplayed", "4-1": "bool", "4-2": "True se a mensagem foi recebida e exibida e False caso contrário." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":false,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200,\n\t\"WasDisplayed\":true\n}", "language": "json" }, { "code": "<ShowMessageResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>2147483647</StatusCode>\n <WasDisplayed>true</WasDisplayed>\n</ShowMessageResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo, se Failure for False, mostra mensagem [block:code] { "codes": [ { "code": "HELLO\nWORLD", "language": "text" } ] } [/block] na tela do pinpad, alinhados à direita. Se Failure for True, mostrará os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nShowMessageRequest request = new ShowMessageRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nrequest.FirstLine = \"HELLO\";\nrequest.SecondLine = \"WORLD\";\nrequest.Padding = \"Right\";\n\nShowMessageResponse response = service.ShowMessage(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.WasDisplayed);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "ShowMessageRequest request = new ShowMessageRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nrequest.setFirstLine(\"HELLO\");\nrequest.setSecondLine(\"WORLD\");\nrequest.setPadding(\"Right\");\n\nShowMessageResponse response = service.showMessage(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getWasDisplayed());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"585957e2e342f919009320b8","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por recuperar PAN (Primary Account Number, ou melhor, aquele número de 12 à 16 caracteres impresso na frente do cartão) mascarado do cartão fornecido.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"essa operação é bastante usada no caso de querer cancelar uma transação obrigando a ter cartão presencial.\",\n  \"title\": \"Dica\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetSecurePanRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador ligado ao pinpad ao qual será lido o PAN do cartão.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"PT\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\":\\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\t \\\"IsContactless\\\": true,\\n\\t\\t\\t\\t \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\t \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\t \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\t \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\t \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\t \\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t\\t },\\n\\t\\t \\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t\\t},\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"String content\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetSecurePanRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName>COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n\\t\\t  <SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n</GetSecurePanRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetSecurePanResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Failure\",\n    \"2-0\": \"OperationErrors\",\n    \"3-0\": \"StatusCode\",\n    \"4-0\": \"MaskedPan\",\n    \"0-1\": \"string\",\n    \"4-1\": \"string\",\n    \"1-1\": \"bool\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"3-1\": \"int\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-2\": \"PAN mascarado se cartão o foi fornecido.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"MaskedPan\\\":\\\"\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetSecurePanResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors></OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <MaskedPan>String content</MaskedPan>\\n</GetSecurePanResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta ler o PAN de um cartão. Se um cartão foi fornecido, mostra o PAN mascarado. Senão, mostra os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetSecurePanRequest request = new GetSecurePanRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nGetSecurePanResponse response = service.GetSecurePan(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.MaskedPan);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetSecurePanRequest request = new GetSecurePanRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nGetSecurePanResponse response = service.getSecurePan(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getMaskedPan());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T16:10:10.270Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":14,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"getsecurepan-1","sync_unique":"","title":"GetSecurePan","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

GetSecurePan


Operação responsável por recuperar PAN (Primary Account Number, ou melhor, aquele número de 12 à 16 caracteres impresso na frente do cartão) mascarado do cartão fornecido. [block:callout] { "type": "info", "body": "essa operação é bastante usada no caso de querer cancelar uma transação obrigando a ter cartão presencial.", "title": "Dica" } [/block] [block:api-header] { "type": "basic", "title": "GetSecurePanRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "0-1": "string", "1-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad ao qual será lido o PAN do cartão." }, "cols": 4, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"PT\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\":\"COM3\",\n\t\t\"PinpadInformation\": {\n\t\t\t\t \"IsContactless\": true,\n\t\t\t\t \"ManufacturerName\": \"GERTEC \",\n\t\t\t\t \"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\t \"Model\": \"PPC920;10MB;U \",\n\t\t\t\t \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\t \"SerialNumber\": \"7101761507003063 \",\n\t\t\t\t \"Specifications\": \"1.08\"\n\t\t\t },\n\t\t \"PinpadMessages\": {\n\t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t\t\t},\n\t\t\"SaleAffiliationKey\":\"String content\"\n\t}\n}", "language": "json" }, { "code": "<GetSecurePanRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <CardPaymentAuthorizer>\n <ConnectionName>COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n\t\t <SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n</GetSecurePanRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetSecurePanResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "MaskedPan", "0-1": "string", "4-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "PAN mascarado se cartão o foi fornecido." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200,\n\t\"MaskedPan\":\"\"\n}", "language": "json" }, { "code": "<GetSecurePanResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>true</Failure>\n <OperationErrors></OperationErrors>\n <RequestKey></RequestKey>\n <StatusCode>200</StatusCode>\n <MaskedPan>String content</MaskedPan>\n</GetSecurePanResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta ler o PAN de um cartão. Se um cartão foi fornecido, mostra o PAN mascarado. Senão, mostra os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetSecurePanRequest request = new GetSecurePanRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nGetSecurePanResponse response = service.GetSecurePan(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.MaskedPan);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "GetSecurePanRequest request = new GetSecurePanRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nGetSecurePanResponse response = service.getSecurePan(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getMaskedPan());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Operação responsável por recuperar PAN (Primary Account Number, ou melhor, aquele número de 12 à 16 caracteres impresso na frente do cartão) mascarado do cartão fornecido. [block:callout] { "type": "info", "body": "essa operação é bastante usada no caso de querer cancelar uma transação obrigando a ter cartão presencial.", "title": "Dica" } [/block] [block:api-header] { "type": "basic", "title": "GetSecurePanRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "0-1": "string", "1-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad ao qual será lido o PAN do cartão." }, "cols": 4, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"PT\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\":\"COM3\",\n\t\t\"PinpadInformation\": {\n\t\t\t\t \"IsContactless\": true,\n\t\t\t\t \"ManufacturerName\": \"GERTEC \",\n\t\t\t\t \"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\t \"Model\": \"PPC920;10MB;U \",\n\t\t\t\t \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\t \"SerialNumber\": \"7101761507003063 \",\n\t\t\t\t \"Specifications\": \"1.08\"\n\t\t\t },\n\t\t \"PinpadMessages\": {\n\t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t\t\t},\n\t\t\"SaleAffiliationKey\":\"String content\"\n\t}\n}", "language": "json" }, { "code": "<GetSecurePanRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <CardPaymentAuthorizer>\n <ConnectionName>COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n\t\t <SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n</GetSecurePanRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetSecurePanResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "StatusCode", "4-0": "MaskedPan", "0-1": "string", "4-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "int", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Código HTTP do erro.", "4-2": "PAN mascarado se cartão o foi fornecido." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200,\n\t\"MaskedPan\":\"\"\n}", "language": "json" }, { "code": "<GetSecurePanResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>true</Failure>\n <OperationErrors></OperationErrors>\n <RequestKey></RequestKey>\n <StatusCode>200</StatusCode>\n <MaskedPan>String content</MaskedPan>\n</GetSecurePanResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta ler o PAN de um cartão. Se um cartão foi fornecido, mostra o PAN mascarado. Senão, mostra os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetSecurePanRequest request = new GetSecurePanRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nGetSecurePanResponse response = service.GetSecurePan(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.MaskedPan);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "GetSecurePanRequest request = new GetSecurePanRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nGetSecurePanResponse response = service.getSecurePan(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getMaskedPan());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"585957f6a305f83900831bdf","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por recuperar **tecla de controle** pressionada no pinpad.+\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetKeyRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"1-1\": \"string\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador ligado ao pinpad que lerá a tecla.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\": [\\n\\t\\t{\\n\\t\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\t\\\"IsContactless\\\": true,\\n\\t\\t\\t\\t\\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\t\\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\t\\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\t\\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\t\\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\t\\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t\\t},\\n\\t\\t\\t\\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t\\t},\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetKeyRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n\\t<CardPaymentAuthorizer>\\n\\t\\t<ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n\\t\\t<SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n\\t</CardPaymentAuthorizer>\\n</GetKeyRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetKeyResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"KeyPressed\",\n    \"4-1\": \"string\",\n    \"4-2\": \"Nome da tecla pressionada.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[{\\n\\t\\t\\\"Code\\\":\\\"String content\\\",\\n\\t\\t\\\"Field\\\":\\\"String content\\\",\\n\\t\\t\\\"Message\\\":\\\"String content\\\"\\n\\t}],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":2147483647,\\n\\t\\\"KeyPressed\\\":\\\"String content\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetKeyResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <KeyPressed>String content</KeyPressed>\\n</GetKeyResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta ler uma tecla de controle do pinpad. Se conseguir, mostra o nome da tecla. Se não conseguir, mostra os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetKeyRequest request = new GetKeyRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nGetKeyResponse response = service.GetKey(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.KeyPressed);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\\n\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetKeyRequest request = new GetKeyRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nGetKeyResponse response = service.getKey(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getKeyPressed());  \\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Tabela de Códigos de Teclas\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Tecla\",\n    \"0-0\": \"Backspace\",\n    \"0-1\": \"Tecla de backspace .\",\n    \"1-0\": \"Cancel\",\n    \"1-1\": \"Tecla de cancel.\",\n    \"2-0\": \"Decimal0\",\n    \"2-1\": \"Tecla númerica 0.\",\n    \"3-0\": \"Decimal1\",\n    \"3-1\": \"Tecla númerica 1.\",\n    \"4-0\": \"Decimal2\",\n    \"4-1\": \"Tecla númerica 2.\",\n    \"5-0\": \"Decimal3\",\n    \"5-1\": \"Tecla númerica 3.\",\n    \"6-0\": \"Decimal4\",\n    \"6-1\": \"Tecla númerica 4.\",\n    \"7-0\": \"Decimal5\",\n    \"7-1\": \"Tecla númerica 5.\",\n    \"8-0\": \"Decimal6\",\n    \"8-1\": \"Tecla númerica 6.\",\n    \"9-0\": \"Decimal7\",\n    \"9-1\": \"Tecla númerica 7.\",\n    \"10-0\": \"Decimal8\",\n    \"10-1\": \"Tecla númerica 8.\",\n    \"11-0\": \"Decimal9\",\n    \"11-1\": \"Tecla númerica 9.\",\n    \"12-0\": \"Function1\",\n    \"12-1\": \"Tecla de função 1.\",\n    \"13-0\": \"Function2\",\n    \"13-1\": \"Tecla de função 2.\",\n    \"14-0\": \"Function3\",\n    \"14-1\": \"Tecla de função 3.\",\n    \"15-0\": \"Function4\",\n    \"15-1\": \"Tecla de função 4.\",\n    \"16-0\": \"Return\",\n    \"16-1\": \"Tecla de enter.\"\n  },\n  \"cols\": 2,\n  \"rows\": 17\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T16:10:30.805Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":15,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"getkey-1","sync_unique":"","title":"GetKey","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

GetKey


Operação responsável por recuperar **tecla de controle** pressionada no pinpad.+ [block:api-header] { "type": "basic", "title": "GetKeyRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "2-1": "CardPaymentAuthorizerContract", "1-1": "string", "0-1": "string", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad que lerá a tecla." }, "cols": 4, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\": [\n\t\t{\n\t\t\t\"ConnectionName\": \"COM3\",\n\t\t\t\"PinpadInformation\": {\n\t\t\t\t\"IsContactless\": true,\n\t\t\t\t\"ManufacturerName\": \"GERTEC \",\n\t\t\t\t\"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\t\"Model\": \"PPC920;10MB;U \",\n\t\t\t\t\"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\t\"SerialNumber\": \"7101761507003063 \",\n\t\t\t\t\"Specifications\": \"1.08\"\n\t\t\t},\n\t\t\t\"PinpadMessages\": {\n\t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t\t\t},\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t}\n}", "language": "json" }, { "code": "<GetKeyRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>String content</Language>\n <RequestKey>String content</RequestKey>\n\t<CardPaymentAuthorizer>\n\t\t<ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n\t\t<SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n\t</CardPaymentAuthorizer>\n</GetKeyRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetKeyResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "0-1": "string", "0-2": "Identificador único associado a cada request.", "1-0": "Failure", "1-1": "bool", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-0": "OperationErrors", "2-1": "List<ErrorReport>", "2-2": "Lista com os erros caso o Failure seja True.", "3-0": "StatusCode", "3-1": "int", "3-2": "Código HTTP do erro.", "4-0": "KeyPressed", "4-1": "string", "4-2": "Nome da tecla pressionada." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[{\n\t\t\"Code\":\"String content\",\n\t\t\"Field\":\"String content\",\n\t\t\"Message\":\"String content\"\n\t}],\n\t\"RequestKey\":\"String content\",\n\t\"StatusCode\":2147483647,\n\t\"KeyPressed\":\"String content\"\n}", "language": "json" }, { "code": "<GetKeyResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>true</Failure>\n <OperationErrors>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code>String content</Code>\n <Field>String content</Field>\n <Message>String content</Message>\n </ErrorReport>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code>String content</Code>\n <Field>String content</Field>\n <Message>String content</Message>\n </ErrorReport>\n </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>2147483647</StatusCode>\n <KeyPressed>String content</KeyPressed>\n</GetKeyResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta ler uma tecla de controle do pinpad. Se conseguir, mostra o nome da tecla. Se não conseguir, mostra os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetKeyRequest request = new GetKeyRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nGetKeyResponse response = service.GetKey(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.KeyPressed);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}\n", "language": "csharp" }, { "code": "GetKeyRequest request = new GetKeyRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nGetKeyResponse response = service.getKey(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getKeyPressed()); \n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block] [block:api-header] { "type": "basic", "title": "Tabela de Códigos de Teclas" } [/block] [block:parameters] { "data": { "h-0": "Código", "h-1": "Tecla", "0-0": "Backspace", "0-1": "Tecla de backspace .", "1-0": "Cancel", "1-1": "Tecla de cancel.", "2-0": "Decimal0", "2-1": "Tecla númerica 0.", "3-0": "Decimal1", "3-1": "Tecla númerica 1.", "4-0": "Decimal2", "4-1": "Tecla númerica 2.", "5-0": "Decimal3", "5-1": "Tecla númerica 3.", "6-0": "Decimal4", "6-1": "Tecla númerica 4.", "7-0": "Decimal5", "7-1": "Tecla númerica 5.", "8-0": "Decimal6", "8-1": "Tecla númerica 6.", "9-0": "Decimal7", "9-1": "Tecla númerica 7.", "10-0": "Decimal8", "10-1": "Tecla númerica 8.", "11-0": "Decimal9", "11-1": "Tecla númerica 9.", "12-0": "Function1", "12-1": "Tecla de função 1.", "13-0": "Function2", "13-1": "Tecla de função 2.", "14-0": "Function3", "14-1": "Tecla de função 3.", "15-0": "Function4", "15-1": "Tecla de função 4.", "16-0": "Return", "16-1": "Tecla de enter." }, "cols": 2, "rows": 17 } [/block]
Operação responsável por recuperar **tecla de controle** pressionada no pinpad.+ [block:api-header] { "type": "basic", "title": "GetKeyRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "2-1": "CardPaymentAuthorizerContract", "1-1": "string", "0-1": "string", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad que lerá a tecla." }, "cols": 4, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\": [\n\t\t{\n\t\t\t\"ConnectionName\": \"COM3\",\n\t\t\t\"PinpadInformation\": {\n\t\t\t\t\"IsContactless\": true,\n\t\t\t\t\"ManufacturerName\": \"GERTEC \",\n\t\t\t\t\"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\t\"Model\": \"PPC920;10MB;U \",\n\t\t\t\t\"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\t\"SerialNumber\": \"7101761507003063 \",\n\t\t\t\t\"Specifications\": \"1.08\"\n\t\t\t},\n\t\t\t\"PinpadMessages\": {\n\t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t\t\t},\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t}\n}", "language": "json" }, { "code": "<GetKeyRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>String content</Language>\n <RequestKey>String content</RequestKey>\n\t<CardPaymentAuthorizer>\n\t\t<ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n\t\t<SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n\t</CardPaymentAuthorizer>\n</GetKeyRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetKeyResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "0-1": "string", "0-2": "Identificador único associado a cada request.", "1-0": "Failure", "1-1": "bool", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-0": "OperationErrors", "2-1": "List<ErrorReport>", "2-2": "Lista com os erros caso o Failure seja True.", "3-0": "StatusCode", "3-1": "int", "3-2": "Código HTTP do erro.", "4-0": "KeyPressed", "4-1": "string", "4-2": "Nome da tecla pressionada." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[{\n\t\t\"Code\":\"String content\",\n\t\t\"Field\":\"String content\",\n\t\t\"Message\":\"String content\"\n\t}],\n\t\"RequestKey\":\"String content\",\n\t\"StatusCode\":2147483647,\n\t\"KeyPressed\":\"String content\"\n}", "language": "json" }, { "code": "<GetKeyResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>true</Failure>\n <OperationErrors>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code>String content</Code>\n <Field>String content</Field>\n <Message>String content</Message>\n </ErrorReport>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code>String content</Code>\n <Field>String content</Field>\n <Message>String content</Message>\n </ErrorReport>\n </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>2147483647</StatusCode>\n <KeyPressed>String content</KeyPressed>\n</GetKeyResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta ler uma tecla de controle do pinpad. Se conseguir, mostra o nome da tecla. Se não conseguir, mostra os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetKeyRequest request = new GetKeyRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nGetKeyResponse response = service.GetKey(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.KeyPressed);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}\n", "language": "csharp" }, { "code": "GetKeyRequest request = new GetKeyRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nGetKeyResponse response = service.getKey(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getKeyPressed()); \n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block] [block:api-header] { "type": "basic", "title": "Tabela de Códigos de Teclas" } [/block] [block:parameters] { "data": { "h-0": "Código", "h-1": "Tecla", "0-0": "Backspace", "0-1": "Tecla de backspace .", "1-0": "Cancel", "1-1": "Tecla de cancel.", "2-0": "Decimal0", "2-1": "Tecla númerica 0.", "3-0": "Decimal1", "3-1": "Tecla númerica 1.", "4-0": "Decimal2", "4-1": "Tecla númerica 2.", "5-0": "Decimal3", "5-1": "Tecla númerica 3.", "6-0": "Decimal4", "6-1": "Tecla númerica 4.", "7-0": "Decimal5", "7-1": "Tecla númerica 5.", "8-0": "Decimal6", "8-1": "Tecla númerica 6.", "9-0": "Decimal7", "9-1": "Tecla númerica 7.", "10-0": "Decimal8", "10-1": "Tecla númerica 8.", "11-0": "Decimal9", "11-1": "Tecla númerica 9.", "12-0": "Function1", "12-1": "Tecla de função 1.", "13-0": "Function2", "13-1": "Tecla de função 2.", "14-0": "Function3", "14-1": "Tecla de função 3.", "15-0": "Function4", "15-1": "Tecla de função 4.", "16-0": "Return", "16-1": "Tecla de enter." }, "cols": 2, "rows": 17 } [/block]
{"__v":0,"_id":"585959b921661625009d7852","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por recuperar input númerico do pinpad.+\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Operação unicamente suportado nos pinpads do modelo Gertec Mobi Pin 10.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericInputRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"3-0\": \"FirstLine\",\n    \"4-0\": \"SecondLine\",\n    \"5-0\": \"MinimumLength\",\n    \"6-0\": \"MaximumLength\",\n    \"7-0\": \"TimeOut\",\n    \"7-1\": \"int\",\n    \"6-1\": \"int\",\n    \"5-1\": \"int\",\n    \"4-1\": \"string\",\n    \"3-1\": \"string\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"3-2\": \"Sim\",\n    \"4-2\": \"Sim\",\n    \"5-2\": \"Sim\",\n    \"6-2\": \"Sim\",\n    \"7-2\": \"Sim\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador ligado ao pinpad ao qual será lido o input.\",\n    \"3-3\": \"Código do texto a ser exibido na primeira linha da tela do pinpad.\",\n    \"4-3\": \"Código do texto a ser exibido na segunda linha da tela do pinpad.\",\n    \"5-3\": \"Tamanho mínimo do input. De 0 a 99.\",\n    \"6-3\": \"Tamanho máximo do input. De 0 a 99.\",\n    \"7-3\": \"Tempo para time out, definido em segundos. De 0 a 999.\"\n  },\n  \"cols\": 4,\n  \"rows\": 8\n}\n[/block]\n**Códigos do texto a ser exibido na primeira linha:**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Mensagem a ser exibida na primeira linha\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n**Códigos do texto a ser exibido na segunda linha:**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Mensagem a ser exibida na segunda linha\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n  \\\"PinpadInformation\\\": {\\n    \\\"IsContactless\\\": true,\\n    \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n    \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n    \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n    \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n    \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n    \\\"Specifications\\\": \\\"1.08\\\"\\n  },\\n\\t\\\"PinpadMessages\\\": {\\n\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t},\\n  \\\"SaleAffiliationKey\\\": \\\"DE756D68F20B425*CDF*C8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"FirstLine\\\":\\\"1\\\",\\n\\t\\\"MaximumLength\\\":80,\\n\\t\\\"MinimumLength\\\":80,\\n\\t\\\"SecondLine\\\":\\\"2\\\",\\n\\t\\\"TimeOut\\\":100\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericInputRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n\\t<CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <FirstLine>1</FirstLine>\\n  <MaximumLength>80</MaximumLength>\\n  <MinimumLength>80</MinimumLength>\\n  <SecondLine>2</SecondLine>\\n  <TimeOut>100</TimeOut>\\n</GetNumericInputRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericInputResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta ler um input numérico com as seguintes configuranções:\n\n* Na primeira linha, será exibido: \"Entre\"\n\n* Na segunda linha, será exibido: \"Mesa\"\n\n* O operador do pinpad poderá digitar entre 0 e 2 números\n\n* O timeout da operação é 1 minuto (60 segundos)\n\nSe houver algum input, o código abaixo deverá exibir o input lido. Se não houver, mostrará os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetNumericInputRequest request = new GetNumericInputRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n\\nrequest.FirstLine = \\\"Enter\\\";\\nrequest.SecondLine = \\\"Board\\\";\\nrequest.MinimumLength = 0;\\nrequest.MaximumLength = 2;\\nrequest.TimeOut = 60;\\n\\nGetNumericInputResponse response = service.GetNumericInput(request);\\n\\nif (response.Failure == false)\\n{\\n    Console.WriteLine(response.Input);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\\n\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetNumericInputRequest request = new GetNumericInputRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\n\\nrequest.setFirstLine(\\\"Enter\\\");\\nrequest.setSecondLine(\\\"Board\\\");\\nrequest.setMinimumLength(0);\\nrequest.setMaximumLength(2);\\nrequest.setTimeOut(60);\\n\\nGetNumericInputResponse response = service.getNumericInput(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getInput());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T16:18:01.389Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":16,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"getnumericinput-1","sync_unique":"","title":"GetNumericInput","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

GetNumericInput


Operação responsável por recuperar input númerico do pinpad.+ [block:callout] { "type": "info", "body": "Operação unicamente suportado nos pinpads do modelo Gertec Mobi Pin 10." } [/block] [block:api-header] { "type": "basic", "title": "GetNumericInputRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "FirstLine", "4-0": "SecondLine", "5-0": "MinimumLength", "6-0": "MaximumLength", "7-0": "TimeOut", "7-1": "int", "6-1": "int", "5-1": "int", "4-1": "string", "3-1": "string", "0-1": "string", "1-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "4-2": "Sim", "5-2": "Sim", "6-2": "Sim", "7-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad ao qual será lido o input.", "3-3": "Código do texto a ser exibido na primeira linha da tela do pinpad.", "4-3": "Código do texto a ser exibido na segunda linha da tela do pinpad.", "5-3": "Tamanho mínimo do input. De 0 a 99.", "6-3": "Tamanho máximo do input. De 0 a 99.", "7-3": "Tempo para time out, definido em segundos. De 0 a 999." }, "cols": 4, "rows": 8 } [/block] **Códigos do texto a ser exibido na primeira linha:** [block:parameters] { "data": { "h-0": "Código", "h-1": "Mensagem a ser exibida na primeira linha" }, "cols": 2, "rows": 1 } [/block] **Códigos do texto a ser exibido na segunda linha:** [block:parameters] { "data": { "h-0": "Código", "h-1": "Mensagem a ser exibida na segunda linha" }, "cols": 2, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n\t\"PinpadMessages\": {\n\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t},\n \"SaleAffiliationKey\": \"DE756D68F20B425*CDF*C8F94B5ABCB448\"\n\t},\n\t\"FirstLine\":\"1\",\n\t\"MaximumLength\":80,\n\t\"MinimumLength\":80,\n\t\"SecondLine\":\"2\",\n\t\"TimeOut\":100\n}", "language": "json" }, { "code": "<GetNumericInputRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>String content</Language>\n <RequestKey>String content</RequestKey>\n\t<CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <FirstLine>1</FirstLine>\n <MaximumLength>80</MaximumLength>\n <MinimumLength>80</MinimumLength>\n <SecondLine>2</SecondLine>\n <TimeOut>100</TimeOut>\n</GetNumericInputRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetNumericInputResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "", "language": "json" }, { "code": "", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta ler um input numérico com as seguintes configuranções: * Na primeira linha, será exibido: "Entre" * Na segunda linha, será exibido: "Mesa" * O operador do pinpad poderá digitar entre 0 e 2 números * O timeout da operação é 1 minuto (60 segundos) Se houver algum input, o código abaixo deverá exibir o input lido. Se não houver, mostrará os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetNumericInputRequest request = new GetNumericInputRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nrequest.FirstLine = \"Enter\";\nrequest.SecondLine = \"Board\";\nrequest.MinimumLength = 0;\nrequest.MaximumLength = 2;\nrequest.TimeOut = 60;\n\nGetNumericInputResponse response = service.GetNumericInput(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.Input);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}\n", "language": "csharp" }, { "code": "GetNumericInputRequest request = new GetNumericInputRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nrequest.setFirstLine(\"Enter\");\nrequest.setSecondLine(\"Board\");\nrequest.setMinimumLength(0);\nrequest.setMaximumLength(2);\nrequest.setTimeOut(60);\n\nGetNumericInputResponse response = service.getNumericInput(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getInput());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Operação responsável por recuperar input númerico do pinpad.+ [block:callout] { "type": "info", "body": "Operação unicamente suportado nos pinpads do modelo Gertec Mobi Pin 10." } [/block] [block:api-header] { "type": "basic", "title": "GetNumericInputRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "FirstLine", "4-0": "SecondLine", "5-0": "MinimumLength", "6-0": "MaximumLength", "7-0": "TimeOut", "7-1": "int", "6-1": "int", "5-1": "int", "4-1": "string", "3-1": "string", "0-1": "string", "1-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "4-2": "Sim", "5-2": "Sim", "6-2": "Sim", "7-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad ao qual será lido o input.", "3-3": "Código do texto a ser exibido na primeira linha da tela do pinpad.", "4-3": "Código do texto a ser exibido na segunda linha da tela do pinpad.", "5-3": "Tamanho mínimo do input. De 0 a 99.", "6-3": "Tamanho máximo do input. De 0 a 99.", "7-3": "Tempo para time out, definido em segundos. De 0 a 999." }, "cols": 4, "rows": 8 } [/block] **Códigos do texto a ser exibido na primeira linha:** [block:parameters] { "data": { "h-0": "Código", "h-1": "Mensagem a ser exibida na primeira linha" }, "cols": 2, "rows": 1 } [/block] **Códigos do texto a ser exibido na segunda linha:** [block:parameters] { "data": { "h-0": "Código", "h-1": "Mensagem a ser exibida na segunda linha" }, "cols": 2, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"ConnectionName\": \"COM3\",\n \"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n\t\"PinpadMessages\": {\n\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t},\n \"SaleAffiliationKey\": \"DE756D68F20B425*CDF*C8F94B5ABCB448\"\n\t},\n\t\"FirstLine\":\"1\",\n\t\"MaximumLength\":80,\n\t\"MinimumLength\":80,\n\t\"SecondLine\":\"2\",\n\t\"TimeOut\":100\n}", "language": "json" }, { "code": "<GetNumericInputRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>String content</Language>\n <RequestKey>String content</RequestKey>\n\t<CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <FirstLine>1</FirstLine>\n <MaximumLength>80</MaximumLength>\n <MinimumLength>80</MinimumLength>\n <SecondLine>2</SecondLine>\n <TimeOut>100</TimeOut>\n</GetNumericInputRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetNumericInputResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "", "language": "json" }, { "code": "", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta ler um input numérico com as seguintes configuranções: * Na primeira linha, será exibido: "Entre" * Na segunda linha, será exibido: "Mesa" * O operador do pinpad poderá digitar entre 0 e 2 números * O timeout da operação é 1 minuto (60 segundos) Se houver algum input, o código abaixo deverá exibir o input lido. Se não houver, mostrará os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetNumericInputRequest request = new GetNumericInputRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\n\nrequest.FirstLine = \"Enter\";\nrequest.SecondLine = \"Board\";\nrequest.MinimumLength = 0;\nrequest.MaximumLength = 2;\nrequest.TimeOut = 60;\n\nGetNumericInputResponse response = service.GetNumericInput(request);\n\nif (response.Failure == false)\n{\n Console.WriteLine(response.Input);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}\n", "language": "csharp" }, { "code": "GetNumericInputRequest request = new GetNumericInputRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\n\nrequest.setFirstLine(\"Enter\");\nrequest.setSecondLine(\"Board\");\nrequest.setMinimumLength(0);\nrequest.setMaximumLength(2);\nrequest.setTimeOut(60);\n\nGetNumericInputResponse response = service.getNumericInput(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getInput());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"58595cd88f0b4a2f006978b6","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por recuperar valor monetário informado no pinpad.\n\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"operação unicamente suportada nos pinpads do modelo Gertec Mobi Pin 10.\",\n  \"title\": \"Aviso\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetAmountRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"3-0\": \"Currency\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"3-1\": \"string\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"3-2\": \"Sim\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador ligado ao pinpad ao qual será lido o valor monetário.\",\n    \"3-3\": \"Código do ícone da moeda.\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\t\\\"ConnectionName\\\":\\\"COM3\\\",\\n\\t\\t\\t\\\"PinpadInformation\\\": {\\n\\t       \\\"IsContactless\\\": true,\\n\\t       \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t       \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t       \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t       \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t       \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t       \\\"Specifications\\\": \\\"1.08\\\"\\n\\t     },\\n\\t\\t\\t \\\"PinpadMessages\\\": {\\n\\t \\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t \\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t \\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t \\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t \\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t \\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t \\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t \\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t \\t\\t\\t},\\n\\t\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Currency\\\":\\\"Real\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetAmountRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <Currency>Real</Currency>\\n</GetAmountRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n**Códigos das moedas disponiveis:**\n\n\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Ícone\",\n    \"0-0\": \"Real\",\n    \"1-0\": \"Dollar\",\n    \"2-0\": \"Euro\",\n    \"3-0\": \"Pound\",\n    \"4-0\": \"Yen\",\n    \"1-1\": \"$\",\n    \"0-1\": \"R$\",\n    \"2-1\": \"€\",\n    \"3-1\": \"£\",\n    \"4-1\": \"¥\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetAmountResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"Amount\",\n    \"4-1\": \"decimal?\",\n    \"4-2\": \"Valor monetário informado.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"Amount\\\":100\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetAmountResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors> </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <Amount>100</Amount>\\n</GetAmountResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\nO exemplo abaixo tenta ler o valor monetário do pinpad. Se não conseguir, mostra os erros ocorridos na operação.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\n           GetAmountRequest request = new GetAmountRequest();\\n           request.CardPaymentAuthorizer = cardPaymentAuthorizer; // Obrigatório\\n           request.Currency = \\\"Real\\\";\\n\\n           GetAmountResponse response = service.GetAmount(request);\\n\\n           if (response.Failure == false)\\n           {\\n               Console.WriteLine(response.Amount);\\n           }\\n           else\\n           {\\n               foreach (ErrorReport report in response.OperationErrors)\\n               {\\n                   Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n               }\\n           }\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetAmountRequest request = new GetAmountRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer); // Obrigatório\\n\\nrequest.setCurrency(\\\"Real\\\");\\n\\nGetAmountResponse response = service.getAmount(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getAmount());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T16:31:20.287Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":17,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"getamount-1","sync_unique":"","title":"GetAmount","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

GetAmount


Operação responsável por recuperar valor monetário informado no pinpad. [block:callout] { "type": "warning", "body": "operação unicamente suportada nos pinpads do modelo Gertec Mobi Pin 10.", "title": "Aviso" } [/block] [block:api-header] { "type": "basic", "title": "GetAmountRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "Currency", "0-1": "string", "1-1": "string", "3-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad ao qual será lido o valor monetário.", "3-3": "Código do ícone da moeda." }, "cols": 4, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\t\"ConnectionName\":\"COM3\",\n\t\t\t\"PinpadInformation\": {\n\t \"IsContactless\": true,\n\t \"ManufacturerName\": \"GERTEC \",\n\t \"ManufacturerVersion\": \"001.04 130922 \",\n\t \"Model\": \"PPC920;10MB;U \",\n\t \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t \"SerialNumber\": \"7101761507003063 \",\n\t \"Specifications\": \"1.08\"\n\t },\n\t\t\t \"PinpadMessages\": {\n\t \t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t \t\t\t\t\"CreditLabel\": \"Crédito\",\n\t \t\t\t\t\"DebitLabel\": \"Débito\",\n\t \t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t \t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t \t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t \t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t \t\t\t\t\"TransactionTypeMenuLabel\": null\n\t \t\t\t},\n\t\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t},\n\t\"Currency\":\"Real\"\n}", "language": "json" }, { "code": "<GetAmountRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>String content</Language>\n <RequestKey>String content</RequestKey>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <Currency>Real</Currency>\n</GetAmountRequest>", "language": "xml" } ] } [/block] **Códigos das moedas disponiveis:** [block:parameters] { "data": { "h-0": "Código", "h-1": "Ícone", "0-0": "Real", "1-0": "Dollar", "2-0": "Euro", "3-0": "Pound", "4-0": "Yen", "1-1": "$", "0-1": "R$", "2-1": "€", "3-1": "£", "4-1": "¥" }, "cols": 2, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "GetAmountResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "0-1": "string", "0-2": "Identificador único associado a cada request.", "1-0": "Failure", "1-1": "bool", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-0": "OperationErrors", "2-1": "List<ErrorReport>", "2-2": "Lista com os erros caso o Failure seja True.", "3-0": "StatusCode", "3-1": "int", "3-2": "Código HTTP do erro.", "4-0": "Amount", "4-1": "decimal?", "4-2": "Valor monetário informado." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"String content\",\n\t\"StatusCode\":200,\n\t\"Amount\":100\n}", "language": "json" }, { "code": "<GetAmountResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>true</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>200</StatusCode>\n <Amount>100</Amount>\n</GetAmountResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta ler o valor monetário do pinpad. Se não conseguir, mostra os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\n GetAmountRequest request = new GetAmountRequest();\n request.CardPaymentAuthorizer = cardPaymentAuthorizer; // Obrigatório\n request.Currency = \"Real\";\n\n GetAmountResponse response = service.GetAmount(request);\n\n if (response.Failure == false)\n {\n Console.WriteLine(response.Amount);\n }\n else\n {\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n }", "language": "csharp" }, { "code": "GetAmountRequest request = new GetAmountRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer); // Obrigatório\n\nrequest.setCurrency(\"Real\");\n\nGetAmountResponse response = service.getAmount(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getAmount());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Operação responsável por recuperar valor monetário informado no pinpad. [block:callout] { "type": "warning", "body": "operação unicamente suportada nos pinpads do modelo Gertec Mobi Pin 10.", "title": "Aviso" } [/block] [block:api-header] { "type": "basic", "title": "GetAmountRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "Currency", "0-1": "string", "1-1": "string", "3-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador ligado ao pinpad ao qual será lido o valor monetário.", "3-3": "Código do ícone da moeda." }, "cols": 4, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\t\"ConnectionName\":\"COM3\",\n\t\t\t\"PinpadInformation\": {\n\t \"IsContactless\": true,\n\t \"ManufacturerName\": \"GERTEC \",\n\t \"ManufacturerVersion\": \"001.04 130922 \",\n\t \"Model\": \"PPC920;10MB;U \",\n\t \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t \"SerialNumber\": \"7101761507003063 \",\n\t \"Specifications\": \"1.08\"\n\t },\n\t\t\t \"PinpadMessages\": {\n\t \t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t \t\t\t\t\"CreditLabel\": \"Crédito\",\n\t \t\t\t\t\"DebitLabel\": \"Débito\",\n\t \t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t \t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t \t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t \t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t \t\t\t\t\"TransactionTypeMenuLabel\": null\n\t \t\t\t},\n\t\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t},\n\t\"Currency\":\"Real\"\n}", "language": "json" }, { "code": "<GetAmountRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>String content</Language>\n <RequestKey>String content</RequestKey>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <Currency>Real</Currency>\n</GetAmountRequest>", "language": "xml" } ] } [/block] **Códigos das moedas disponiveis:** [block:parameters] { "data": { "h-0": "Código", "h-1": "Ícone", "0-0": "Real", "1-0": "Dollar", "2-0": "Euro", "3-0": "Pound", "4-0": "Yen", "1-1": "$", "0-1": "R$", "2-1": "€", "3-1": "£", "4-1": "¥" }, "cols": 2, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "GetAmountResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "0-1": "string", "0-2": "Identificador único associado a cada request.", "1-0": "Failure", "1-1": "bool", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-0": "OperationErrors", "2-1": "List<ErrorReport>", "2-2": "Lista com os erros caso o Failure seja True.", "3-0": "StatusCode", "3-1": "int", "3-2": "Código HTTP do erro.", "4-0": "Amount", "4-1": "decimal?", "4-2": "Valor monetário informado." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"String content\",\n\t\"StatusCode\":200,\n\t\"Amount\":100\n}", "language": "json" }, { "code": "<GetAmountResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>true</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>200</StatusCode>\n <Amount>100</Amount>\n</GetAmountResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] O exemplo abaixo tenta ler o valor monetário do pinpad. Se não conseguir, mostra os erros ocorridos na operação. [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\n GetAmountRequest request = new GetAmountRequest();\n request.CardPaymentAuthorizer = cardPaymentAuthorizer; // Obrigatório\n request.Currency = \"Real\";\n\n GetAmountResponse response = service.GetAmount(request);\n\n if (response.Failure == false)\n {\n Console.WriteLine(response.Amount);\n }\n else\n {\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n }", "language": "csharp" }, { "code": "GetAmountRequest request = new GetAmountRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer); // Obrigatório\n\nrequest.setCurrency(\"Real\");\n\nGetAmountResponse response = service.getAmount(request);\n\nif (response.getFailure() == false) {\n System.out.println(response.getAmount());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"58595e839d82913100dde251","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"O DataPicker possibilita a interação do usuário através de um menu navegável exibido na tela do pinpad. A navegação é dada com o auxilio das teclas de setas no teclado do pinpad.+\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Modelos de pinpads com teclas mapeadas\"\n}\n[/block]\n**O valor das teclas utilizadas para navegação por cada modelo de pinpad podem mudar.** \n\nOs modelos que tiveram suas teclas mapeadas para esta funcionalidade são:+\n\n* Gertec PPC920\n\n* Ingenico iPP320\n\n* Verifone Vx820\n\nQualquer modelo não mapeado, assumirá como padrão os valores das teclas utilizadas pelo Gertec PPC920. Caso queira usar outro Pinpad, e saiba os valores das teclas de navegação desse pinpad, basta modificar o valor default delas.\n\nVocê também pode entrar em contato com a gente informando o modelo do pinpad, para que o valor dele seja acrescentado ao mapeamento dentro do serviço.\n\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Como definir valores personalizados para as teclas de navegação?\"\n}\n[/block]\nEm primeiro lugar, para descobrir o valor associado às teclas de navegação do seu pinpad você pode utilizar a operação GetKey. Após descobrir esses valores, você deve utilizar a operação ChangeDataPickerKeys para definir esses novos valores.\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Operações disponibilizadas pelo Data Picker.\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Operação\",\n    \"h-1\": \"Descrição\",\n    \"0-0\": \"GetNumericValueInRange\",\n    \"1-0\": \"GetNumericValueInOptionsRequest\",\n    \"2-0\": \"GetTextValueInOptionsRequest\",\n    \"0-1\": \"Possibilita a escolha de valor dentro de um ragne definido pelos valores de máximo e mínimo passados.\",\n    \"1-1\": \"Possibilita a escolha de um valor numérico dentro das opções passadas.\",\n    \"2-1\": \"Possibilita a escolha de um valor textual dentro das opções passadas.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T16:38:27.233Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":18,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"datapicker","sync_unique":"","title":"DataPicker","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

DataPicker


O DataPicker possibilita a interação do usuário através de um menu navegável exibido na tela do pinpad. A navegação é dada com o auxilio das teclas de setas no teclado do pinpad.+ [block:api-header] { "type": "basic", "title": "Modelos de pinpads com teclas mapeadas" } [/block] **O valor das teclas utilizadas para navegação por cada modelo de pinpad podem mudar.** Os modelos que tiveram suas teclas mapeadas para esta funcionalidade são:+ * Gertec PPC920 * Ingenico iPP320 * Verifone Vx820 Qualquer modelo não mapeado, assumirá como padrão os valores das teclas utilizadas pelo Gertec PPC920. Caso queira usar outro Pinpad, e saiba os valores das teclas de navegação desse pinpad, basta modificar o valor default delas. Você também pode entrar em contato com a gente informando o modelo do pinpad, para que o valor dele seja acrescentado ao mapeamento dentro do serviço. [block:api-header] { "type": "basic", "title": "Como definir valores personalizados para as teclas de navegação?" } [/block] Em primeiro lugar, para descobrir o valor associado às teclas de navegação do seu pinpad você pode utilizar a operação GetKey. Após descobrir esses valores, você deve utilizar a operação ChangeDataPickerKeys para definir esses novos valores. [block:api-header] { "type": "basic", "title": "Operações disponibilizadas pelo Data Picker." } [/block] [block:parameters] { "data": { "h-0": "Operação", "h-1": "Descrição", "0-0": "GetNumericValueInRange", "1-0": "GetNumericValueInOptionsRequest", "2-0": "GetTextValueInOptionsRequest", "0-1": "Possibilita a escolha de valor dentro de um ragne definido pelos valores de máximo e mínimo passados.", "1-1": "Possibilita a escolha de um valor numérico dentro das opções passadas.", "2-1": "Possibilita a escolha de um valor textual dentro das opções passadas." }, "cols": 2, "rows": 3 } [/block]
O DataPicker possibilita a interação do usuário através de um menu navegável exibido na tela do pinpad. A navegação é dada com o auxilio das teclas de setas no teclado do pinpad.+ [block:api-header] { "type": "basic", "title": "Modelos de pinpads com teclas mapeadas" } [/block] **O valor das teclas utilizadas para navegação por cada modelo de pinpad podem mudar.** Os modelos que tiveram suas teclas mapeadas para esta funcionalidade são:+ * Gertec PPC920 * Ingenico iPP320 * Verifone Vx820 Qualquer modelo não mapeado, assumirá como padrão os valores das teclas utilizadas pelo Gertec PPC920. Caso queira usar outro Pinpad, e saiba os valores das teclas de navegação desse pinpad, basta modificar o valor default delas. Você também pode entrar em contato com a gente informando o modelo do pinpad, para que o valor dele seja acrescentado ao mapeamento dentro do serviço. [block:api-header] { "type": "basic", "title": "Como definir valores personalizados para as teclas de navegação?" } [/block] Em primeiro lugar, para descobrir o valor associado às teclas de navegação do seu pinpad você pode utilizar a operação GetKey. Após descobrir esses valores, você deve utilizar a operação ChangeDataPickerKeys para definir esses novos valores. [block:api-header] { "type": "basic", "title": "Operações disponibilizadas pelo Data Picker." } [/block] [block:parameters] { "data": { "h-0": "Operação", "h-1": "Descrição", "0-0": "GetNumericValueInRange", "1-0": "GetNumericValueInOptionsRequest", "2-0": "GetTextValueInOptionsRequest", "0-1": "Possibilita a escolha de valor dentro de um ragne definido pelos valores de máximo e mínimo passados.", "1-1": "Possibilita a escolha de um valor numérico dentro das opções passadas.", "2-1": "Possibilita a escolha de um valor textual dentro das opções passadas." }, "cols": 2, "rows": 3 } [/block]
{"__v":0,"_id":"58595fa15c8f863900c09eb9","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação que permite selecionar um número através de um menu navegável no pinpad dentro de um range com os valores de máximo e mínimo passados ao serviço.+\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericValueInRangeRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"3-0\": \"Label\",\n    \"4-0\": \"MinimumLimit\",\n    \"5-0\": \"MaximumLimit\",\n    \"5-1\": \"short\",\n    \"4-1\": \"short\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"3-1\": \"string\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"3-2\": \"Sim\",\n    \"4-2\": \"Sim\",\n    \"5-2\": \"Sim\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador\",\n    \"3-3\": \"Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \\\":\\\".\",\n    \"4-3\": \"Valor mínimo no intervalo desejado.\",\n    \"5-3\": \"Valor máximo no intervalo desejado.\"\n  },\n  \"cols\": 4,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\":\\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\t \\\"IsContactless\\\": true,\\n\\t\\t\\t\\t \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\t \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\t \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\t \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\t \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\t \\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t\\t },\\n\\t\\t\\t \\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t\\t},\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Label\\\":\\\"1\\\",\\n\\t\\\"MaximumLimit\\\":80,\\n\\t\\\"MinimumLimit\\\": 80\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericValueInRangeRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage>Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <Label>1</Label>\\n  <MaximumLimit>80</MaximumLimit>\\n  <MinimumLimit>80</MinimumLimit>\\n</GetNumericValueInRangeRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericValueInRangeResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Failure\",\n    \"2-0\": \"OperationErrors\",\n    \"3-0\": \"Value\",\n    \"0-1\": \"string\",\n    \"1-1\": \"bool\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"3-1\": \"short\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-2\": \"Valor selecionado ou null em caso de time out ou operação cancelada.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"Value\\\":null\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericValueInRangeResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <Value>32767</Value>\\n</GetNumericValueInRangeResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetNumericValueInRangeRequest request = new GetNumericValueInRangeRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\nrequest.Label = \\\"Parcelas\\\";\\nrequest.MinimumLimit = ((short)1);\\nrequest.MaximumLimit = ((short)12);\\n\\nGetNumericValueInRangeResponse response = service.GetNumericValueInRange(request);\\n\\nif (response.Failure != true)\\n{\\n    Console.WriteLine(response.Value);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetNumericValueInRangeRequest request = new GetNumericValueInRangeRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\nrequest.setLabel(\\\"Parcelas\\\");\\nrequest.setMinimumLimit((short) 1);\\nrequest.setMaximumLimit((short) 12);\\n\\nGetNumericValueInRangeResponse response = service.getNumericValueInRange(request);\\n\\nif (response.getFailure() != true) {\\n    System.out.println(response.getValue());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T16:43:13.166Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":19,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"getnumericvalueinrange-1","sync_unique":"","title":"GetNumericValueInRange","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

GetNumericValueInRange


Operação que permite selecionar um número através de um menu navegável no pinpad dentro de um range com os valores de máximo e mínimo passados ao serviço.+ [block:api-header] { "type": "basic", "title": "GetNumericValueInRangeRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "Label", "4-0": "MinimumLimit", "5-0": "MaximumLimit", "5-1": "short", "4-1": "short", "0-1": "string", "1-1": "string", "3-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "4-2": "Sim", "5-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador", "3-3": "Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \":\".", "4-3": "Valor mínimo no intervalo desejado.", "5-3": "Valor máximo no intervalo desejado." }, "cols": 4, "rows": 6 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\":\"COM3\",\n\t\t\"PinpadInformation\": {\n\t\t\t\t \"IsContactless\": true,\n\t\t\t\t \"ManufacturerName\": \"GERTEC \",\n\t\t\t\t \"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\t \"Model\": \"PPC920;10MB;U \",\n\t\t\t\t \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\t \"SerialNumber\": \"7101761507003063 \",\n\t\t\t\t \"Specifications\": \"1.08\"\n\t\t\t },\n\t\t\t \"PinpadMessages\": {\n\t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t\t\t},\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t},\n\t\"Label\":\"1\",\n\t\"MaximumLimit\":80,\n\t\"MinimumLimit\": 80\n}", "language": "json" }, { "code": "<GetNumericValueInRangeRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage>Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <Label>1</Label>\n <MaximumLimit>80</MaximumLimit>\n <MinimumLimit>80</MinimumLimit>\n</GetNumericValueInRangeRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetNumericValueInRangeResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "Value", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "short", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Valor selecionado ou null em caso de time out ou operação cancelada." }, "cols": 3, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200,\n\t\"Value\":null\n}", "language": "json" }, { "code": "<GetNumericValueInRangeResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>true</Failure>\n <OperationErrors>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code>String content</Code>\n <Field>String content</Field>\n <Message>String content</Message>\n </ErrorReport>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code>String content</Code>\n <Field>String content</Field>\n <Message>String content</Message>\n </ErrorReport>\n </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>2147483647</StatusCode>\n <Value>32767</Value>\n</GetNumericValueInRangeResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": " MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetNumericValueInRangeRequest request = new GetNumericValueInRangeRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\nrequest.Label = \"Parcelas\";\nrequest.MinimumLimit = ((short)1);\nrequest.MaximumLimit = ((short)12);\n\nGetNumericValueInRangeResponse response = service.GetNumericValueInRange(request);\n\nif (response.Failure != true)\n{\n Console.WriteLine(response.Value);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "GetNumericValueInRangeRequest request = new GetNumericValueInRangeRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\nrequest.setLabel(\"Parcelas\");\nrequest.setMinimumLimit((short) 1);\nrequest.setMaximumLimit((short) 12);\n\nGetNumericValueInRangeResponse response = service.getNumericValueInRange(request);\n\nif (response.getFailure() != true) {\n System.out.println(response.getValue());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Operação que permite selecionar um número através de um menu navegável no pinpad dentro de um range com os valores de máximo e mínimo passados ao serviço.+ [block:api-header] { "type": "basic", "title": "GetNumericValueInRangeRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "Label", "4-0": "MinimumLimit", "5-0": "MaximumLimit", "5-1": "short", "4-1": "short", "0-1": "string", "1-1": "string", "3-1": "string", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "4-2": "Sim", "5-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador", "3-3": "Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \":\".", "4-3": "Valor mínimo no intervalo desejado.", "5-3": "Valor máximo no intervalo desejado." }, "cols": 4, "rows": 6 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\":\"COM3\",\n\t\t\"PinpadInformation\": {\n\t\t\t\t \"IsContactless\": true,\n\t\t\t\t \"ManufacturerName\": \"GERTEC \",\n\t\t\t\t \"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\t \"Model\": \"PPC920;10MB;U \",\n\t\t\t\t \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\t \"SerialNumber\": \"7101761507003063 \",\n\t\t\t\t \"Specifications\": \"1.08\"\n\t\t\t },\n\t\t\t \"PinpadMessages\": {\n\t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t\t\t},\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t},\n\t\"Label\":\"1\",\n\t\"MaximumLimit\":80,\n\t\"MinimumLimit\": 80\n}", "language": "json" }, { "code": "<GetNumericValueInRangeRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage>Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <Label>1</Label>\n <MaximumLimit>80</MaximumLimit>\n <MinimumLimit>80</MinimumLimit>\n</GetNumericValueInRangeRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetNumericValueInRangeResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "Value", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "short", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Valor selecionado ou null em caso de time out ou operação cancelada." }, "cols": 3, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200,\n\t\"Value\":null\n}", "language": "json" }, { "code": "<GetNumericValueInRangeResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>true</Failure>\n <OperationErrors>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code>String content</Code>\n <Field>String content</Field>\n <Message>String content</Message>\n </ErrorReport>\n <ErrorReport xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">\n <Code>String content</Code>\n <Field>String content</Field>\n <Message>String content</Message>\n </ErrorReport>\n </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>2147483647</StatusCode>\n <Value>32767</Value>\n</GetNumericValueInRangeResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": " MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetNumericValueInRangeRequest request = new GetNumericValueInRangeRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\nrequest.Label = \"Parcelas\";\nrequest.MinimumLimit = ((short)1);\nrequest.MaximumLimit = ((short)12);\n\nGetNumericValueInRangeResponse response = service.GetNumericValueInRange(request);\n\nif (response.Failure != true)\n{\n Console.WriteLine(response.Value);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "GetNumericValueInRangeRequest request = new GetNumericValueInRangeRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\nrequest.setLabel(\"Parcelas\");\nrequest.setMinimumLimit((short) 1);\nrequest.setMaximumLimit((short) 12);\n\nGetNumericValueInRangeResponse response = service.getNumericValueInRange(request);\n\nif (response.getFailure() != true) {\n System.out.println(response.getValue());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"585960c7e940043b007c2c37","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação que permite selecionar um valor numérico através de um menu navegável no pinpad dentro de opções passados ao serviço.\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericValueInOptionsRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"3-0\": \"Label\",\n    \"4-0\": \"Options\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"3-1\": \"string\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"4-1\": \"short []\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"3-2\": \"Sim\",\n    \"4-2\": \"Sim\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador.\",\n    \"3-3\": \"Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \\\":\\\".\",\n    \"4-3\": \"Lista de opções.\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\":\\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n         \\\"IsContactless\\\": true,\\n         \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n         \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n         \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n         \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n         \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n         \\\"Specifications\\\": \\\"1.08\\\"\\n       },\\n\\t\\t  \\\"PinpadMessages\\\": {\\n \\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n \\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n \\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n \\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n \\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n \\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n \\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n \\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n \\t\\t\\t\\t},\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Label\\\":\\\"String content\\\",\\n\\t\\\"Options\\\":[32767]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericValueInOptionsRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <Label>String content</Label>\\n  <Options>\\n    <short xmlns=\\\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\\\">32767</short>\\n    <short xmlns=\\\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\\\">32767</short>\\n  </Options>\\n</GetNumericValueInOptionsRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetNumericValueInOptionsResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Failure\",\n    \"2-0\": \"OperationErrors\",\n    \"3-0\": \"Value\",\n    \"0-1\": \"string\",\n    \"1-1\": \"bool\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"3-1\": \"short\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-2\": \"Valor selecionado ou null em caso de time out ou operação cancelada.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"Value\\\":\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetNumericValueInOptionsResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors>\\n  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>16528409</StatusCode>\\n  <Value>32767</Value>\\n</GetNumericValueInOptionsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\n            GetNumericValueInOptionsRequest request = new GetNumericValueInOptionsRequest();\\n            request.CardPaymentAuthorizer = cardPaymentAuthorizer;\\n            request.Label = \\\"Assinatura\\\";\\n            request.Options = new short[] { 3, 6, 12 };\\n\\n            GetNumericValueInOptionsResponse response = service.GetNumericValueInOptions(request);\\n\\n            if (response.Failure != true)\\n            {\\n                Console.WriteLine(response.Value);\\n            }\\n            else\\n            {\\n                foreach (ErrorReport report in response.OperationErrors)\\n                {\\n                    Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n                }\\n            }\\n\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetNumericValueInOptionsRequest request = new GetNumericValueInOptionsRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\nrequest.setLabel(\\\"Assinatura\\\");\\nrequest.setOptions(new short[] {3, 6, 12});\\n\\nGetNumericValueInOptionsResponse response = service.getNumericValueInOptions(request);\\n\\nif (response.getFailure() != true) {\\n    System.out.println(response.getValue());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ... \",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T16:48:07.250Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":20,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"getnumericvalueinoptions-1","sync_unique":"","title":"GetNumericValueInOptions","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

GetNumericValueInOptions


Operação que permite selecionar um valor numérico através de um menu navegável no pinpad dentro de opções passados ao serviço. [block:api-header] { "type": "basic", "title": "GetNumericValueInOptionsRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "Label", "4-0": "Options", "0-1": "string", "1-1": "string", "3-1": "string", "2-1": "CardPaymentAuthorizerContract", "4-1": "short []", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "4-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador.", "3-3": "Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \":\".", "4-3": "Lista de opções." }, "cols": 4, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\":\"COM3\",\n\t\t\"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n\t\t \"PinpadMessages\": {\n \t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n \t\t\t\t\t\"CreditLabel\": \"Crédito\",\n \t\t\t\t\t\"DebitLabel\": \"Débito\",\n \t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n \t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n \t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n \t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n \t\t\t\t\t\"TransactionTypeMenuLabel\": null\n \t\t\t\t},\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t},\n\t\"Label\":\"String content\",\n\t\"Options\":[32767]\n}", "language": "json" }, { "code": "<GetNumericValueInOptionsRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <Label>String content</Label>\n <Options>\n <short xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">32767</short>\n <short xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">32767</short>\n </Options>\n</GetNumericValueInOptionsRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetNumericValueInOptionsResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "Value", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "short", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Valor selecionado ou null em caso de time out ou operação cancelada." }, "cols": 3, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200,\n\t\"Value\":\n}", "language": "json" }, { "code": "<GetNumericValueInOptionsResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors>\n </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>16528409</StatusCode>\n <Value>32767</Value>\n</GetNumericValueInOptionsResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\n GetNumericValueInOptionsRequest request = new GetNumericValueInOptionsRequest();\n request.CardPaymentAuthorizer = cardPaymentAuthorizer;\n request.Label = \"Assinatura\";\n request.Options = new short[] { 3, 6, 12 };\n\n GetNumericValueInOptionsResponse response = service.GetNumericValueInOptions(request);\n\n if (response.Failure != true)\n {\n Console.WriteLine(response.Value);\n }\n else\n {\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n }\n", "language": "csharp" }, { "code": "GetNumericValueInOptionsRequest request = new GetNumericValueInOptionsRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\nrequest.setLabel(\"Assinatura\");\nrequest.setOptions(new short[] {3, 6, 12});\n\nGetNumericValueInOptionsResponse response = service.getNumericValueInOptions(request);\n\nif (response.getFailure() != true) {\n System.out.println(response.getValue());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ... ", "language": "csharp", "name": "Delphi" } ] } [/block]
Operação que permite selecionar um valor numérico através de um menu navegável no pinpad dentro de opções passados ao serviço. [block:api-header] { "type": "basic", "title": "GetNumericValueInOptionsRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "Label", "4-0": "Options", "0-1": "string", "1-1": "string", "3-1": "string", "2-1": "CardPaymentAuthorizerContract", "4-1": "short []", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "4-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador.", "3-3": "Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \":\".", "4-3": "Lista de opções." }, "cols": 4, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\":\"COM3\",\n\t\t\"PinpadInformation\": {\n \"IsContactless\": true,\n \"ManufacturerName\": \"GERTEC \",\n \"ManufacturerVersion\": \"001.04 130922 \",\n \"Model\": \"PPC920;10MB;U \",\n \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n \"SerialNumber\": \"7101761507003063 \",\n \"Specifications\": \"1.08\"\n },\n\t\t \"PinpadMessages\": {\n \t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n \t\t\t\t\t\"CreditLabel\": \"Crédito\",\n \t\t\t\t\t\"DebitLabel\": \"Débito\",\n \t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n \t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n \t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n \t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n \t\t\t\t\t\"TransactionTypeMenuLabel\": null\n \t\t\t\t},\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t},\n\t\"Label\":\"String content\",\n\t\"Options\":[32767]\n}", "language": "json" }, { "code": "<GetNumericValueInOptionsRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n <CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <Label>String content</Label>\n <Options>\n <short xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">32767</short>\n <short xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">32767</short>\n </Options>\n</GetNumericValueInOptionsRequest>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetNumericValueInOptionsResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "3-0": "Value", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "3-1": "short", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True.", "3-2": "Valor selecionado ou null em caso de time out ou operação cancelada." }, "cols": 3, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200,\n\t\"Value\":\n}", "language": "json" }, { "code": "<GetNumericValueInOptionsResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors>\n </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>16528409</StatusCode>\n <Value>32767</Value>\n</GetNumericValueInOptionsResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\n GetNumericValueInOptionsRequest request = new GetNumericValueInOptionsRequest();\n request.CardPaymentAuthorizer = cardPaymentAuthorizer;\n request.Label = \"Assinatura\";\n request.Options = new short[] { 3, 6, 12 };\n\n GetNumericValueInOptionsResponse response = service.GetNumericValueInOptions(request);\n\n if (response.Failure != true)\n {\n Console.WriteLine(response.Value);\n }\n else\n {\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n }\n", "language": "csharp" }, { "code": "GetNumericValueInOptionsRequest request = new GetNumericValueInOptionsRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\nrequest.setLabel(\"Assinatura\");\nrequest.setOptions(new short[] {3, 6, 12});\n\nGetNumericValueInOptionsResponse response = service.getNumericValueInOptions(request);\n\nif (response.getFailure() != true) {\n System.out.println(response.getValue());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ... ", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"585961cfb2ee0f25004db272","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação que permite selecionar um valor textual através de um menu navegável no pinpad dentro de opções passados ao serviço.\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetTextValueInOptionsRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"3-0\": \"Label\",\n    \"4-0\": \"Options\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"3-1\": \"string\",\n    \"4-1\": \"string []\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"3-2\": \"Sim\",\n    \"4-2\": \"Sim\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador.\",\n    \"3-3\": \"Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \\\":\\\".\",\n    \"4-3\": \"Lista de opções.\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\":\\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\t \\\"IsContactless\\\": true,\\n\\t\\t\\t\\t \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\t \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\t \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\t \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\t \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\t \\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t\\t },\\n\\t\\t \\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t\\t},\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Label\\\":\\\"1\\\",\\n\\t\\\"Options\\\":[1,2]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetTextValueInOptionsRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n\\t<CardPaymentAuthorizer>\\n\\t\\t<ConnectionName>COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n\\t\\t\\t<SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n\\t</CardPaymentAuthorizer>\\n  <Label>String content</Label>\\n  <Options>\\n    <string xmlns=\\\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\\\">1</string>\\n    <string xmlns=\\\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\\\">2</string>\\n  </Options>\\n</GetTextValueInOptionsRequest>\\n\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetTextValueInOptionsResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Valor selecionado ou null em caso de time out ou operação cancelada.\",\n    \"3-0\": \"Value\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":200,\\n\\t\\\"Value\\\":\\\"String content\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<GetTextValueInOptionsResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors>  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>200</StatusCode>\\n  <Value></Value>\\n</GetTextValueInOptionsResponse>\\n\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nGetTextValueInOptionsRequest request = new GetTextValueInOptionsRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\nrequest.Label = \\\"Tipo\\\";\\nrequest.Options = new String[] { \\\"Debito\\\", \\\"Credito\\\" };\\n\\nGetTextValueInOptionsResponse response = service.GetTextValueInOptions(request);\\n\\nif (response.Failure != true)\\n{\\n    Console.WriteLine(response.Value);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"GetTextValueInOptionsRequest request = new GetTextValueInOptionsRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\nrequest.setLabel(\\\"Tipo\\\");\\nrequest.setOptions(new String[] {\\\"Debito\\\", \\\"Credito\\\"});\\n\\nGetTextValueInOptionsResponse response = service.getTextValueInOptions(request);\\n\\nif (response.getFailure() != true) {\\n    System.out.println(response.getValue());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T16:52:31.953Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":21,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"gettextvalueinoptions-1","sync_unique":"","title":"GetTextValueInOptions","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

GetTextValueInOptions


Operação que permite selecionar um valor textual através de um menu navegável no pinpad dentro de opções passados ao serviço. [block:api-header] { "type": "basic", "title": "GetTextValueInOptionsRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "Label", "4-0": "Options", "0-1": "string", "1-1": "string", "3-1": "string", "4-1": "string []", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "4-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador.", "3-3": "Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \":\".", "4-3": "Lista de opções." }, "cols": 4, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\":\"COM3\",\n\t\t\"PinpadInformation\": {\n\t\t\t\t \"IsContactless\": true,\n\t\t\t\t \"ManufacturerName\": \"GERTEC \",\n\t\t\t\t \"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\t \"Model\": \"PPC920;10MB;U \",\n\t\t\t\t \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\t \"SerialNumber\": \"7101761507003063 \",\n\t\t\t\t \"Specifications\": \"1.08\"\n\t\t\t },\n\t\t \"PinpadMessages\": {\n\t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t\t\t},\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t},\n\t\"Label\":\"1\",\n\t\"Options\":[1,2]\n}", "language": "json" }, { "code": "<GetTextValueInOptionsRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n\t<CardPaymentAuthorizer>\n\t\t<ConnectionName>COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n\t\t\t<SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n\t</CardPaymentAuthorizer>\n <Label>String content</Label>\n <Options>\n <string xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">1</string>\n <string xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">2</string>\n </Options>\n</GetTextValueInOptionsRequest>\n", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetTextValueInOptionsResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "0-1": "string", "0-2": "Identificador único associado a cada request.", "1-0": "Failure", "1-1": "bool", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "3-1": "string", "3-2": "Valor selecionado ou null em caso de time out ou operação cancelada.", "3-0": "Value", "2-0": "OperationErrors", "2-1": "List<ErrorReport>", "2-2": "Lista com os erros caso o Failure seja True." }, "cols": 3, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"String content\",\n\t\"StatusCode\":200,\n\t\"Value\":\"String content\"\n}", "language": "json" }, { "code": "<GetTextValueInOptionsResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>200</StatusCode>\n <Value></Value>\n</GetTextValueInOptionsResponse>\n", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetTextValueInOptionsRequest request = new GetTextValueInOptionsRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\nrequest.Label = \"Tipo\";\nrequest.Options = new String[] { \"Debito\", \"Credito\" };\n\nGetTextValueInOptionsResponse response = service.GetTextValueInOptions(request);\n\nif (response.Failure != true)\n{\n Console.WriteLine(response.Value);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "GetTextValueInOptionsRequest request = new GetTextValueInOptionsRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\nrequest.setLabel(\"Tipo\");\nrequest.setOptions(new String[] {\"Debito\", \"Credito\"});\n\nGetTextValueInOptionsResponse response = service.getTextValueInOptions(request);\n\nif (response.getFailure() != true) {\n System.out.println(response.getValue());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Operação que permite selecionar um valor textual através de um menu navegável no pinpad dentro de opções passados ao serviço. [block:api-header] { "type": "basic", "title": "GetTextValueInOptionsRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "Label", "4-0": "Options", "0-1": "string", "1-1": "string", "3-1": "string", "4-1": "string []", "2-1": "CardPaymentAuthorizerContract", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "4-2": "Sim", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador.", "3-3": "Label com 15 caracteres que será apresentadada no display do pinpad. O caractere da posição 16 é ocupado por um \":\".", "4-3": "Lista de opções." }, "cols": 4, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizer\":{\n\t\t\"ConnectionName\":\"COM3\",\n\t\t\"PinpadInformation\": {\n\t\t\t\t \"IsContactless\": true,\n\t\t\t\t \"ManufacturerName\": \"GERTEC \",\n\t\t\t\t \"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\t \"Model\": \"PPC920;10MB;U \",\n\t\t\t\t \"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\t \"SerialNumber\": \"7101761507003063 \",\n\t\t\t\t \"Specifications\": \"1.08\"\n\t\t\t },\n\t\t \"PinpadMessages\": {\n\t\t\t\t\t\"ApprovedMessage\": \"Aprovado\",\n\t\t\t\t\t\"CreditLabel\": \"Crédito\",\n\t\t\t\t\t\"DebitLabel\": \"Débito\",\n\t\t\t\t\t\"DeclinedMessage\": \"Negado\",\n\t\t\t\t\t\"InitializationMessage\": \"Iniciando\",\n\t\t\t\t\t\"MainLabel\": \"Stone Pagamentos\",\n\t\t\t\t\t\"ProcessingMessage\": \"Processando...\",\n\t\t\t\t\t\"TransactionTypeMenuLabel\": null\n\t\t\t\t},\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t},\n\t\"Label\":\"1\",\n\t\"Options\":[1,2]\n}", "language": "json" }, { "code": "<GetTextValueInOptionsRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n\t<CardPaymentAuthorizer>\n\t\t<ConnectionName>COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n\t\t\t<SaleAffiliationKey >DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n\t</CardPaymentAuthorizer>\n <Label>String content</Label>\n <Options>\n <string xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">1</string>\n <string xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">2</string>\n </Options>\n</GetTextValueInOptionsRequest>\n", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "GetTextValueInOptionsResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "0-1": "string", "0-2": "Identificador único associado a cada request.", "1-0": "Failure", "1-1": "bool", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "3-1": "string", "3-2": "Valor selecionado ou null em caso de time out ou operação cancelada.", "3-0": "Value", "2-0": "OperationErrors", "2-1": "List<ErrorReport>", "2-2": "Lista com os erros caso o Failure seja True." }, "cols": 3, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"String content\",\n\t\"StatusCode\":200,\n\t\"Value\":\"String content\"\n}", "language": "json" }, { "code": "<GetTextValueInOptionsResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey>String content</RequestKey>\n <StatusCode>200</StatusCode>\n <Value></Value>\n</GetTextValueInOptionsResponse>\n", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nGetTextValueInOptionsRequest request = new GetTextValueInOptionsRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\nrequest.Label = \"Tipo\";\nrequest.Options = new String[] { \"Debito\", \"Credito\" };\n\nGetTextValueInOptionsResponse response = service.GetTextValueInOptions(request);\n\nif (response.Failure != true)\n{\n Console.WriteLine(response.Value);\n}\nelse\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "GetTextValueInOptionsRequest request = new GetTextValueInOptionsRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\nrequest.setLabel(\"Tipo\");\nrequest.setOptions(new String[] {\"Debito\", \"Credito\"});\n\nGetTextValueInOptionsResponse response = service.getTextValueInOptions(request);\n\nif (response.getFailure() != true) {\n System.out.println(response.getValue());\n} else {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"5859638eb2ee0f25004db274","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Operação responsável por definir novas teclas de para cima e para baixo para utilizar nas operações de DataPicker.\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ChangeDataPickerKeyRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"3-1\": \"string\",\n    \"4-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"3-2\": \"Sim\",\n    \"4-2\": \"Sim\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"3-0\": \"UpKey\",\n    \"4-0\": \"DownKey\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Autorizador\",\n    \"3-3\": \"Valor da tecla de para cima. Apenas teclas de função 1, 2, 3 e 4 são permitidas.\",\n    \"4-3\": \"Valor da tecla de para baixo. Apenas teclas de função 1, 2, 3 e 4 são permitidas.\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Request\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizerCollection\\\":\\n\\t{\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t\\t\\\"PinpadInformation\\\": {\\n\\t\\t\\t\\\"IsContactless\\\": true,\\n\\t\\t\\t\\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t\\t\\t\\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t\\t\\t\\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t\\t\\t\\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t\\t\\t\\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t\\t\\t\\\"Specifications\\\": \\\"1.08\\\"\\n\\t\\t},\\n\\t\\t\\\"PinpadMessages\\\": {\\n        \\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n        \\\"CreditLabel\\\": \\\"Crédito\\\",\\n        \\\"DebitLabel\\\": \\\"Débito\\\",\\n        \\\"DeclinedMessage\\\": \\\"Negado\\\",\\n        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n        \\\"TransactionTypeMenuLabel\\\": null\\n      },\\n\\t\\t\\\"SaleAffiliationKey\\\":\\\"DE756D68F20BAWEAC8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"DownKey\\\":\\\"1\\\",\\n\\t\\\"UpKey\\\":\\\"2\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ChangeDataPickerKeysRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n\\t<CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">COM3</ConnectionName>\\n\\t\\t<PinpadInformation>\\n\\t\\t\\t<IsContactless>true</IsContactless>\\n\\t\\t\\t<ManufacturerName>GERTEC</ManufacturerName>\\n\\t\\t\\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n\\t\\t\\t<Model>PPC920;10MB;U</Model>\\n\\t\\t\\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n\\t\\t\\t<SerialNumber>7101761507003063 </SerialNumber>\\n\\t\\t\\t<Specifications>1.08</Specifications>\\n\\t\\t</PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <DownKey>1</DownKey>\\n  <UpKey>2</UpKey>\\n</ChangeDataPickerKeysRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n**Tabela de Códigos de Teclas**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Código\",\n    \"h-1\": \"Tecla\",\n    \"0-0\": \"Backspace\",\n    \"1-0\": \"Cancel\",\n    \"2-0\": \"Decimal0\",\n    \"3-0\": \"Decimal1\",\n    \"4-0\": \"Decimal2\",\n    \"5-0\": \"Decimal3\",\n    \"6-0\": \"Decimal4\",\n    \"7-0\": \"Decimal5\",\n    \"8-0\": \"Decimal6\",\n    \"9-0\": \"Decimal7\",\n    \"10-0\": \"Decimal8\",\n    \"11-0\": \"Decimal9\",\n    \"12-0\": \"Function1\",\n    \"13-0\": \"Function2\",\n    \"14-0\": \"Function3\",\n    \"15-0\": \"Function4\",\n    \"16-0\": \"Return\",\n    \"0-1\": \"Tecla de backspace .\",\n    \"1-1\": \"Tecla de cancel.\",\n    \"2-1\": \"Tecla númerica 0.\",\n    \"3-1\": \"Tecla númerica 1.\",\n    \"4-1\": \"Tecla númerica 2.\",\n    \"5-1\": \"Tecla númerica 3.\",\n    \"6-1\": \"Tecla númerica 4.\",\n    \"7-1\": \"Tecla númerica 5.\",\n    \"8-1\": \"Tecla númerica 6.\",\n    \"9-1\": \"Tecla númerica 7.\",\n    \"10-1\": \"Tecla númerica 8.\",\n    \"11-1\": \"Tecla númerica 9.\",\n    \"12-1\": \"Tecla de função 1.\",\n    \"13-1\": \"Tecla de função 2.\",\n    \"14-1\": \"Tecla de função 3.\",\n    \"15-1\": \"Tecla de função 4.\",\n    \"16-1\": \"Tecla de enter.\"\n  },\n  \"cols\": 2,\n  \"rows\": 17\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ChangeDataPickerKeyResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"1-0\": \"Failure\",\n    \"2-0\": \"OperationErrors\",\n    \"0-1\": \"string\",\n    \"1-1\": \"bool\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato Response\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[],\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StatusCode\\\":200\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ChangeDataPickerKeysResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>false</Failure>\\n  <OperationErrors> </OperationErrors>\\n  <RequestKey></RequestKey>\\n  <StatusCode>200</StatusCode>\\n</ChangeDataPickerKeysResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"MicrotefServiceClient service = new MicrotefServiceClient();\\n\\nChangeDataPickerKeysRequest request = new ChangeDataPickerKeysRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\nrequest.UpKey = \\\"Function1\\\";\\nrequest.DownKey = \\\"Function2\\\";\\n\\nChangeDataPickerKeysResponse response = service.ChangeDataPickerKeys(request);\\n\\nif (response.Failure == true)\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"ChangeDataPickerKeyRequest request = new ChangeDataPickerKeyRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\nrequest.setUpKey(\\\"Function1\\\");\\nrequest.setDownKey(\\\"Function2\\\");\\n\\nChangeDataPickerKeyResponse response = service.changeDataPickerKey(request);\\n\\nif (response.getFailure() == true) {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-20T16:59:58.440Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":22,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"changedatapickerkey-1","sync_unique":"","title":"ChangeDataPickerKey","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[]}

ChangeDataPickerKey


Operação responsável por definir novas teclas de para cima e para baixo para utilizar nas operações de DataPicker. [block:api-header] { "type": "basic", "title": "ChangeDataPickerKeyRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "0-1": "string", "1-1": "string", "3-1": "string", "4-1": "string", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "4-2": "Sim", "2-1": "CardPaymentAuthorizerContract", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "UpKey", "4-0": "DownKey", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador", "3-3": "Valor da tecla de para cima. Apenas teclas de função 1, 2, 3 e 4 são permitidas.", "4-3": "Valor da tecla de para baixo. Apenas teclas de função 1, 2, 3 e 4 são permitidas." }, "cols": 4, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizerCollection\":\n\t{\n\t\t\"ConnectionName\": \"COM3\",\n\t\t\"PinpadInformation\": {\n\t\t\t\"IsContactless\": true,\n\t\t\t\"ManufacturerName\": \"GERTEC \",\n\t\t\t\"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\"Model\": \"PPC920;10MB;U \",\n\t\t\t\"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\"SerialNumber\": \"7101761507003063 \",\n\t\t\t\"Specifications\": \"1.08\"\n\t\t},\n\t\t\"PinpadMessages\": {\n \"ApprovedMessage\": \"Aprovado\",\n \"CreditLabel\": \"Crédito\",\n \"DebitLabel\": \"Débito\",\n \"DeclinedMessage\": \"Negado\",\n \"InitializationMessage\": \"Iniciando\",\n \"MainLabel\": \"Stone Pagamentos\",\n \"ProcessingMessage\": \"Processando...\",\n \"TransactionTypeMenuLabel\": null\n },\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t},\n\t\"DownKey\":\"1\",\n\t\"UpKey\":\"2\"\n}", "language": "json" }, { "code": "<ChangeDataPickerKeysRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n\t<CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <DownKey>1</DownKey>\n <UpKey>2</UpKey>\n</ChangeDataPickerKeysRequest>", "language": "xml" } ] } [/block] **Tabela de Códigos de Teclas** [block:parameters] { "data": { "h-0": "Código", "h-1": "Tecla", "0-0": "Backspace", "1-0": "Cancel", "2-0": "Decimal0", "3-0": "Decimal1", "4-0": "Decimal2", "5-0": "Decimal3", "6-0": "Decimal4", "7-0": "Decimal5", "8-0": "Decimal6", "9-0": "Decimal7", "10-0": "Decimal8", "11-0": "Decimal9", "12-0": "Function1", "13-0": "Function2", "14-0": "Function3", "15-0": "Function4", "16-0": "Return", "0-1": "Tecla de backspace .", "1-1": "Tecla de cancel.", "2-1": "Tecla númerica 0.", "3-1": "Tecla númerica 1.", "4-1": "Tecla númerica 2.", "5-1": "Tecla númerica 3.", "6-1": "Tecla númerica 4.", "7-1": "Tecla númerica 5.", "8-1": "Tecla númerica 6.", "9-1": "Tecla númerica 7.", "10-1": "Tecla númerica 8.", "11-1": "Tecla númerica 9.", "12-1": "Tecla de função 1.", "13-1": "Tecla de função 2.", "14-1": "Tecla de função 3.", "15-1": "Tecla de função 4.", "16-1": "Tecla de enter." }, "cols": 2, "rows": 17 } [/block] [block:api-header] { "type": "basic", "title": "ChangeDataPickerKeyResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True." }, "cols": 3, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200\n}", "language": "json" }, { "code": "<ChangeDataPickerKeysResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey></RequestKey>\n <StatusCode>200</StatusCode>\n</ChangeDataPickerKeysResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nChangeDataPickerKeysRequest request = new ChangeDataPickerKeysRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\nrequest.UpKey = \"Function1\";\nrequest.DownKey = \"Function2\";\n\nChangeDataPickerKeysResponse response = service.ChangeDataPickerKeys(request);\n\nif (response.Failure == true)\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "ChangeDataPickerKeyRequest request = new ChangeDataPickerKeyRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\nrequest.setUpKey(\"Function1\");\nrequest.setDownKey(\"Function2\");\n\nChangeDataPickerKeyResponse response = service.changeDataPickerKey(request);\n\nif (response.getFailure() == true) {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
Operação responsável por definir novas teclas de para cima e para baixo para utilizar nas operações de DataPicker. [block:api-header] { "type": "basic", "title": "ChangeDataPickerKeyRequest" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Obrigatório?", "h-3": "Descrição", "0-0": "RequestKey", "0-1": "string", "1-1": "string", "3-1": "string", "4-1": "string", "0-2": "Não", "1-2": "Não", "2-2": "Sim", "3-2": "Sim", "4-2": "Sim", "2-1": "CardPaymentAuthorizerContract", "1-0": "Language", "2-0": "CardPaymentAuthorizer", "3-0": "UpKey", "4-0": "DownKey", "0-3": "Identificador único da requisição. Se não informado o serviço gerará um Guid.", "1-3": "Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.", "2-3": "Autorizador", "3-3": "Valor da tecla de para cima. Apenas teclas de função 1, 2, 3 e 4 são permitidas.", "4-3": "Valor da tecla de para baixo. Apenas teclas de função 1, 2, 3 e 4 são permitidas." }, "cols": 4, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Request" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Language\":\"pt-BR\",\n\t\"RequestKey\":\"\",\n\t\"CardPaymentAuthorizerCollection\":\n\t{\n\t\t\"ConnectionName\": \"COM3\",\n\t\t\"PinpadInformation\": {\n\t\t\t\"IsContactless\": true,\n\t\t\t\"ManufacturerName\": \"GERTEC \",\n\t\t\t\"ManufacturerVersion\": \"001.04 130922 \",\n\t\t\t\"Model\": \"PPC920;10MB;U \",\n\t\t\t\"OperatingSystemVersion\": \"0066.0077.0060.0109@\",\n\t\t\t\"SerialNumber\": \"7101761507003063 \",\n\t\t\t\"Specifications\": \"1.08\"\n\t\t},\n\t\t\"PinpadMessages\": {\n \"ApprovedMessage\": \"Aprovado\",\n \"CreditLabel\": \"Crédito\",\n \"DebitLabel\": \"Débito\",\n \"DeclinedMessage\": \"Negado\",\n \"InitializationMessage\": \"Iniciando\",\n \"MainLabel\": \"Stone Pagamentos\",\n \"ProcessingMessage\": \"Processando...\",\n \"TransactionTypeMenuLabel\": null\n },\n\t\t\"SaleAffiliationKey\":\"DE756D68F20BAWEAC8F94B5ABCB448\"\n\t},\n\t\"DownKey\":\"1\",\n\t\"UpKey\":\"2\"\n}", "language": "json" }, { "code": "<ChangeDataPickerKeysRequest xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\">\n <Language>pt-BR</Language>\n <RequestKey></RequestKey>\n\t<CardPaymentAuthorizer>\n <ConnectionName xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\">COM3</ConnectionName>\n\t\t<PinpadInformation>\n\t\t\t<IsContactless>true</IsContactless>\n\t\t\t<ManufacturerName>GERTEC</ManufacturerName>\n\t\t\t<ManufacturerVersion>001.04 130922</ManufacturerVersion>\n\t\t\t<Model>PPC920;10MB;U</Model>\n\t\t\t<OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\n\t\t\t<SerialNumber>7101761507003063 </SerialNumber>\n\t\t\t<Specifications>1.08</Specifications>\n\t\t</PinpadInformation>\n\t\t<PinpadMessages>\n\t\t\t<ApprovedMessage >Aprovado</ApprovedMessage>\n\t\t\t<CreditLabel>Crédito</CreditLabel>\n\t\t\t<DebitLabel >Débito</DebitLabel>\n\t\t\t<DeclinedMessage >Negado</DeclinedMessage>\n\t\t\t<InitializationMessage>Iniciando</InitializationMessage>\n\t\t\t<MainLabel>Stone Pagamentos</MainLabel>\n\t\t\t<ProcessingMessage>Processando...</ProcessingMessage>\n\t\t\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\n\t\t</PinpadMessages>\n <SaleAffiliationKey>DE756D68F20BAWEAC8F94B5ABCB448</SaleAffiliationKey>\n </CardPaymentAuthorizer>\n <DownKey>1</DownKey>\n <UpKey>2</UpKey>\n</ChangeDataPickerKeysRequest>", "language": "xml" } ] } [/block] **Tabela de Códigos de Teclas** [block:parameters] { "data": { "h-0": "Código", "h-1": "Tecla", "0-0": "Backspace", "1-0": "Cancel", "2-0": "Decimal0", "3-0": "Decimal1", "4-0": "Decimal2", "5-0": "Decimal3", "6-0": "Decimal4", "7-0": "Decimal5", "8-0": "Decimal6", "9-0": "Decimal7", "10-0": "Decimal8", "11-0": "Decimal9", "12-0": "Function1", "13-0": "Function2", "14-0": "Function3", "15-0": "Function4", "16-0": "Return", "0-1": "Tecla de backspace .", "1-1": "Tecla de cancel.", "2-1": "Tecla númerica 0.", "3-1": "Tecla númerica 1.", "4-1": "Tecla númerica 2.", "5-1": "Tecla númerica 3.", "6-1": "Tecla númerica 4.", "7-1": "Tecla númerica 5.", "8-1": "Tecla númerica 6.", "9-1": "Tecla númerica 7.", "10-1": "Tecla númerica 8.", "11-1": "Tecla númerica 9.", "12-1": "Tecla de função 1.", "13-1": "Tecla de função 2.", "14-1": "Tecla de função 3.", "15-1": "Tecla de função 4.", "16-1": "Tecla de enter." }, "cols": 2, "rows": 17 } [/block] [block:api-header] { "type": "basic", "title": "ChangeDataPickerKeyResponse" } [/block] [block:parameters] { "data": { "h-0": "Nome", "h-1": "Tipo", "h-2": "Descrição", "0-0": "RequestKey", "1-0": "Failure", "2-0": "OperationErrors", "0-1": "string", "1-1": "bool", "2-1": "List<ErrorReport>", "0-2": "Identificador único associado a cada request.", "1-2": "Flag alertando se houve ou não alguma falha no processo.", "2-2": "Lista com os erros caso o Failure seja True." }, "cols": 3, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Contrato Response" } [/block] [block:code] { "codes": [ { "code": "{\n\t\"Failure\":true,\n\t\"OperationErrors\":[],\n\t\"RequestKey\":\"\",\n\t\"StatusCode\":200\n}", "language": "json" }, { "code": "<ChangeDataPickerKeysResponse xmlns=\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\">\n <Failure>false</Failure>\n <OperationErrors> </OperationErrors>\n <RequestKey></RequestKey>\n <StatusCode>200</StatusCode>\n</ChangeDataPickerKeysResponse>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Exemplo" } [/block] [block:code] { "codes": [ { "code": "MicrotefServiceClient service = new MicrotefServiceClient();\n\nChangeDataPickerKeysRequest request = new ChangeDataPickerKeysRequest();\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\nrequest.UpKey = \"Function1\";\nrequest.DownKey = \"Function2\";\n\nChangeDataPickerKeysResponse response = service.ChangeDataPickerKeys(request);\n\nif (response.Failure == true)\n{\n foreach (ErrorReport report in response.OperationErrors)\n {\n Console.WriteLine(report.Code + \"\\t\" + report.Field + \"\\t\" + report.Message);\n }\n}", "language": "csharp" }, { "code": "ChangeDataPickerKeyRequest request = new ChangeDataPickerKeyRequest();\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\nrequest.setUpKey(\"Function1\");\nrequest.setDownKey(\"Function2\");\n\nChangeDataPickerKeyResponse response = service.changeDataPickerKey(request);\n\nif (response.getFailure() == true) {\n for (ErrorReport report : response.getOperationErrors()) {\n System.out.println(report.getCode() + \"\\t\" + report.getField() + \"\\t\" + report.getMessage());\n }\n}", "language": "java" }, { "code": "// Em breve ...", "language": "csharp", "name": "Delphi" } ] } [/block]
{"__v":0,"_id":"58405e5c63e13523002d01b8","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:31:08.049Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":23,"parentDoc":null,"project":"584054a2e3e04b230055c6b0","slug":"processamento-de-transações","sync_unique":"","title":"Processamento de transações","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3","childrenPages":[{"__v":0,"_id":"5840602463e13523002d01be","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Através desta operação é possivel obter os dados do cliente vinculado ao StoneCode fornecido.\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ActivationRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"2-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"2-2\": \"Sim\",\n    \"2-0\": \"StoneCode\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-3\": \"Stone Code do cliente. Sequencia de nove digitos numéricos.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"StoneCode\\\":\\\"160588962\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ActivationRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>en-US</Language>\\n  <RequestKey></RequestKey>\\n  <StoneCode>160588962</StoneCode>\\n</ActivationRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ActivationResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"ActivationReport\",\n    \"4-1\": \"ActivationReportContract\",\n    \"4-2\": \"Contém os detalhes da ativação e informações sobre o estabelecimento comercial.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"Failure\\\": false,\\n  \\\"OperationErrors\\\": [],\\n  \\\"RequestKey\\\": \\\"32df6de5-7ca9-48bb-b8c4-033d00da140e\\\",\\n  \\\"StatusCode\\\": 200,\\n  \\\"ActivationReport\\\": {\\n    \\\"Address\\\": {\\n      \\\"City\\\": \\\"Rio de Janeiro\\\",\\n      \\\"Complement\\\": null,\\n      \\\"District\\\": \\\"RJ\\\",\\n      \\\"DoorNumber\\\": \\\"123\\\",\\n      \\\"Neighborhood\\\": \\\"Engenho do Rei\\\",\\n      \\\"Street\\\": \\\"Rua Dos Apartamentos Voadores\\\",\\n      \\\"ZipCode\\\": \\\"20761-340\\\"\\n    },\\n    \\\"CompanyName\\\": \\\"TESTE STONINHO\\\",\\n    \\\"IdentityCode\\\": \\\"145.015.427-13\\\",\\n    \\\"ResponseCode\\\": null,\\n    \\\"ResponseReason\\\": null,\\n    \\\"SaleAffiliationKey\\\": \\\"\\\",\\n    \\\"WasSuccessful\\\": true,\\n    \\\"XmlRequest\\\": \\\"<?xml version=\\\\\\\"1.0\\\\\\\"?>\\\\r\\\\n<Document xmlns:xsi=\\\\\\\"http://www.w3.org/2001/XMLSchema-instance\\\\\\\" xmlns:xsd=\\\\\\\"http://www.w3.org/2001/XMLSchema\\\\\\\" xmlns=\\\\\\\"urn:StatusReportV02.1\\\\\\\">\\\\r\\\\n  <StsRpt>\\\\r\\\\n    <Hdr>\\\\r\\\\n      <DwnldTrf>true</DwnldTrf>\\\\r\\\\n      <FrmtVrsn>2.0</FrmtVrsn>\\\\r\\\\n      <CreDtTm>2016-11-01T17:04:54</CreDtTm>\\\\r\\\\n    </Hdr>\\\\r\\\\n    <StsRpt>\\\\r\\\\n      <POIId>\\\\r\\\\n        <Id />\\\\r\\\\n        <Tp>OPOI</Tp>\\\\r\\\\n        <Issr>TMGT</Issr>\\\\r\\\\n      </POIId>\\\\r\\\\n      <DataSet>\\\\r\\\\n        <Id>\\\\r\\\\n          <Tp>STRP</Tp>\\\\r\\\\n          <CreDtTm>2016-11-01T17:04:54</CreDtTm>\\\\r\\\\n        </Id>\\\\r\\\\n        <Cntt>\\\\r\\\\n          <POICmpnt>\\\\r\\\\n            <Tp>TERM</Tp>\\\\r\\\\n            <Id>\\\\r\\\\n              <ItmNb>1</ItmNb>\\\\r\\\\n              <PrvdrId>Micro Pos</PrvdrId>\\\\r\\\\n              <Id>Micro Pos</Id>\\\\r\\\\n              <SrlNb>Micro Pos</SrlNb>\\\\r\\\\n            </Id>\\\\r\\\\n          </POICmpnt>\\\\r\\\\n          <POICmpnt>\\\\r\\\\n            <Tp>MRPR</Tp>\\\\r\\\\n            <Id>\\\\r\\\\n              <ItmNb>2</ItmNb>\\\\r\\\\n              <PrvdrId>STONECODE</PrvdrId>\\\\r\\\\n              <Id>167988962</Id>\\\\r\\\\n            </Id>\\\\r\\\\n          </POICmpnt>\\\\r\\\\n          <DataSetReqrd>\\\\r\\\\n            <Id>\\\\r\\\\n              <Tp>MRPR</Tp>\\\\r\\\\n            </Id>\\\\r\\\\n          </DataSetReqrd>\\\\r\\\\n        </Cntt>\\\\r\\\\n      </DataSet>\\\\r\\\\n    </StsRpt>\\\\r\\\\n    <SctyTrlr>\\\\r\\\\n      <CnttTp>DATA</CnttTp>\\\\r\\\\n    </SctyTrlr>\\\\r\\\\n  </StsRpt>\\\\r\\\\n</Document>\\\",\\n    \\\"XmlResponse\\\": \\\"<?xml version=\\\\\\\"1.0\\\\\\\"?>\\\\r\\\\n<Document xmlns:xsi=\\\\\\\"http://www.w3.org/2001/XMLSchema-instance\\\\\\\" xmlns:xsd=\\\\\\\"http://www.w3.org/2001/XMLSchema\\\\\\\" xmlns=\\\\\\\"urn:AcceptorConfigurationUpdateV02.1\\\\\\\">\\\\r\\\\n  <AccptrCfgtnUpd>\\\\r\\\\n    <Hdr>\\\\r\\\\n      <DwnldTrf>true</DwnldTrf>\\\\r\\\\n      <FrmtVrsn>2.0</FrmtVrsn>\\\\r\\\\n      <CreDtTm>2016-11-01T19:05:57</CreDtTm>\\\\r\\\\n    </Hdr>\\\\r\\\\n    <AccptrCfgtn>\\\\r\\\\n      <POIId>\\\\r\\\\n        <Id />\\\\r\\\\n        <Tp>OPOI</Tp>\\\\r\\\\n        <Issr>OPOI</Issr>\\\\r\\\\n      </POIId>\\\\r\\\\n      <DataSet>\\\\r\\\\n        <Id>\\\\r\\\\n          <Tp>MRPR</Tp>\\\\r\\\\n          <Vrsn>1.1</Vrsn>\\\\r\\\\n          <Nm>ACTIVATION</Nm>\\\\r\\\\n        </Id>\\\\r\\\\n        <Cntt>\\\\r\\\\n          <MrchntParams>\\\\r\\\\n            <Sak>DE756D68F20B4242BEC8F94B5ABCB448</Sak>\\\\r\\\\n            <Adr>\\\\r\\\\n              <City>Rio de Janeiro</City>\\\\r\\\\n              <Dstrct>RJ</Dstrct>\\\\r\\\\n              <Strt>Rua Dos Apartamentos Voadores</Strt>\\\\r\\\\n              <DrNb>123</DrNb>\\\\r\\\\n              <Cmplmt>321</Cmplmt>\\\\r\\\\n              <Nghbhd>Engenho do Rei</Nghbhd>\\\\r\\\\n              <ZipCd>20761-340</ZipCd>\\\\r\\\\n            </Adr>\\\\r\\\\n            <CpnyNm>TESTE STONINHO</CpnyNm>\\\\r\\\\n            <IdCd>145.015.427-13</IdCd>\\\\r\\\\n          </MrchntParams>\\\\r\\\\n        </Cntt>\\\\r\\\\n      </DataSet>\\\\r\\\\n    </AccptrCfgtn>\\\\r\\\\n    <SctyTrlr>\\\\r\\\\n      <CnttTp>DATA</CnttTp>\\\\r\\\\n    </SctyTrlr>\\\\r\\\\n  </AccptrCfgtnUpd>\\\\r\\\\n</Document>\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<s:Envelope xmlns:s=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">\\n   <s:Header>\\n      <ActivityId CorrelationId=\\\"383ca2d2-c247-4216-9acf-38adcc72c9a3\\\" xmlns=\\\"http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics\\\">edda5226-794d-4b31-a5d8-062aa110f6ae</ActivityId>\\n   </s:Header>\\n   <s:Body>\\n      <ActivationResponse xmlns=\\\"http://tempuri.org/\\\">\\n         <ActivationResult xmlns:a=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\" xmlns:i=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\\n            <a:Failure>false</a:Failure>\\n            <a:OperationErrors xmlns:b=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\"/>\\n            <a:RequestKey>?</a:RequestKey>\\n            <a:StatusCode>200</a:StatusCode>\\n            <a:ActivationReport xmlns:b=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n               <b:Address>\\n                  <b:City>Rio de Janeiro</b:City>\\n                  <b:Complement i:nil=\\\"true\\\"/>\\n                  <b:District>RJ</b:District>\\n                  <b:DoorNumber>123</b:DoorNumber>\\n                  <b:Neighborhood>Engenho do Rei</b:Neighborhood>\\n                  <b:Street>Rua Dos Apartamentos Voadores</b:Street>\\n                  <b:ZipCode>20761-340</b:ZipCode>\\n               </b:Address>\\n               <b:CompanyName>TESTE STONINHO</b:CompanyName>\\n               <b:IdentityCode>145.015.427-13</b:IdentityCode>\\n               <b:ResponseCode i:nil=\\\"true\\\"/>\\n               <b:ResponseReason i:nil=\\\"true\\\"/>\\n               <b:SaleAffiliationKey>DE756D68F20B4242BEC8F94B5ABCB448</b:SaleAffiliationKey>\\n               <b:WasSuccessful>true</b:WasSuccessful>\\n               <b:XmlRequest><![CDATA[<?xml version=\\\"1.0\\\"?>\\n<Document xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns=\\\"urn:StatusReportV02.1\\\">\\n  <StsRpt>\\n    <Hdr>\\n      <DwnldTrf>true</DwnldTrf>\\n      <FrmtVrsn>2.0</FrmtVrsn>\\n      <CreDtTm>2016-11-01T17:29:14</CreDtTm>\\n    </Hdr>\\n    <StsRpt>\\n      <POIId>\\n        <Id />\\n        <Tp>OPOI</Tp>\\n        <Issr>TMGT</Issr>\\n      </POIId>\\n      <DataSet>\\n        <Id>\\n          <Tp>STRP</Tp>\\n          <CreDtTm>2016-11-01T17:29:14</CreDtTm>\\n        </Id>\\n        <Cntt>\\n          <POICmpnt>\\n            <Tp>TERM</Tp>\\n            <Id>\\n              <ItmNb>1</ItmNb>\\n              <PrvdrId>Micro Pos</PrvdrId>\\n              <Id>Micro Pos</Id>\\n              <SrlNb>Micro Pos</SrlNb>\\n            </Id>\\n          </POICmpnt>\\n          <POICmpnt>\\n            <Tp>MRPR</Tp>\\n            <Id>\\n              <ItmNb>2</ItmNb>\\n              <PrvdrId>STONECODE</PrvdrId>\\n              <Id>167988962</Id>\\n            </Id>\\n          </POICmpnt>\\n          <DataSetReqrd>\\n            <Id>\\n              <Tp>MRPR</Tp>\\n            </Id>\\n          </DataSetReqrd>\\n        </Cntt>\\n      </DataSet>\\n    </StsRpt>\\n    <SctyTrlr>\\n      <CnttTp>DATA</CnttTp>\\n    </SctyTrlr>\\n  </StsRpt>\\n</Document>]]></b:XmlRequest>\\n               <b:XmlResponse><![CDATA[<?xml version=\\\"1.0\\\"?>\\n<Document xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns=\\\"urn:AcceptorConfigurationUpdateV02.1\\\">\\n  <AccptrCfgtnUpd>\\n    <Hdr>\\n      <DwnldTrf>true</DwnldTrf>\\n      <FrmtVrsn>2.0</FrmtVrsn>\\n      <CreDtTm>2016-11-01T19:30:16</CreDtTm>\\n    </Hdr>\\n    <AccptrCfgtn>\\n      <POIId>\\n        <Id />\\n        <Tp>OPOI</Tp>\\n        <Issr>OPOI</Issr>\\n      </POIId>\\n      <DataSet>\\n        <Id>\\n          <Tp>MRPR</Tp>\\n          <Vrsn>1.1</Vrsn>\\n          <Nm>ACTIVATION</Nm>\\n        </Id>\\n        <Cntt>\\n          <MrchntParams>\\n            <Sak>DE756D68F20B4242BEC8F94B5ABCB448</Sak>\\n            <Adr>\\n              <City>Rio de Janeiro</City>\\n              <Dstrct>RJ</Dstrct>\\n              <Strt>Rua Dos Apartamentos Voadores</Strt>\\n              <DrNb>123</DrNb>\\n              <Cmplmt>321</Cmplmt>\\n              <Nghbhd>Engenho do Rei</Nghbhd>\\n              <ZipCd>20761-340</ZipCd>\\n            </Adr>\\n            <CpnyNm>TESTE STONINHO</CpnyNm>\\n            <IdCd>145.015.427-13</IdCd>\\n          </MrchntParams>\\n        </Cntt>\\n      </DataSet>\\n    </AccptrCfgtn>\\n    <SctyTrlr>\\n      <CnttTp>DATA</CnttTp>\\n    </SctyTrlr>\\n  </AccptrCfgtnUpd>\\n</Document>]]></b:XmlResponse>\\n            </a:ActivationReport>\\n         </ActivationResult>\\n      </ActivationResponse>\\n   </s:Body>\\n</s:Envelope>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:38:44.025Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":0,"parentDoc":"58405e5c63e13523002d01b8","project":"584054a2e3e04b230055c6b0","slug":"activation","sync_unique":"","title":"Activation","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"5840602ee3e04b230055c6d2","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Através desta operação é possivel transacionar operações de crédito ou débito pelo fluxo simples. Ou seja, neste mesmo método todas os passos serão executados: pedir cartão, pedir senha, processar a transação e remover o cartão.\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"AuthorizationRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"1-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"1-0\": \"Language\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"3-2\": \"Sim\",\n    \"2-3\": \"Autorizador com pinpad responsavel por performar esta operação\",\n    \"3-3\": \"Objeto contendo as informações sobre a transação\",\n    \"3-0\": \"Transaction\",\n    \"3-1\": \"TransactionContract\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"pt-BR\\\",\\n\\t\\\"RequestKey\\\":\\\"\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t  \\\"PinpadInformation\\\": {\\n\\t    \\\"IsContactless\\\": true,\\n\\t    \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t    \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t    \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t    \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t    \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t    \\\"Specifications\\\": \\\"1.08\\\"\\n\\t  },\\n\\t\\t\\\"PinpadMessages\\\":{\\n\\t    \\\"ApprovedMessage\\\":\\\"Aprovado\\\",\\n\\t    \\\"CreditLabel\\\":\\\"Crédito\\\",\\n\\t    \\\"DebitLabel\\\":\\\"Débito\\\",\\n\\t    \\\"DeclinedMessage\\\":\\\"Não aprovado\\\",\\n\\t    \\\"InitializationMessage\\\":\\\"Stone Pagamentos\\\",\\n\\t    \\\"MainLabel\\\":\\\"Stone Pagamentos\\\",\\n\\t    \\\"ProcessingMessage\\\":\\\"Processando...\\\",\\n\\t    \\\"TransactionTypeMenuLabel\\\":\\\"OK\\\"\\n\\t  },\\n    \\\"SaleAffiliationKey\\\": \\\"DE756D68F20B425*CDF*C8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Transaction\\\":{\\n\\t\\t\\\"Amount\\\":12678967.543233,\\n\\t\\t\\\"CaptureTransaction\\\":true,\\n\\t\\t\\\"InitiatorTransactionKey\\\":\\\"String content\\\",\\n\\t\\t\\\"InstallmentContract\\\":{\\n\\t\\t\\t\\\"Number\\\":32767,\\n\\t\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t\\t},\\n\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<AuthorizationRequest >\\n  <Language>pt-BR</Language>\\n  <RequestKey></RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName >COM3</ConnectionName>\\n    <PinpadInformation >\\n      <IsContactless>true</IsContactless>\\n      <ManufacturerName>GERTEC</ManufacturerName>\\n      <ManufacturerVersion>001.04 130922</ManufacturerVersion>\\n      <Model>PPC920;10MB;U</Model>\\n      <OperatingSystemVersion>0066.0077.0060.0109@</OperatingSystemVersion>\\n      <SerialNumber>7101761507003063</SerialNumber>\\n      <Specifications>String content</Specifications>\\n    </PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey >String content</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <Transaction>\\n    <Amount >12678967.543233</Amount>\\n    <CaptureTransaction >true</CaptureTransaction>\\n    <InitiatorTransactionKey >String content</InitiatorTransactionKey>\\n    <InstallmentContract >\\n      <Number>32767</Number>\\n      <Type>String content</Type>\\n    </InstallmentContract>\\n    <Type >String content</Type>\\n  </Transaction>\\n</AuthorizationRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"AuthorizationResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"AuthorizationReport\",\n    \"4-1\": \"AuthorizationReportContract\",\n    \"4-2\": \"Relatório contendo as informações sobre a autorização.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[{\\n\\t\\t\\\"Code\\\":\\\"String content\\\",\\n\\t\\t\\\"Field\\\":\\\"String content\\\",\\n\\t\\t\\\"Message\\\":\\\"String content\\\"\\n\\t}],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":2147483647,\\n\\t\\\"AuthorizationReport\\\":{\\n\\t\\t\\\"AcquirerTransactionKey\\\":\\\"String content\\\",\\n\\t\\t\\\"Amount\\\":12678967.543233,\\n\\t\\t\\\"Card\\\":{\\n\\t\\t\\t\\\"ApplicationCryptogram\\\":\\\"String content\\\",\\n\\t\\t\\t\\\"ApplicationId\\\":\\\"String content\\\",\\n\\t\\t\\t\\\"BrandId\\\":2147483647,\\n\\t\\t\\t\\\"BrandName\\\":\\\"String content\\\",\\n\\t\\t\\t\\\"CardType\\\":\\\"String content\\\",\\n\\t\\t\\t\\\"CardholderName\\\":\\\"String content\\\",\\n\\t\\t\\t\\\"ExpirationDate\\\":\\\"\\\\/Date(928160400000-0300)\\\\/\\\",\\n\\t\\t\\t\\\"MaskedPrimaryAccountNumber\\\":\\\"String content\\\",\\n\\t\\t\\t\\\"NeedsPassword\\\":true\\n\\t\\t},\\n\\t\\t\\\"DateTime\\\":\\\"\\\\/Date(928160400000-0300)\\\\/\\\",\\n\\t\\t\\\"InitiatorTransactionKey\\\":\\\"String content\\\",\\n\\t\\t\\\"Installment\\\":{\\n\\t\\t\\t\\\"Number\\\":32767,\\n\\t\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t\\t},\\n\\t\\t\\\"ResponseCode\\\":\\\"String content\\\",\\n\\t\\t\\\"ResponseReason\\\":\\\"String content\\\",\\n\\t\\t\\\"TransactionType\\\":\\\"String content\\\",\\n\\t\\t\\\"WasApproved\\\":true,\\n\\t\\t\\\"XmlRequest\\\":\\\"String content\\\",\\n\\t\\t\\\"XmlResponse\\\":\\\"String content\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<AuthorizationResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors>\\n    <ErrorReport >\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n    <ErrorReport >\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <AuthorizationReport>\\n    <AcquirerTransactionKey >String content</AcquirerTransactionKey>\\n    <Amount >12678967.543233</Amount>\\n    <Card >\\n      <ApplicationCryptogram>String content</ApplicationCryptogram>\\n      <ApplicationId>String content</ApplicationId>\\n      <BrandId>2147483647</BrandId>\\n      <BrandName>String content</BrandName>\\n      <CardType>String content</CardType>\\n      <CardholderName>String content</CardholderName>\\n      <ExpirationDate>1999-05-31T11:20:00</ExpirationDate>\\n      <MaskedPrimaryAccountNumber>String content</MaskedPrimaryAccountNumber>\\n      <NeedsPassword>true</NeedsPassword>\\n    </Card>\\n    <DateTime >1999-05-31T11:20:00</DateTime>\\n    <InitiatorTransactionKey >String content</InitiatorTransactionKey>\\n    <Installment >\\n      <Number>32767</Number>\\n      <Type>String content</Type>\\n    </Installment>\\n    <ResponseCode >String content</ResponseCode>\\n    <ResponseReason >String content</ResponseReason>\\n    <TransactionType >String content</TransactionType>\\n    <WasApproved >true</WasApproved>\\n    <XmlRequest >String content</XmlRequest>\\n    <XmlResponse >String content</XmlResponse>\\n  </AuthorizationReport>\\n</AuthorizationResponse>\\n\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Exemplo\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"InstallmentContract installment = new InstallmentContract();\\ninstallment.Number = ((short) 2);\\ninstallment.Type = \\\"Merchant\\\";\\n\\nTransactionContract transaction = new TransactionContract();\\ntransaction.Amount = new Decimal(0.1);\\ntransaction.CaptureTransaction = true;\\ntransaction.InitiatorTransactionKey = \\\"MyUniqueITK\\\";\\ntransaction.InstallmentContract = installment;\\ntransaction.Type = \\\"Credit\\\";\\n\\nAuthorizationRequest request = new AuthorizationRequest();\\nrequest.CardPaymentAuthorizer = cardPaymentAuthorizer;\\nrequest.Language = \\\"pt-BR\\\";\\nrequest.Transaction = transaction;\\n\\nMicrotefServiceClient client = new MicrotefServiceClient();\\n\\nAuthorizationResponse response = client.Authorize(request);\\n\\nif (response.Failure == false)\\n{                \\n    Console.WriteLine(response.AuthorizationReport.AcquirerTransactionKey);\\n\\n}\\nelse if (response.AuthorizationReport != null)\\n{\\n    Console.WriteLine(response.AuthorizationReport.ResponseCode + \\\"\\\\t\\\" + response.AuthorizationReport.ResponseReason);\\n}\\nelse\\n{\\n    foreach (ErrorReport report in response.OperationErrors)\\n    {\\n        Console.WriteLine(report.Code + \\\"\\\\t\\\" + report.Field + \\\"\\\\t\\\" + report.Message);\\n    }\\n}\\n\\nclient.Close();\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"InstallmentContract installment = new InstallmentContract();\\ninstallment.setNumber((short) 2);\\ninstallment.setType(\\\"Merchant\\\");\\n\\nTransactionContract transaction = new TransactionContract();\\ntransaction.setAmount(new BigDecimal(0.1));\\ntransaction.setCaptureTransaction(true);\\ntransaction.setInitiatorTransactionKey(\\\"MyUniqueITK\\\");\\ntransaction.setInstallmentContract(installment);\\ntransaction.setType(\\\"Credit\\\");\\n\\nAuthorizationRequest request = new AuthorizationRequest();\\nrequest.setCardPaymentAuthorizer(cardPaymentAuthorizer);\\nrequest.setLanguage(\\\"pt-BR\\\");\\nrequest.setTransaction(transaction);\\n\\nAuthorizationResponse response = service.authorize(request);\\n\\nif (response.getFailure() == false) {\\n    System.out.println(response.getAuthorizationReport().getAcquirerTransactionKey());\\n\\n} else if (response.getAuthorizationReport() != null) {\\n    System.out.println(response.getAuthorizationReport().getResponseCode() + \\\"\\\\t\\\" + response.getAuthorizationReport().getResponseReason());\\n} else {\\n    for (ErrorReport report : response.getOperationErrors()) {\\n        System.out.println(report.getCode() + \\\"\\\\t\\\" + report.getField() + \\\"\\\\t\\\" + report.getMessage());\\n    }\\n}\\n\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"// Em breve ...\",\n      \"language\": \"csharp\",\n      \"name\": \"Delphi\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:38:54.529Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":1,"parentDoc":"58405e5c63e13523002d01b8","project":"584054a2e3e04b230055c6b0","slug":"authorize","sync_unique":"","title":"Authorize","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58406038e3e04b230055c6d3","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Esta operação é a primeira necessária para transacionar pelo fluxo alternativo.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/085ca0a-readCard.png\",\n        \"readCard.png\",\n        622,\n        245,\n        \"#121714\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Número do Passo\",\n    \"h-1\": \"Operação\",\n    \"h-2\": \"Descrição do Passo\",\n    \"0-0\": \"1º\",\n    \"1-0\": \"2º\",\n    \"2-0\": \"3º\",\n    \"0-1\": \"ReadCard\",\n    \"1-1\": \"ReadPassword\",\n    \"2-1\": \"SendAuthorization\",\n    \"0-2\": \"Leitura de cartão.\",\n    \"1-2\": \"Leitura de senha.\",\n    \"2-2\": \"Envio de transação.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ReadCardRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador com pinpad responsavel por performar esta operação\",\n    \"3-0\": \"Transaction\",\n    \"3-1\": \"TransactionContract\",\n    \"3-2\": \"Sim\",\n    \"3-3\": \"Objeto contendo as informações sobre a transação\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"String content\\\",\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t      \\\"PinpadInformation\\\": {\\n\\t        \\\"IsContactless\\\": true,\\n\\t        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t        \\\"Specifications\\\": \\\"1.08\\\"\\n\\t      },\\n\\t\\t\\t\\t\\\"PinpadMessages\\\": {\\n\\t        \\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t        \\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t        \\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t        \\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t        \\\"TransactionTypeMenuLabel\\\": null\\n\\t      },\\n\\t      \\\"SaleAffiliationKey\\\": \\\"DE756D68F20B425*CDF*C8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Transaction\\\":{\\n\\t\\t\\\"Amount\\\":12678967.543233,\\n\\t\\t\\\"CaptureTransaction\\\":true,\\n\\t\\t\\\"InitiatorTransactionKey\\\":\\\"String content\\\",\\n\\t\\t\\\"InstallmentContract\\\":{\\n\\t\\t\\t\\\"Number\\\":32767,\\n\\t\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t\\t},\\n\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ReadCardRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName >String content</ConnectionName>\\n    <PinpadInformation >\\n      <IsContactless>true</IsContactless>\\n      <ManufacturerName>String content</ManufacturerName>\\n      <ManufacturerVersion>String content</ManufacturerVersion>\\n      <Model>String content</Model>\\n      <OperatingSystemVersion>String content</OperatingSystemVersion>\\n      <SerialNumber>String content</SerialNumber>\\n      <Specifications>String content</Specifications>\\n    </PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey >String content</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <Transaction>\\n    <Amount >12678967.543233</Amount>\\n    <CaptureTransaction >true</CaptureTransaction>\\n    <InitiatorTransactionKey >String content</InitiatorTransactionKey>\\n    <InstallmentContract >\\n      <Number>32767</Number>\\n      <Type>String content</Type>\\n    </InstallmentContract>\\n    <Type >String content</Type>\\n  </Transaction>\\n</ReadCardRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ReadCardResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"Card\",\n    \"4-1\": \"CardContract\",\n    \"4-2\": \"Dados do cartão.\",\n    \"5-0\": \"Transaction\",\n    \"5-1\": \"TransactionContract\",\n    \"5-2\": \"Objeto contendo as informações sobre a transação\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[{\\n\\t\\t\\\"Code\\\":\\\"String content\\\",\\n\\t\\t\\\"Field\\\":\\\"String content\\\",\\n\\t\\t\\\"Message\\\":\\\"String content\\\"\\n\\t}],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":2147483647,\\n\\t\\\"Card\\\":{\\n\\t\\t\\\"ApplicationCryptogram\\\":\\\"String content\\\",\\n\\t\\t\\\"ApplicationId\\\":\\\"String content\\\",\\n\\t\\t\\\"BrandId\\\":2147483647,\\n\\t\\t\\\"BrandName\\\":\\\"String content\\\",\\n\\t\\t\\\"CardType\\\":\\\"String content\\\",\\n\\t\\t\\\"CardholderName\\\":\\\"String content\\\",\\n\\t\\t\\\"ExpirationDate\\\":\\\"\\\\/Date(928160400000-0300)\\\\/\\\",\\n\\t\\t\\\"MaskedPrimaryAccountNumber\\\":\\\"String content\\\",\\n\\t\\t\\\"NeedsPassword\\\":true\\n\\t},\\n\\t\\\"Transaction\\\":{\\n\\t\\t\\\"Amount\\\":12678967.543233,\\n\\t\\t\\\"CaptureTransaction\\\":true,\\n\\t\\t\\\"InitiatorTransactionKey\\\":\\\"String content\\\",\\n\\t\\t\\\"InstallmentContract\\\":{\\n\\t\\t\\t\\\"Number\\\":32767,\\n\\t\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t\\t},\\n\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ReadCardResponse >\\n  <Failure>false</Failure>\\n  <OperationErrors>\\n    <ErrorReport >\\n      <Code></Code>\\n      <Field></Field>\\n      <Message></Message>\\n    </ErrorReport>  \\n  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <Card>\\n    <ApplicationCryptogram >String content</ApplicationCryptogram>\\n    <ApplicationId >String content</ApplicationId>\\n    <BrandId >2147483647</BrandId>\\n    <BrandName >String content</BrandName>\\n    <CardType >String content</CardType>\\n    <CardholderName >String content</CardholderName>\\n    <ExpirationDate >1999-05-31T11:20:00</ExpirationDate>\\n    <MaskedPrimaryAccountNumber >String content</MaskedPrimaryAccountNumber>\\n    <NeedsPassword >true</NeedsPassword>\\n  </Card>\\n  <Transaction>\\n    <Amount >12678967.543233</Amount>\\n    <CaptureTransaction >true</CaptureTransaction>\\n    <InitiatorTransactionKey >String content</InitiatorTransactionKey>\\n    <InstallmentContract >\\n      <Number>32767</Number>\\n      <Type>String content</Type>\\n    </InstallmentContract>\\n    <Type >String content</Type>\\n  </Transaction>\\n</ReadCardResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:39:04.879Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":2,"parentDoc":"58405e5c63e13523002d01b8","project":"584054a2e3e04b230055c6b0","slug":"readcard","sync_unique":"","title":"ReadCard","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"58406045c05073190006353b","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Esta operação é a segunda necessária para transacionar pelo fluxo alternativo.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/b4278bf-readCard.png\",\n        \"readCard.png\",\n        622,\n        245,\n        \"#121714\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Número do Passo\",\n    \"h-1\": \"Operação\",\n    \"h-2\": \"Descrição do Passo\",\n    \"0-0\": \"1º\",\n    \"0-1\": \"ReadCard\",\n    \"0-2\": \"Leitura de cartão.\",\n    \"1-0\": \"2º\",\n    \"1-1\": \"ReadPassword\",\n    \"1-2\": \"Leitura de senha.\",\n    \"2-0\": \"3º\",\n    \"2-1\": \"SendAuthorization\",\n    \"2-2\": \"Envio de transação.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ReadPasswordRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"2-3\": \"Autorizador com pinpad responsavel por performar esta operação\",\n    \"3-0\": \"Card\",\n    \"3-1\": \"CardContract\",\n    \"3-2\": \"Sim\",\n    \"3-3\": \"Dados do cartão.\",\n    \"4-0\": \"Transaction\",\n    \"4-1\": \"TransactionContract\",\n    \"4-2\": \"Sim\",\n    \"4-3\": \"Objeto contendo as informações sobre a transação.\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"String content\\\",\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"Card\\\":{\\n\\t\\t\\\"ApplicationCryptogram\\\":\\\"String content\\\",\\n\\t\\t\\\"ApplicationId\\\":\\\"String content\\\",\\n\\t\\t\\\"BrandId\\\":2147483647,\\n\\t\\t\\\"BrandName\\\":\\\"String content\\\",\\n\\t\\t\\\"CardType\\\":\\\"String content\\\",\\n\\t\\t\\\"CardholderName\\\":\\\"String content\\\",\\n\\t\\t\\\"ExpirationDate\\\":\\\"\\\\/Date(928160400000-0300)\\\\/\\\",\\n\\t\\t\\\"MaskedPrimaryAccountNumber\\\":\\\"String content\\\",\\n\\t\\t\\\"NeedsPassword\\\":true\\n\\t},\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n      \\\"PinpadInformation\\\": {\\n        \\\"IsContactless\\\": true,\\n        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n        \\\"Specifications\\\": \\\"1.08\\\"\\n      },\\n\\t\\t\\t\\\"PinpadMessages\\\": {\\n\\t\\t\\t\\t\\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t\\t\\t\\t\\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t\\t\\t\\t\\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t\\t\\t\\t\\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t\\t\\t\\t\\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t\\t\\t\\t\\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t\\t\\t\\t\\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t\\t\\t\\t\\\"TransactionTypeMenuLabel\\\": null\\n\\t\\t\\t},\\n      \\\"SaleAffiliationKey\\\": \\\"DE756D68F20B425*CDF*C8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Transaction\\\":{\\n\\t\\t\\\"Amount\\\":12678967.543233,\\n\\t\\t\\\"CaptureTransaction\\\":true,\\n\\t\\t\\\"InitiatorTransactionKey\\\":\\\"String content\\\",\\n\\t\\t\\\"InstallmentContract\\\":{\\n\\t\\t\\t\\\"Number\\\":32767,\\n\\t\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t\\t},\\n\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ReadPasswordRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n  <Card>\\n    <ApplicationCryptogram xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ApplicationCryptogram>\\n    <ApplicationId xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ApplicationId>\\n    <BrandId xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">2147483647</BrandId>\\n    <BrandName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</BrandName>\\n    <CardType xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</CardType>\\n    <CardholderName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</CardholderName>\\n    <ExpirationDate xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">1999-05-31T11:20:00</ExpirationDate>\\n    <MaskedPrimaryAccountNumber xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</MaskedPrimaryAccountNumber>\\n    <NeedsPassword xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">true</NeedsPassword>\\n  </Card>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ConnectionName>\\n    <PinpadInformation xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <IsContactless>true</IsContactless>\\n      <ManufacturerName>String content</ManufacturerName>\\n      <ManufacturerVersion>String content</ManufacturerVersion>\\n      <Model>String content</Model>\\n      <OperatingSystemVersion>String content</OperatingSystemVersion>\\n      <SerialNumber>String content</SerialNumber>\\n      <Specifications>String content</Specifications>\\n    </PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <Transaction>\\n    <Amount xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">12678967.543233</Amount>\\n    <CaptureTransaction xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">true</CaptureTransaction>\\n    <InitiatorTransactionKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</InitiatorTransactionKey>\\n    <InstallmentContract xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Number>32767</Number>\\n      <Type>String content</Type>\\n    </InstallmentContract>\\n    <Type xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</Type>\\n  </Transaction>\\n</ReadPasswordRequest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ReadPasswordResponse\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Identificador único associado a cada request.\",\n    \"1-0\": \"Failure\",\n    \"1-1\": \"bool\",\n    \"1-2\": \"Flag alertando se houve ou não alguma falha no processo.\",\n    \"2-0\": \"OperationErrors\",\n    \"2-1\": \"List<ErrorReport>\",\n    \"2-2\": \"Lista com os erros caso o Failure seja True.\",\n    \"3-0\": \"StatusCode\",\n    \"3-1\": \"int\",\n    \"3-2\": \"Código HTTP do erro.\",\n    \"4-0\": \"Card\",\n    \"4-1\": \"CardContract\",\n    \"4-2\": \"Dados do cartão.\",\n    \"5-0\": \"Transaction\",\n    \"5-1\": \"TransactionContract\",\n    \"5-2\": \"Dados da transação.\",\n    \"6-0\": \"Password\",\n    \"6-1\": \"PasswordContract\",\n    \"6-2\": \"Dados do PIN.\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Failure\\\":true,\\n\\t\\\"OperationErrors\\\":[{\\n\\t\\t\\\"Code\\\":\\\"String content\\\",\\n\\t\\t\\\"Field\\\":\\\"String content\\\",\\n\\t\\t\\\"Message\\\":\\\"String content\\\"\\n\\t}],\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"StatusCode\\\":2147483647,\\n\\t\\\"Card\\\":{\\n\\t\\t\\\"ApplicationCryptogram\\\":\\\"String content\\\",\\n\\t\\t\\\"ApplicationId\\\":\\\"String content\\\",\\n\\t\\t\\\"BrandId\\\":2147483647,\\n\\t\\t\\\"BrandName\\\":\\\"String content\\\",\\n\\t\\t\\\"CardType\\\":\\\"String content\\\",\\n\\t\\t\\\"CardholderName\\\":\\\"String content\\\",\\n\\t\\t\\\"ExpirationDate\\\":\\\"\\\\/Date(928160400000-0300)\\\\/\\\",\\n\\t\\t\\\"MaskedPrimaryAccountNumber\\\":\\\"String content\\\",\\n\\t\\t\\\"NeedsPassword\\\":true\\n\\t},\\n\\t\\\"Password\\\":{\\n\\t\\t\\\"ApplicationCryptogram\\\":\\\"String content\\\",\\n\\t\\t\\\"EmvData\\\":\\\"String content\\\",\\n\\t\\t\\\"IsOnline\\\":true,\\n\\t\\t\\\"KeySerialNumber\\\":\\\"String content\\\",\\n\\t\\t\\\"PinBlock\\\":\\\"String content\\\"\\n\\t},\\n\\t\\\"Transaction\\\":{\\n\\t\\t\\\"Amount\\\":12678967.543233,\\n\\t\\t\\\"CaptureTransaction\\\":true,\\n\\t\\t\\\"InitiatorTransactionKey\\\":\\\"String content\\\",\\n\\t\\t\\\"InstallmentContract\\\":{\\n\\t\\t\\t\\\"Number\\\":32767,\\n\\t\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t\\t},\\n\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<ReadPasswordResponse xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Response\\\">\\n  <Failure>true</Failure>\\n  <OperationErrors>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n    <ErrorReport xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Code>String content</Code>\\n      <Field>String content</Field>\\n      <Message>String content</Message>\\n    </ErrorReport>\\n  </OperationErrors>\\n  <RequestKey>String content</RequestKey>\\n  <StatusCode>2147483647</StatusCode>\\n  <Card>\\n    <ApplicationCryptogram xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ApplicationCryptogram>\\n    <ApplicationId xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ApplicationId>\\n    <BrandId xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">2147483647</BrandId>\\n    <BrandName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</BrandName>\\n    <CardType xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</CardType>\\n    <CardholderName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</CardholderName>\\n    <ExpirationDate xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">1999-05-31T11:20:00</ExpirationDate>\\n    <MaskedPrimaryAccountNumber xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</MaskedPrimaryAccountNumber>\\n    <NeedsPassword xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">true</NeedsPassword>\\n  </Card>\\n  <Password>\\n    <ApplicationCryptogram xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ApplicationCryptogram>\\n    <EmvData xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</EmvData>\\n    <IsOnline xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">true</IsOnline>\\n    <KeySerialNumber xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</KeySerialNumber>\\n    <PinBlock xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</PinBlock>\\n  </Password>\\n  <Transaction>\\n    <Amount xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">12678967.543233</Amount>\\n    <CaptureTransaction xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">true</CaptureTransaction>\\n    <InitiatorTransactionKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</InitiatorTransactionKey>\\n    <InstallmentContract xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <Number>32767</Number>\\n      <Type>String content</Type>\\n    </InstallmentContract>\\n    <Type xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</Type>\\n  </Transaction>\\n</ReadPasswordResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","category":"584054a2e3e04b230055c6b4","createdAt":"2016-12-01T17:39:17.286Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":3,"parentDoc":"58405e5c63e13523002d01b8","project":"584054a2e3e04b230055c6b0","slug":"readpassword","sync_unique":"","title":"ReadPassword","type":"basic","updates":[],"user":"57ea79f61780cd170064f273","version":"584054a2e3e04b230055c6b3"},{"__v":0,"_id":"5840605063e13523002d01c1","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Esta operação é a terceira necessária para transacionar pelo fluxo alternativo.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/e62dd05-readCard.png\",\n        \"readCard.png\",\n        622,\n        245,\n        \"#121714\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Número do Passo\",\n    \"h-1\": \"Operação\",\n    \"h-2\": \"Descrição do Passo\",\n    \"0-0\": \"1º\",\n    \"0-1\": \"ReadCard\",\n    \"0-2\": \"Leitura de cartão.\",\n    \"1-0\": \"2º\",\n    \"1-1\": \"ReadPassword\",\n    \"1-2\": \"Leitura de senha.\",\n    \"2-0\": \"3º\",\n    \"2-1\": \"SendAuthorization\",\n    \"2-2\": \"Envio de transação.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"SendAuthorizationRequest\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Nome\",\n    \"h-1\": \"Tipo\",\n    \"h-2\": \"Obrigatório?\",\n    \"h-3\": \"Descrição\",\n    \"0-0\": \"RequestKey\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Não\",\n    \"0-3\": \"Identificador único da requisição. Se não informado o serviço gerará um Guid.\",\n    \"1-0\": \"Language\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Não\",\n    \"1-3\": \"Idioma das mensagens de resposta. Se não informado o serviço utilizará inglês como padrão.\",\n    \"2-0\": \"CardPaymentAuthorizer\",\n    \"2-1\": \"CardPaymentAuthorizerContract\",\n    \"2-2\": \"Sim\",\n    \"3-2\": \"Sim\",\n    \"4-2\": \"Sim\",\n    \"5-2\": \"Sim\",\n    \"2-3\": \"Autorizador com pinpad responsavel por performar esta operação.\",\n    \"3-0\": \"Transaction\",\n    \"4-0\": \"Card\",\n    \"5-0\": \"Password\",\n    \"3-1\": \"TransactionContract\",\n    \"4-1\": \"CardContract\",\n    \"5-1\": \"PasswordContract\",\n    \"3-3\": \"Dados da transação.\",\n    \"4-3\": \"Dados do cartão.\",\n    \"5-3\": \"Dados do PIN.\"\n  },\n  \"cols\": 4,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Contrato\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"Language\\\":\\\"String content\\\",\\n\\t\\\"RequestKey\\\":\\\"String content\\\",\\n\\t\\\"Card\\\":{\\n\\t\\t\\\"ApplicationCryptogram\\\":\\\"String content\\\",\\n\\t\\t\\\"ApplicationId\\\":\\\"String content\\\",\\n\\t\\t\\\"BrandId\\\":2147483647,\\n\\t\\t\\\"BrandName\\\":\\\"String content\\\",\\n\\t\\t\\\"CardType\\\":\\\"String content\\\",\\n\\t\\t\\\"CardholderName\\\":\\\"String content\\\",\\n\\t\\t\\\"ExpirationDate\\\":\\\"\\\\/Date(928160400000-0300)\\\\/\\\",\\n\\t\\t\\\"MaskedPrimaryAccountNumber\\\":\\\"String content\\\",\\n\\t\\t\\\"NeedsPassword\\\":true\\n\\t},\\n\\t\\\"CardPaymentAuthorizer\\\":{\\n\\t\\t\\\"ConnectionName\\\": \\\"COM3\\\",\\n\\t      \\\"PinpadInformation\\\": {\\n\\t        \\\"IsContactless\\\": true,\\n\\t        \\\"ManufacturerName\\\": \\\"GERTEC              \\\",\\n\\t        \\\"ManufacturerVersion\\\": \\\"001.04 130922   \\\",\\n\\t        \\\"Model\\\": \\\"PPC920;10MB;U      \\\",\\n\\t        \\\"OperatingSystemVersion\\\": \\\"0066.0077.0060.0109@\\\",\\n\\t        \\\"SerialNumber\\\": \\\"7101761507003063    \\\",\\n\\t        \\\"Specifications\\\": \\\"1.08\\\"\\n\\t      },\\n\\t\\t\\t\\t\\\"PinpadMessages\\\": {\\n\\t        \\\"ApprovedMessage\\\": \\\"Aprovado\\\",\\n\\t        \\\"CreditLabel\\\": \\\"Crédito\\\",\\n\\t        \\\"DebitLabel\\\": \\\"Débito\\\",\\n\\t        \\\"DeclinedMessage\\\": \\\"Negado\\\",\\n\\t        \\\"InitializationMessage\\\": \\\"Iniciando\\\",\\n\\t        \\\"MainLabel\\\": \\\"Stone Pagamentos\\\",\\n\\t        \\\"ProcessingMessage\\\": \\\"Processando...\\\",\\n\\t        \\\"TransactionTypeMenuLabel\\\": null\\n\\t      },\\n\\t      \\\"SaleAffiliationKey\\\": \\\"DE756D68F20B425*CDF*C8F94B5ABCB448\\\"\\n\\t},\\n\\t\\\"Password\\\":{\\n\\t\\t\\\"ApplicationCryptogram\\\":\\\"String content\\\",\\n\\t\\t\\\"EmvData\\\":\\\"String content\\\",\\n\\t\\t\\\"IsOnline\\\":true,\\n\\t\\t\\\"KeySerialNumber\\\":\\\"String content\\\",\\n\\t\\t\\\"PinBlock\\\":\\\"String content\\\"\\n\\t},\\n\\t\\\"Transaction\\\":{\\n\\t\\t\\\"Amount\\\":12678967.543233,\\n\\t\\t\\\"CaptureTransaction\\\":true,\\n\\t\\t\\\"InitiatorTransactionKey\\\":\\\"String content\\\",\\n\\t\\t\\\"InstallmentContract\\\":{\\n\\t\\t\\t\\\"Number\\\":32767,\\n\\t\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t\\t},\\n\\t\\t\\\"Type\\\":\\\"String content\\\"\\n\\t}\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<SendAuthorizationRequest xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract.Request\\\">\\n  <Language>String content</Language>\\n  <RequestKey>String content</RequestKey>\\n  <Card>\\n    <ApplicationCryptogram xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ApplicationCryptogram>\\n    <ApplicationId xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ApplicationId>\\n    <BrandId xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">2147483647</BrandId>\\n    <BrandName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</BrandName>\\n    <CardType xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</CardType>\\n    <CardholderName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</CardholderName>\\n    <ExpirationDate xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">1999-05-31T11:20:00</ExpirationDate>\\n    <MaskedPrimaryAccountNumber xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</MaskedPrimaryAccountNumber>\\n    <NeedsPassword xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">true</NeedsPassword>\\n  </Card>\\n  <CardPaymentAuthorizer>\\n    <ConnectionName xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</ConnectionName>\\n    <PinpadInformation xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">\\n      <IsContactless>true</IsContactless>\\n      <ManufacturerName>String content</ManufacturerName>\\n      <ManufacturerVersion>String content</ManufacturerVersion>\\n      <Model>String content</Model>\\n      <OperatingSystemVersion>String content</OperatingSystemVersion>\\n      <SerialNumber>String content</SerialNumber>\\n      <Specifications>String content</Specifications>\\n    </PinpadInformation>\\n\\t\\t<PinpadMessages>\\n\\t\\t\\t<ApprovedMessage >Aprovado</ApprovedMessage>\\n\\t\\t\\t<CreditLabel>Crédito</CreditLabel>\\n\\t\\t\\t<DebitLabel >Débito</DebitLabel>\\n\\t\\t\\t<DeclinedMessage >Negado</DeclinedMessage>\\n\\t\\t\\t<InitializationMessage>Iniciando</InitializationMessage>\\n\\t\\t\\t<MainLabel>Stone Pagamentos</MainLabel>\\n\\t\\t\\t<ProcessingMessage>Processando...</ProcessingMessage>\\n\\t\\t\\t<TransactionTypeMenuLabel></TransactionTypeMenuLabel>\\n\\t\\t</PinpadMessages>\\n    <SaleAffiliationKey xmlns=\\\"http://schemas.datacontract.org/2004/07/Microtef.Wcf.DataContract\\\">String content</SaleAffiliationKey>\\n  </CardPaymentAuthorizer>\\n  <Password>\\n    <ApplicationCryptogram xmlns=\\\"http: