Procesos Diners - autentificación con challenge y timeout
Para probar este escenario, use uno de los números de tarjeta a continuación:
Tarjeta | Fecha de vencimiento. | Marca |
---|---|---|
36230000000001 | A elección | Diners |
Al momento de introducir el código de autentificación, no ingrese nada y espere 10 minutos hasta que expire la sesión de pago.
Secuencia de los intercambios
1. Llamada inicial al servicio PCI/Charge/Authenticate con una tarjeta afiliada a Procesos Diners.
{ "amount":"990", "currency":"PEN", "transactionCategory":"PAYMENT", "merchant": { "mid":"2222222" }, "paymentForm": { "expiryMonth":"09", "expiryYear":"22", "networkPreference":"DINERS", "pan":"36230000000001" }, "customer": { "reference" : "11111" }, "device": { "acceptHeader":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", "colorDepth":"24", "deviceType":"BROWSER", "ip":"69.89.31.226", "javaEnabled":false, "language":"fr-FR", "screenHeight":"1024", "screenWidth":"1280", "timeZoneOffset":"-120", "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" }, "protocolRequest": { "name":"PROCESOS_DINERS", "version":"1", "challengePreference":"NO_PREFERENCE" } }
2. Retorno con una instrucción CHALLENGE de redireccionamiento a la página de autentificación (iFrame visible).
{ "webService":"PCI/Charge/Authenticate", "version":"V4", "applicationVersion":"5.24.0", "serverDate":"2021-05-21T13:37:41+00:00", "ticket":"8c1719294e02477caa0ddd950ceca257", "applicationProvider":"", "metadata":null, "status":"SUCCESS", "mode":"TEST", "serverUrl":"https://api.micuentaweb.pe", "_type":"V4/WebService/Response", "answer":{ "id":"9e35c01a-8a4f-4c67-a5e3-10e610987933", "protocol":{ "name":"PROCESOS_DINERS", "version":"1.0", "network":"PROCESOS_DINERS", "challengePreference":"NO_CHALLENGE_REQUESTED", "simulation":true, "_type":"V4/Charge/Authenticate/Protocol" }, "value":{ "instructionType":"FORM", "name":"CHALLENGE", "timeout":120, "target":{ "element":"IFRAME", "visible":true, "width":390, "height":595, "_type":"V4/Charge/Authenticate/InstructionTarget", "showUrl":false }, "http":{ "method":"POST", "url":"https://pass.sample-acs.net/public/v1/otp/procesos_diners/1.0/9e35c01a-8a4f-4c67-a5e3-10e610987933/challenge", "body":{ "sessionData":"H4sIAAAAAAAAAD1SyZ..." }, "_type":"V4/Charge/Authenticate/HttpRequest" }, "_type":"V4/Charge/Authenticate/AuthenticationInstruction" }, "_type":"V4/AuthenticationResponseData" } }
3. Redireccionamiento al ACS en el iFrame para la autentificación del titular.
Las características del iFrame se encuentran en el objeto El formulario que se mostrará en el iFrame se describe en el objeto.
4. Retorno a través del navegador con un resultado de instrucción TIMEOUT.
{ "eventName":"LYRA_AUTH_INSTRUCTION_RESULT", "value":{ "name":"CHALLENGE", "value":"TIMEOUT", "protocol":{ "name":"PROCESOS_DINERS", "version":"1.0", "network":"PROCESOS_DINERS", "challengePreference":"NO_CHALLENGE_REQUESTED", "simulation":true } } }
5. Nueva llamada al servicio PCI/Charge/Authenticate con este resultado.
{ "amount":"990", "currency":"PEN", "transactionCategory":"PAYMENT", "merchant": { "mid":"2222222" }, "paymentForm": { "expiryMonth":"09", "expiryYear":"22", "networkPreference":"DINERS", "pan":"36230000000001" }, "customer": { "reference" : "11111" }, "device": { "acceptHeader":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", "colorDepth":"24", "deviceType":"BROWSER", "ip":"69.89.31.226", "javaEnabled":false, "language":"fr-FR", "screenHeight":"1024", "screenWidth":"1280", "timeZoneOffset":"-120", "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" }, "protocolRequest": { "name":"PROCESOS_DINERS", "version":"1", "challengePreference":"NO_CHALLENGE_REQUESTED" } , "id":"9e35c01a-8a4f-4c67-a5e3-10e610987933", "instructionResult": { "name" : "CHALLENGE", "value":"TIMEOUT", "protocol" : { "name" : "PROCESOS_DINERS", "network":"PROCESOS_DINERS", "version" : "1.0", "challengePreference":"NO_CHALLENGE_REQUESTED", "simulation": 1 } } }
6. Retorno del servidor de la plataforma de pago con el resultado final de la autentificación.
{ "webService":"PCI/Charge/Authenticate", "version":"V4", "applicationVersion":"5.24.0", "serverDate":"2021-05-21T14:31:10+00:00", "ticket":"8c1719294e02477caa0ddd950ceca257", "applicationProvider":"", "metadata":null, "status":"SUCCESS", "mode":"TEST", "serverUrl":"https://api.micuentaweb.pe", "_type":"V4/WebService/Response", "answer":{ "id":"9e35c01a-8a4f-4c67-a5e3-10e610987933", "protocol":{ "name":"PROCESOS_DINERS", "version":"1.0", "network":"PROCESOS_DINERS", "challengePreference":"NO_CHALLENGE_REQUESTED", "simulation":true, "_type":"V4/Charge/Authenticate/Protocol" }, "value":{ "authenticationType":"CHALLENGE", "status":"FAILED", "reason":{ "code":"AUTHENTICATION_ERROR", "message":"Challenge timeout", "_type":"V4/Charge/Authenticate/AuthenticationResultReason" }, "_type":"V4/Charge/Authenticate/AuthenticationResult" }, "_type":"V4/AuthenticationResponseData" } }