Within my dwolla sandbox, a customer account currently has one bank account source attached (as well as several already removed sources). When I create a new source through dwolla.js, it returns the expected link with the new funding source and says the creation was successful, but the link is of the existing funding source, and the new source is not actually created. Any help or suggestions are appreciated. This is using react, but even if you are not familiar you should be able to get the gist of what is going on.
useEffect(() => {
async function initializeIAV(teamId) {
const iavToken = await bankAccountContext.getIAVToken(teamId)
// handle
//console.log(res.data.iav_token)
if(iavToken !== undefined){
const dwolla = window.dwolla
dwolla.configure('sandbox');
dwolla.iav.start(iavToken, {
container: 'iavContainerEdit',
microDeposits: false,
fallbackToMicroDeposits: true
}, (err, res) => {
console.log(err,res)
if (err) {
console.log(err)
alert("An error occured")
} else {
console.log(res._links)
}
});
}
}
if (open) {
initializeIAV(teamId)
}
}, [open])
const closeEdit = () => {
setConfirmOpen(false)
setOpen(false)
}
return (
<DialogContent className={classes.content}>
<div id="iavContainerEdit"></div>
</DialogContent>
)