3DS2 - Authentification challenge en timeout
Pour tester ce scénario, utilisez un des numéros de carte ci-dessous :
Carte | Date de validité | Marque |
---|---|---|
4970110000000021 | Au choix | VISA |
5100010000000049 | Au choix | MASTERCARD |
375900000000016 | Au choix | AMEX |
Au moment de la saisie du code d'authentification, ne rien saisir et attendre 10 minutes que la session de paiement expire.
Cinématique des échanges
- Appel initial au service V4.1/PCI/Charge/CreateToken
{ "amount": "990", "currency": "EUR", "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 } ] }
<details> <summary>Réponse</summary>
Dans l'exemple :
```json { "webService":"PCI/Charge/CreateToken", "version":"V4.1", (...) "answer":{ "operationSessionId":"30641640cba14eab8e6766094fd201da", "operationUrl":"https://api-sogecommerce.societegenerale.eu/api-payment/V4/Charge/Public/Authenticate/Payment/Session/30641640cba14eab8e6766094fd201da;JSESSIONID=7A4beEA2d5fdbFeA7389F3B91a7bDBaBc8DA9df5.default-hostname", "_type":"V4/PCI/Authentication/AuthenticationSessionResponse" } } ```answer.operationUrl
: "https://api-sogecommerce.societegenerale.eu/api-payment/V4/Charge/Public/Authenticate/Payment/Session/30641640cba14eab8e6766094fd201da;JSESSIONID=7A4beEA2d5fdbFeA7389F3B91a7bDBaBc8DA9df5.default-hostname"Transmettez le champ
operationUrl
à la méthode d'authentificationkr-authenticate.js
de la librairie JS (plus d'infos : Guide d'intégration).
- Redirection vers l’ACS de la banque du porteur de carte
La libraire JS effectue **automatiquement** toutes les actions nécessaires, sans aucun développement spécifique pour le marchand.
- Retour du serveur de la plateforme de paiement avec le résultat du paiement
```json { "webService":"PCI/Charge/CreateToken", "version":"V4", "applicationVersion":"5.30.0", "status":"SUCCESS", "answer":{ "shopId":"12345678", "orderCycle":"CLOSED", "orderStatus":"UNPAID", "serverDate":"2021-12-10T10:38:39+00:00", "orderDetails":{ "orderTotalAmount":0, "orderEffectiveAmount":0, "orderCurrency":"EUR", "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, "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":"myCustomerRef-123456", "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":"185.244.73.2", "browserUserAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36", "_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":"5ec224e752e244c2b943b43de9e63f3f", "amount":0, "currency":"EUR", "paymentMethodType":"CARD", "paymentMethodToken":null, "status":"UNPAID", "detailedStatus":"REFUSED", "operationType":"VERIFICATION", "effectiveStrongAuthentication":"DISABLED", "creationDate":"2021-12-10T10:38:36+00:00", "errorCode":"PSP_539", "errorMessage":"3D Secure refusal for the transaction", "detailedErrorCode":"39", "detailedErrorMessage":"3D Secure refusal for the transaction.", "metadata":null, "transactionDetails":{ "liabilityShift":null, "effectiveAmount":0, "effectiveCurrency":"EUR", "creationContext":"VERIFICATION", "cardDetails":{ "paymentSource":"EC", "manualValidation":"NO", "expectedCaptureDate":null, "effectiveBrand":"VISA", "pan":"497011XXXXXX0021", "expiryMonth":11, "expiryYear":2027, "country":"FR", "issuerCode":17807, "issuerName":"Banque Populaire Occitane", "effectiveProductCode":null, "legacyTransId":"926164", "legacyTransDate":"2021-12-10T10:38:36+00:00", "paymentMethodSource":"TOKEN", "authorizationResponse":{ "amount":null, "currency":null, "authorizationDate":null, "authorizationNumber":null, "authorizationResult":null, "authorizationMode":"FULL", "_type":"V4/PaymentMethod/Details/Cards/CardAuthorizationResponse" }, "captureResponse":{ "refundAmount":null, "refundCurrency":null, "captureDate":null, "captureFileNumber":null, "effectiveRefundAmount":null, "effectiveRefundCurrency":null, "_type":"V4/PaymentMethod/Details/Cards/CardCaptureResponse" }, "threeDSResponse":{ "authenticationResultData":{ "transactionCondition":null, "enrolled":null, "status":null, "eci":null, "xid":null, "cavvAlgorithm":null, "cavv":null, "signValid":null, "brand":null, "_type":"V4/PaymentMethod/Details/Cards/CardAuthenticationResponse" }, "_type":"V4/PaymentMethod/Details/Cards/ThreeDSResponse" }, "authenticationResponse":{ "id":"e0fa068f-ac95-47dd-a4b7-6799e5268771", "operationSessionId":"81655958183e4e9e955115197599870f", "protocol":{ "name":"THREEDS", "version":"2.1.0", "network":"VISA", "challengePreference":"CHALLENGE_MANDATED", "simulation":true, "_type":"V4/Charge/Authenticate/Protocol" }, "value":{ "authenticationType":"CHALLENGE", "status":"FAILED", "extension":{ "authenticationType":"THREEDS_V2", "_type":"V4/Charge/Authenticate/AuthenticationResultExtensionThreedsV2" }, "reason":{ "code":"AUTHENTICATION_ERROR", "message":"Challenge timeout", "_type":"V4/Charge/Authenticate/AuthenticationResultReason" }, "_type":"V4/Charge/Authenticate/AuthenticationResult" }, "_type":"V4/AuthenticationResponseData" }, "installmentNumber":null, "installmentCode":null, "markAuthorizationResponse":{ "amount":null, "currency":null, "authorizationDate":null, "authorizationNumber":null, "authorizationResult":null, "_type":"V4/PaymentMethod/Details/Cards/MarkAuthorizationResponse" }, "cardHolderName":null, "identityDocumentNumber":null, "identityDocumentType":null, "_type":"V4/PaymentMethod/Details/CardDetails" }, "fraudManagement":{ "riskControl":[], "riskAnalysis":[], "_type":"V4/PaymentMethod/Details/FraudManagement" }, "subscriptionDetails":{ "subscriptionId":null, "_type":"V4/PaymentMethod/Details/SubscriptionDetails" }, "parentTransactionUuid":null, "mid":"9999999", "sequenceNumber":1, "taxAmount":null, "preTaxAmount":null, "taxRate":null, "externalTransactionId":null, "nsu":null, "tid":"001", "acquirerNetwork":"CB", "taxRefundAmount":null, "userInfo":"API REST", "paymentMethodTokenPreviouslyRegistered":null, "occurrenceType":"RECURRENT_INITIAL", "_type":"V4/TransactionDetails" }, "_type":"V4/PaymentTransaction" } ], "subMerchantDetails":null, "_type":"V4/Payment" }, "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": "990",, "currency": "EUR", "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": "990", "effectiveCurrency": "EUR", "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" } ```