Following the documentation on the dwolla API guide for updating a customer I have implemented the following function for trying to reverify a customer after initially failing verification (customer is in a retry status):
function submitReverification(firstName, lastName, email, address, state, city, postalCode, dob, fullSsn) {
const dwolla = window.dwolla
dwolla.configure(process.env.REACT_APP_DWOLLA_ENV);
const formattedSsn = fullSsn.substr(0,3) + '-' + fullSsn.substr(3, 2) + '-' + fullSsn.substr(5)
let requestBody = {
firstName: firstName,
lastName: lastName,
email: email,
type: "personal",
address1: address,
city: city,
state: state,
postalCode: postalCode,
dateOfBirth: dob,
ssn: formattedSsn,
};
dwolla.post(customer_url, requestBody).then(async function getData() {
#Pull more data
})
}
When running this I am getting a 401 with a CORS error. Any ideas on what I could be doing wrong? Looking at the documentation I should have everything that is listed there.