I’m very new to Dwolla so please excuse me if this question is basic. I’m trying to implement the IAV flow using example code provided on the website but am getting the following error message:
Error: {“code”:“UnexpectedPage”,“message”:“IAV navigated to an unexpected page and was cancelled.”} – Response: undefined
Are you viewing testIAV.html in your browser using the file protocol? (e.g. at file:///Users/sausman/Desktop/testIAV.html). It should work if you view the page over HTTP instead.
Got it, thanks! Also, does IAV work for mobile apps or is it currently limited to desktop applications? And is there a way to do instant verification without going through the standard IAV flow (e.g., entirely through a back-end server)?
When I open the IAV HTML file on my desktop’s browser, the IAV process runs fine.
When I open the IAV HTML via a UIWebView within my app it:
a) WORKS when running in the Simulator
b) FAILS with the UnexpectedPage code when running on device
Has anyone been able to get the IAV script running in an app’s UIWebView while running on device?
By the way this worked for me for a few times but it stopped working for some reason. I do see the bank list flashing but it then throws the error as follows:
I get no errors on the console other than the ones I’m logging.
if (typeof err != “undefined”) {
console.log(“Dwolla error:”);
console.log(err);
alert(JSON.stringify(err));
}
if (typeof res != “undefined”) {
console.log(“Dwolla result:”);
console.log(res);
alert(JSON.stringify(res));
}
Dwolla error:
Object { code=“UnexpectedPage”, message=“IAV navigated to an unex…page and was cancelled.”}
I have removed all the Javascript “alerts” and instead using console.log for debugging. Now the bank selection shows and the flow works.
Every time it moves to the next step it still throws the error and at the end I dont get a result just the error.
CORRECTION: I do get a result back. The problem is how do I know when the errors are valid or not. I guess once I get a result back will do the trick but not ideal.
@roberto_tijerino@PJ_Caraher Thanks for the info, that helps a lot! I think I may know what’s going on. I’m working on reproducing the issue locally to make sure. If it is what I think it is I will push a fix later today and it shouldn’t require any code changes on your behalf. I will post here with updates.