Procesos Diners - autentificación finalizada (SUCCESS o FAILED)
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 ingresar el código de autentificación, ingrese:
- el código esperado, para obtener una autentificación fallida,
- 3 veces un código incorrecto para obtener una autentificación fallida.
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":"85e682f0cc4f4800b34a16fe4bf33503", "applicationProvider":"", "metadata":null, "status":"SUCCESS", "mode":"TEST", "serverUrl":"https://api.micuentaweb.pe", "_type":"V4/WebService/Response", "answer":{ "id":"4b69e6ba-7edb-4871-aded-162cb5353731", "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/4b69e6ba-7edb-4871-aded-162cb5353731/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.
{ "eventName":"LYRA_AUTH_INSTRUCTION_RESULT", "value":{ "name":"CHALLENGE", "value":"eyJjZXJ0aWZpY2...", "protocol":{ "name":"PROCESOS_DINERS", "version":"1.0", "network":"PROCESOS_DINERS", "challengePreference":"NO_PREFERENCE", "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":"4b69e6ba-7edb-4871-aded-162cb5353731", "instructionResult": { "name" : "CHALLENGE", "protocol" : { "name" : "PROCESOS_DINERS", "network":"PROCESOS_DINERS", "version" : "1.0", "challengePreference":"NO_PREFERENCE", "simulation": 1 }, "value":"eyJjZXJ0aWZpY2F0ZSI6Il..." } }
6. Retorno del servidor de la plataforma de pago con el resultado final de la autentificación.
autentificación exitosa
{ "webService":"PCI/Charge/Authenticate", "version":"V4", "applicationVersion":"5.24.0", "serverDate":"2021-05-21T13:38:01+00:00", "ticket":"85e682f0cc4f4800b34a16fe4bf33503", "applicationProvider":"", "metadata":null, "status":"SUCCESS", "mode":"TEST", "serverUrl":"https://api.micuentaweb.pe", "_type":"V4/WebService/Response", "answer":{ "id":"4b69e6ba-7edb-4871-aded-162cb5353731", "protocol":{ "name":"PROCESOS_DINERS", "version":"1.0", "network":"PROCESOS_DINERS", "challengePreference":"NO_PREFERENCE", "simulation":true, "_type":"V4/Charge/Authenticate/Protocol" }, "value":{ "authenticationType":"CHALLENGE", "authenticationId":{ "authenticationIdType":"dsTransId", "value":"4b69e6ba-7edb-4871-aded-162cb5353731", "_type":"V4/Charge/Authenticate/AuthenticationId" }, "authenticationValue":{ "authenticationValueType":"CAVV", "value":"T2RpQWxwazcySlZGakx1eXlxYmE=", "_type":"V4/Charge/Authenticate/AuthenticationValue" }, "status":"SUCCESS", "_type":"V4/Charge/Authenticate/AuthenticationResult" }, "_type":"V4/AuthenticationResponseData" } }
Fallo de la autentificación
{ "webService":"PCI/Charge/Authenticate", "version":"V4", "applicationVersion":"5.24.0", "serverDate":"2021-05-21T13:49:09+00:00", "ticket":"85e682f0cc4f4800b34a16fe4bf33503", "applicationProvider":"", "metadata":null, "status":"SUCCESS", "mode":"TEST", "serverUrl":"https://api.micuentaweb.pe", "_type":"V4/WebService/Response", "answer":{ "id":"4b69e6ba-7edb-4871-aded-162cb5353731", "protocol":{ "name":"PROCESOS_DINERS", "version":"1.0", "network":"PROCESOS_DINERS", "challengePreference":"NO_PREFERENCE", "simulation":true, "_type":"V4/Charge/Authenticate/Protocol" }, "value":{ "authenticationType":"CHALLENGE", "authenticationId":{ "authenticationIdType":"dsTransId", "value":"4b69e6ba-7edb-4871-aded-162cb5353731", "_type":"V4/Charge/Authenticate/AuthenticationId" }, "status":"FAILED", "reason":{ "code":"AUTHENTICATION_ERROR", "message":"Incorrect OTP", "_type":"V4/Charge/Authenticate/AuthenticationResultReason" }, "_type":"V4/Charge/Authenticate/AuthenticationResult" }, "_type":"V4/AuthenticationResponseData" } }