3.1.1 Estatus de transacciones

Descripción de los estatus posibles del servicio Charges

❗️

ACTUALIZACION EN CHECKOUT CUSTOM

Por requerimeintos de nuestra herramienta de seguridad, se agregaron nuevos datos a la integración

  1. Nueva funcion JS deviceInformation() que devolvera nueva información del dispositivo que ejecuta la transacción
  2. Se agregan campos en el enpoint de charge v3.5 para la ejecucion correcta del 3ds v2. Estos campos se llenan con la información que devulve la función deviceInformation()

Para información mas detallada puede consultarla en esta documentación o solicitar una asesoria en la implementacion de estos nuevos datos en conjunto con el equipo de integraciones de Netay. Cita con integraciones por API.

El ejecutar el servicio Charges puede que nos responda de 3 maneras las cuales son: failed , success y review

Success

Cuando el estatus es success nos indica que la transacción se completo correctamente y el flujo termina hasta este punto.

{
    "source": "token_q8L5Bf-2XCzmybLpkOiRShJnwhYVo",
    "amount": 500.0,
    "description": "Pago de Inscripción del Jugador Jdnxn Dhsb de la categoria Hormigas",
    "status": "success",
    "transactionTokenId": "5dced89c-2b6e-4a1c-a715-c19b0a51a51e",
    "redirect3dsUri": "http://example.com/",
    "returnUrl": null,
    "paymentMethod": "card",
    "currency": "MXN",
    "createdAt": "2022-11-17T22:17:58.178+0000",
    "error": null,
    "installments": null,
    "ship": null,
    "client": null,
    "saveCard": false,
    "instegrationsdk": "Custom",
    "integrationSdkVersion": "3.5",
    "cvv": null,
    "service3DSecureResponse": null,
    "merchantRefCode": null,
    "tokenRequestDTO": null,
    "transactionType": "Auth",
    "surcharge": null,
    "tokenAmount": null,
    "expiryDate": null,
    "threeDSecureResponse": null,
    "seamless": false,
    "paymentSource": {
        "cardDefault": false,
        "card": {
            "token": "token_q8L5Bf-2XCzmybLpkOiRShJnwhYVo",
            "expYear": "25",
            "expMonth": "04",
            "lastFourDigits": "0002",
            "brand": "visa",
            "deviceFingerPrint": "1665526382330",
            "ipAddress": "201.172.172.140",
            "bank": "ABC CAPITAL",
            "type": "debit",
            "country": "MX",
            "scheme": "debit",
            "cardPrefix": "400000",
            "preAuth": false,
            "vault": true,
            "simpleUse": false
        },
        "source": "token_q8L5Bf-2XCzmybLpkOiRShJnwhYVo",
        "type": "card"
    },
    "billing": {
        "firstName": "Roberto",
        "lastName": "Frias",
        "email": "[email protected]",
        "phone": "8182107894",
        "ipAddress": "201.172.172.140",
        "merchantReferenceCode": "iiXUizeYHI",
        "address": {
            "city": "monterrey",
            "country": "MX",
            "postalCode": "56680",
            "state": "Nuevo León",
            "street1": "Jdiis",
            "street2": ""
        }
    },
    "referenceID": "1668110499354"
}

Failed

Cuando el estatus es failed nos indica que la transacción no fue posible y el flujo termina hasta este punto.

{
    "source": "token_q8L5Bf-2XCzmybLpkOiRShJnwhYVo",
    "amount": 500.0,
    "description": "Pago de Inscripción del Jugador Jdnxn Dhsb de la categoria Hormigas",
    "status": "failed",
    "transactionTokenId": "0d8abee3-df0a-4a2b-8d78-2b937bc24e1a",
    "redirect3dsUri": "http://example.com/",
    "returnUrl": null,
    "paymentMethod": "card",
    "currency": "MXN",
    "createdAt": "2022-11-17T22:30:33.377+0000",
    "error": "Rejected by Decision Manager",
    "installments": null,
    "ship": null,
    "client": null,
    "saveCard": false,
    "instegrationsdk": "Custom",
    "integrationSdkVersion": "3.5",
    "cvv": null,
    "service3DSecureResponse": null,
    "merchantRefCode": null,
    "tokenRequestDTO": null,
    "transactionType": "Auth",
    "surcharge": null,
    "tokenAmount": null,
    "expiryDate": null,
    "threeDSecureResponse": null,
    "seamless": false,
    "paymentSource": {
        "cardDefault": false,
        "card": {
            "token": "token_q8L5Bf-2XCzmybLpkOiRShJnwhYVo",
            "expYear": "25",
            "expMonth": "04",
            "lastFourDigits": "0002",
            "brand": "visa",
            "deviceFingerPrint": "1665526382330",
            "ipAddress": "201.172.172.140",
            "bank": "ABC CAPITAL",
            "type": "debit",
            "country": "MX",
            "scheme": "debit",
            "cardPrefix": "400000",
            "preAuth": false,
            "vault": true,
            "simpleUse": false
        },
        "source": "token_q8L5Bf-2XCzmybLpkOiRShJnwhYVo",
        "type": "card"
    },
    "billing": {
        "firstName": "Roberto",
        "lastName": "Frias",
        "email": "[email protected]",
        "phone": "8182107894",
        "ipAddress": "201.172.172.140",
        "merchantReferenceCode": "VmiQgQupub",
        "address": {
            "city": "monterrey",
            "country": "MX",
            "postalCode": "56680",
            "state": "Nuevo León",
            "street1": "Jdiis",
            "street2": ""
        }
    },
    "referenceID": "1668110499354"
}

Review

Cuando el estatus es review nos indica que la transacción requiere una validación extra por medio de 3Ds, a continuación se indican los pasos para realizar este proceso.

Variables que se tiene que enviar en el proceso y de donde obtenerlas.

VariableDe donde la Obtenemos
statusse obtiene de la respuesta del servicio Charges
responseCodese obtiene de la respuesta del servicio Charges dentro del arreglo threeDSecureResponse
acsUrlse obtiene de la respuesta del servicio Charges dentro del arreglo threeDSecureResponse
paReqse obtiene de la respuesta del servicio Charges dentro del arreglo threeDSecureResponse
authenticationTransactionIDse obtiene de la respuesta del servicio Charges dentro del arreglo threeDSecureResponse

Ejemplo de respuesta:

{
    "source": "token_q8L5Bf-2XCzmybLpkOiRShJnwhYVo",
    "amount": 500.0,
    "description": "Pago de Inscripción del Jugador Jdnxn Dhsb de la categoria Hormigas",
    "status": "review",
    "transactionTokenId": "b895a3de-596f-4be9-880a-54bfa04d5b0a",
    "redirect3dsUri": "http://example.com/",
    "returnUrl": "https://gateway-154.netpaydev.com/gateway-ecommerce/v1/three-d-secure/paymenth-auth-enroll/b895a3de-596f-4be9-880a-54bfa04d5b0a?webHook=http://example.com/",
    "paymentMethod": "card",
    "currency": "MXN",
    "createdAt": "2022-11-17T23:10:39.465+0000",
    "error": null,
    "installments": null,
    "ship": null,
    "client": null,
    "saveCard": false,
    "instegrationsdk": "Custom",
    "integrationSdkVersion": "3.5",
    "cvv": null,
    "service3DSecureResponse": {
        "acsURL": "https://merchantacsstag.cardinalcommerce.com/MerchantACSWeb/pareq.jsp?vaa=b&gold=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "paReq": "eNpVUstuwjAQvPsrItSzXyRA0dZS2orCAQSlRe0xdVYkVUnAcYDw9bUD9HHb2Yd3ZtbwkhnExyXq2qCCKVZVssYgT+86ejCyVqzeunvxLMay4nLBOwrm8TPuFOzRVHlZKEE5lcCukLgnjM6SwipI9O5+MlNh71aKHrALJLBBM3lUQnbDqNcHdoYEimSDaoY2mCdNsKQxDVIMHuiKAmtLBHRZF9Y0KhyEwK6AQG2+VGbtthoydjgcqG4+HJuyNhqpLjcMmO8gwH6pzWsfVU7xMU/V+yl7SseL4+prfUo/R8vp67rRp7h5fYnvgPkOAmliUUkupRCiH8juUPBh6IS3eQLJxtNRN0HEOeXcqT0nCGz9qviMXNHX/qacqtoYLPRV1hURwOO2LND1uDU/sZPxS/5h7F3W1vnXE9FAyIG3ucXteO78kREP2/m8NYv5GXY5Irvc20X//sE3T7qrSw==",
        "veresEnrolled": "Y",
        "responseCode": 475,
        "secXid": null,
        "request_token": null,
        "order_id": null,
        "request_id": null,
        "responseMsg": null,
        "sec_status": null,
        "eciRaw": null,
        "secEci": null,
        "eci": null,
        "authenticationResult": null,
        "cavv": null,
        "paresStatus": null,
        "authentication_status_message": null,
        "invalidField[0]": null,
        "xid": "YzhGdHQxVlgzdjFSMUgyczAyUTA=",
        "specificationVersion": "1.0.2",
        "ecommerceIndicator": null,
        "ucafAuthenticationData": null,
        "TransactionId": "c8Ftt1VX3v1R1H2s02Q0",
        "cardTypeName": "VISA"
    },
    "merchantRefCode": null,
    "tokenRequestDTO": null,
    "transactionType": "Auth",
    "surcharge": null,
    "tokenAmount": null,
    "expiryDate": null,
    "threeDSecureResponse": {
        "responseCode": 475,
        "status": "PROCEED_TO_VALIDATE_AUTHENTICATION",
        "redirect": true,
        "authUrl": "https://gateway-154.netpaydev.com/gateway-ecommerce/v1/three-d-secure/paymenth-auth-enroll/b895a3de-596f-4be9-880a-54bfa04d5b0a",
        "jwt": null,
        "acsUrl": "https://merchantacsstag.cardinalcommerce.com/MerchantACSWeb/pareq.jsp?vaa=b&gold=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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lZKEE5lcCukLgnjM6SwipI9O5+MlNh71aKHrALJLBBM3lUQnbDqNcHdoYEimSDaoY2mCdNsKQxDVIMHuiKAmtLBHRZF9Y0KhyEwK6AQG2+VGbtthoydjgcqG4+HJuyNhqpLjcMmO8gwH6pzWsfVU7xMU/V+yl7SseL4+prfUo/R8vp67rRp7h5fYnvgPkOAmliUUkupRCiH8juUPBh6IS3eQLJxtNRN0HEOeXcqT0nCGz9qviMXNHX/qacqtoYLPRV1hURwOO2LND1uDU/sZPxS/5h7F3W1vnXE9FAyIG3ucXteO78kREP2/m8NYv5GXY5Irvc20X//sE3T7qrSw==",
        "apiIdentifier": "5cf8a7aa0e423d0f7cf284d5",
        "apiKey": "f259a31f-fbba-4c21-9066-f1ad2db840ed",
        "orgUnitId": "5cf88ffbe0919f07acac88b6",
        "specificationVersion": "1.0.2",
        "eci": null,
        "eciRaw": null,
        "authenticationTransactionID": "c8Ftt1VX3v1R1H2s02Q0",
        "continueTransaction": true,
        "frictionLess": null,
        "xid": "YzhGdHQxVlgzdjFSMUgyczAyUTA=",
        "paresStatus": null
    },
    "seamless": false,
    "paymentSource": {
        "cardDefault": false,
        "card": {
            "token": "token_q8L5Bf-2XCzmybLpkOiRShJnwhYVo",
            "expYear": "25",
            "expMonth": "04",
            "lastFourDigits": "0002",
            "brand": "visa",
            "deviceFingerPrint": "1665526382330",
            "ipAddress": "201.172.172.140",
            "bank": "ABC CAPITAL",
            "type": "debit",
            "country": "MX",
            "scheme": "debit",
            "cardPrefix": "400000",
            "preAuth": false,
            "vault": true,
            "simpleUse": false
        },
        "source": "token_q8L5Bf-2XCzmybLpkOiRShJnwhYVo",
        "type": "card"
    },
    "billing": {
        "firstName": "Roberto",
        "lastName": "Frias",
        "email": "[email protected]",
        "phone": "8182107894",
        "ipAddress": "201.172.172.140",
        "merchantReferenceCode": "NsrRUesJfU",
        "address": {
            "city": "monterrey",
            "country": "MX",
            "postalCode": "56680",
            "state": "Nuevo León",
            "street1": "Jdiis",
            "street2": ""
        }
    },
    "referenceID": "1668110499354"
}

Después de la respuesta del servicio Chargues se tienen que realizar el siguiente flujo iniciando con la función canProceed donde se envía el status de la transacción, el responseCode que se encuentra dentro del arreglo threeDSecureResponse asi como el acsUrl esto nos arrojara un valor TRUE o FALSE en dado que sea TRUE consinua el proceso con la funcion proceed donde se pasa el acsUrl el paReq y el authenticationTransactionID estos se obtienen de la respuesta del Chargues dentro del arreglo threeDSecureResponse despues mostrara la ventana que se muestra en la imagen siguiente:

3DS 2.0

Se ingresa el codigo y se da en confirmar esto llama a la funcion callbackProceed de manera automática y esta nos genera el processorTransactionId y esta a su ves llama a la funcion confirm dentro de esta debemos llamar al servicio del siguiente paso.

let canProceed = netpay3ds.canProceed(data->status, data->threeDSecureResponse->responseCode, data->threeDSecureResponse->acsUrl);

if(canProceed) {
  const callbackProceed = function(_this, processorTransactionId, status) {
    
    if(status == 'success') {  
      confirm(data->transactionTokenId, processorTransactionId);
    }else {
      //Rechazar transacción, mostrar mensaje de transacción rechazada
      console.log('error');
    }
  }

  netpay3ds.proceed(_this, data->threeDSecureResponse->acsUrl , data->threeDSecureResponse->paReq, data->threeDSecureResponse->authenticationTransactionID, callbackProceed);

}else {
  //Realizar confirmacion
  console.log("Realizamos confirmacion");
  confirm(data->transactionTokenId, null);
}