...
Please note, if the merchant’s 3DS Provider is Cardinal, Flow 3 C is irrelevant and can be disregarded.
Flow A: 3Ds complete
If the response contains ECI and CAVV values, the 3DS step is complete and the merchant can proceed to call the SALE api with these values.
...
V2 Step 5: 3DS Result API (Flows B, C)
https://netvalve.atlassian.net/wiki/spaces/ND/pages/54395121/V2+Step+6%3A+Add+3DS+fields+in+Sale+API
...
The Auth API response will indicate 2 possible flows - Flow A and Flow B described above. The response structure and properties are exactly the same as the initialization response.
See:
V2 Step 2: Create Device Data Collection Iframe and POST event listener(Flow C)
V2 Step 3: 3DS Auth API3DS Auth API (Flow C)
Example logic for flows
Here is a minimal example of the logic that would be used to determine which flow to begin:
Code Block | ||
---|---|---|
| ||
// START 3DS Flow
const response = await initialize();
if (response.responseCode !== '3DS_1000') return handleError(response);
else if (response.threeDSProviderResponse.eci && response.threeDSProviderResponse.cavv) // Flow A - 3DS complete
sale(response.threeDSProviderResponse);
else if (response.threeDSProviderResponse.status === 'ACS_REQUIRED') // Flow B - challenge required
redirectToChallengePage(response);
else if (response.threeDSProviderResponse.status === 'INITIALIZED') // Flow C - device data collection required
deviceDataCollection(response); |