3DS2 - autentificación con challenge, con 3DS Method
Para probar este escenario, use uno de los números de tarjeta a continuación:
Tarjeta | Fecha de vencimiento. | Marca |
---|---|---|
4970110000001003 | A elección | VISA |
5100010000000106 | A elección | MASTERCARD |
375900000010015 | A elección | AMEX |
Secuencia de los intercambios
1. Llamada inicial al servicio V4.1/PCI/Charge/CreateToken
{
"amount": "180",
"currency": "PEN",
"customer": {
"email": "<sample@example.com>"
},
"ipnTargetUrl": "<https://my.site/my-ipn>",
"orderId": "myOrderId-1234",
"paymentForms": [
{
"paymentMethodType": "CARD",
"pan": "5100010000000049",
"expiryMonth": 11,
"expiryYear": 2,
"securityCode": 123
}
]
}
Respuesta
{
"webService":"PCI/Charge/CreateToken",
"version":"V4.1",
(...)
"answer":{
"operationSessionId":"30641640cba14eab8e6766094fd201da",
"operationUrl":"https://api.micuentaweb.pe/api-payment/V4/Charge/Public/Authenticate/Payment/Session/30641640cba14eab8e6766094fd201da;JSESSIONID=7A4beEA2d5fdbFeA7389F3B91a7bDBaBc8DA9df5.default-hostname",
"_type":"V4/PCI/Authentication/AuthenticationSessionResponse"
}
}
En el ejemplo:
answer.operationUrl
: "https://api.micuentaweb.pe/api-payment/V4/Charge/Public/Authenticate/Payment/Session/30641640cba14eab8e6766094fd201da;JSESSIONID=7A4beEA2d5fdbFeA7389F3B91a7bDBaBc8DA9df5.default-hostname"Transmite el campo
operationUrl
al método de autentificaciónkr-authenticate.js
de la biblioteca JS (más información: undefined).
2. Redirección al ACS del banco del titular de la tarjeta.
- La biblioteca JS realiza automáticamente todas las acciones necesarias, el vendedor no necesita realizar ningún desarrollo específico.
3. Retorno del servidor de la plataforma de pago con el resultado de pago.
{
"webService":"PCI/Charge/CreateToken",
"version":"V4.1",
(...)
"ticket":"3b68064f80f346919828dee761bd22b5",
"applicationProvider":"MCW",
"metadata":null,
"status":"SUCCESS",
"mode":"TEST",
"serverUrl":"https://api.micuentaweb.pe",
"_type":"V4/WebService/Response",
"answer":{
"shopId": "12345678",
"orderCycle": "CLOSED",
"orderStatus": "PAID",
(...)
"orderDetails": {
"orderTotalAmount": "180",
"orderEffectiveAmount": "180",
"orderCurrency": "PEN",
"mode": "TEST",
"orderId": null,
"metadata": null,
"_type": "V4/OrderDetails"
},
"customer": {
"billingDetails": {
"address": null,
"category": null,
"cellPhoneNumber": null,
"city": null,
"country": null,
"district": null,
"firstName": null,
"identityCode": null,
"identityType": null,
"language": "FR",
"lastName": null,
"phoneNumber": null,
"state": null,
"streetNumber": null,
"title": null,
"zipCode": null,
"legalName": null,
"_type": "V4/Customer/BillingDetails"
},
"email": "<sample@example.com>",
"reference": null,
"shippingDetails": {
"address": null,
"address2": null,
"category": null,
"city": null,
"country": null,
"deliveryCompanyName": null,
"district": null,
"firstName": null,
"identityCode": null,
"lastName": null,
"legalName": null,
"phoneNumber": null,
"shippingMethod": null,
"shippingSpeed": null,
"state": null,
"streetNumber": null,
"zipCode": null,
"_type": "V4/Customer/ShippingDetails"
},
"extraDetails": {
"browserAccept": null,
"fingerPrintId": null,
"ipAddress": "54.86.50.139",
"browserUserAgent": "PostmanRuntime/7.32.2",
"_type": "V4/Customer/ExtraDetails"
},
"shoppingCart": {
"insuranceAmount": null,
"shippingAmount": null,
"taxAmount": null,
"cartItemInfo": null,
"_type": "V4/Customer/ShoppingCart"
},
"_type": "V4/Customer/Customer"
},
"transactions": [
{
"shopId": "12345678",
"uuid": "8e0e6596b08849c1a771488547bb7940",
"amount": "180",,
"currency": "PEN",
"paymentMethodType": "CARD",
"paymentMethodToken": null,
"status": "PAID",
"detailedStatus": "AUTHORISED",
"operationType": "DEBIT",
"effectiveStrongAuthentication": "ENABLED",
"creationDate": "2023-05-24T13:45:33+00:00",
"errorCode": null,
"errorMessage": null,
"detailedErrorCode": null,
"detailedErrorMessage": null,
"metadata": null,
"transactionDetails": {
"liabilityShift": "YES",
"effectiveAmount": "180",
"effectiveCurrency": "PEN",
"creationContext": "CHARGE",
"cardDetails": {
"paymentSource": "EC",
"manualValidation": "NO",
(...)
"taxRefundAmount": null,
"userInfo": null,
"paymentMethodTokenPreviouslyRegistered": null,
"occurrenceType": "UNITAIRE",
"archivalReferenceId": "L14491716001",
"useCase": null,
"wallet": null,
"_type": "V4/TransactionDetails"
},
"_type": "V4/PaymentTransaction"
}
],
"subMerchantDetails": null,
"_type": "V4/Payment"
}