From 1c92db095a04c09975d80e56a1ea543e660c40e0 Mon Sep 17 00:00:00 2001 From: Aladin Taleb Date: Thu, 25 Jan 2024 09:41:11 +0100 Subject: [PATCH 1/2] feat: add 3ds data to client session --- .../cobadged/src/api/createClientSession.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/examples/features/cobadged/src/api/createClientSession.ts b/examples/features/cobadged/src/api/createClientSession.ts index 38295c1..2928f3f 100644 --- a/examples/features/cobadged/src/api/createClientSession.ts +++ b/examples/features/cobadged/src/api/createClientSession.ts @@ -11,6 +11,28 @@ export function createClientSession() { order: { countryCode: 'GB', }, + + // emailAddress and billingAddress are required for 3DS + customer: { + emailAddress: "test@test.com", + mobileNumber: "+6588889999", + firstName: "John", + lastName: "Smith", + billingAddress: { + firstName: "John", + lastName: "Smith", + postalCode: "CB94BQ", + addressLine1: "47A", + countryCode: "CL", + city: "Cambridge", + state: "Cambridgeshire" + } + }, + + paymentMethod: { + orderedAllowedCardNetworks: ["CARTES_BANCAIRES", "VISA", "MASTERCARD"] + } + }, primerHeaders, ); From 8792040d2c757954c1dd05e5d680b5bef0819df2 Mon Sep 17 00:00:00 2001 From: Aladin Taleb Date: Thu, 25 Jan 2024 13:50:24 +0100 Subject: [PATCH 2/2] fix: prettier --- .../cobadged/src/api/createClientSession.ts | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/examples/features/cobadged/src/api/createClientSession.ts b/examples/features/cobadged/src/api/createClientSession.ts index 2928f3f..02934f4 100644 --- a/examples/features/cobadged/src/api/createClientSession.ts +++ b/examples/features/cobadged/src/api/createClientSession.ts @@ -14,25 +14,24 @@ export function createClientSession() { // emailAddress and billingAddress are required for 3DS customer: { - emailAddress: "test@test.com", - mobileNumber: "+6588889999", - firstName: "John", - lastName: "Smith", + emailAddress: 'test@test.com', + mobileNumber: '+6588889999', + firstName: 'John', + lastName: 'Smith', billingAddress: { - firstName: "John", - lastName: "Smith", - postalCode: "CB94BQ", - addressLine1: "47A", - countryCode: "CL", - city: "Cambridge", - state: "Cambridgeshire" - } + firstName: 'John', + lastName: 'Smith', + postalCode: 'CB94BQ', + addressLine1: '47A', + countryCode: 'CL', + city: 'Cambridge', + state: 'Cambridgeshire', + }, }, paymentMethod: { - orderedAllowedCardNetworks: ["CARTES_BANCAIRES", "VISA", "MASTERCARD"] - } - + orderedAllowedCardNetworks: ['CARTES_BANCAIRES', 'VISA', 'MASTERCARD'], + }, }, primerHeaders, );