I need to update a Paysafe Checkout integration due to a change in requirements from Visa[1]. From the suggested changes I can see that I have to add email/phone/cellphone values to a profile
object on the setup options, but the API documentation does not detail any profile
properties, so I’m at a loss as to what to do about this. Has anyone else had to deal with this that could offer some insights?
FWIW here’s a code snippet of the JS code from the place I think I need to add the profile data. Note: the code currently works without the profile data, so I can’t tell if just adding the profile
data to paymentData
has any effect at all :-/
const paymentData = {
amount: amount,
currency: 'GBP',
accounts:{
CC: accountNumber
},
billingAddress:{
country: "GB",
zip: postcode,
state: state,
city: city,
street: address,
},
environment: 'TEST',
companyName: 'myco',
buttonColor: '#121212',
imageUrl: 'https://myco.com/img/logo.jpg',
holderName: '',
displayPaymentMethods: ['Cards'],
threeDS: {
useThreeDSecureVersion2: true
}
};
const payeeData={
amount,
address,
city,
state,
postcode,
reference
};
const token = GetToken();
paysafe.checkout.setup(
token,
paymentData,
function (instance, error, result) {
postPaymentProcessing(payeeData, instance, error, result);
},
function(stage){
console.log('closed at payment stage: ' + stage);
}
);
[1] https://go.pardot.com/webmail/365931/1644206923/c2913a61471857eeea22a44effc737a3815c5cce267486bd0a60c8173b57b599
[2] https://developer.paysafe.com/en/api-docs/client-side-sdks/paysafe-checkout-powered-by-cards-api/setup-function/