I am testing creating a funding source through Dwolla.js and am now getting InvalidIavToken. The only guidance for this error mentions getting the same IavToken every time it is run, but I am getting a new one every time.
I am able to create the customer without any problem. I get a new IAV token, but it is not accepted. Below is the code I am working with, using PHP.
Thanks for your time.
<script type="text/javascript">
dwolla.iav.start('<?php echo $iavToken->token; ?>', {
container: 'iavContainer',
stylesheets: [
'https://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext'
],
microDeposits: false,
fallbackToMicroDeposits: true,
backButton: true,
subscriber: ({ currentPage, error }) => {
console.log('currentPage:', currentPage, 'error:', JSON.stringify(error))
}
}, function(err, res) {
console.log('Error: ' + JSON.stringify(err) + ' -- Response: ' + JSON.stringify(res));
});
Here is a sample of the last javascript from the client:
<script type=“text/javascript”>
dwolla.iav.start(‘aWLL3WIYAMJNeYKGUiju0XQnghv12wJyvwNCO9lUzDIQxLXfQr’, {
container: ‘iavContainer’,
stylesheets: [
‘https://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext’
],
microDeposits: false,
fallbackToMicroDeposits: true,
backButton: true,
subscriber: ({ currentPage, error }) => {
console.log(‘currentPage:’, currentPage, ‘error:’, JSON.stringify(error))
}
}, function(err, res) {
console.log('Error: ’ + JSON.stringify(err) + ’ – Response: ’ + JSON.stringify(res));
});