I am working on Dwolla payment gateway integration. I have created one sandbox user and created one application and got Client key and secret both. Now if i am generating access token from sandbox account and using it(access token) in my iOS application it works fine and i am able to get balance,account info etc. I want to generate access token from my iOS application but the method is not working on my side. can any one help me for this.
I got dwolla sdks from here https://github.com/Dwolla/dwolla-ios . According to this, This method should get called when user successful logged in
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)req navigationType:(UIWebViewNavigationType)navigationType
{
NSMutableURLRequest *request = (NSMutableURLRequest *)req;
NSArray *urlItems = [[request.URL query] componentsSeparatedByString:@"&"];
NSMutableArray *urlValues = [[NSMutableArray alloc] initWithCapacity:[urlItems count]];
for (int i = 0; i<[urlItems count]; i++)
{
NSArray *keysValues = [[urlItems objectAtIndex:i] componentsSeparatedByString:@"="];
[urlValues insertObject:keysValues atIndex:i];
}
if([urlValues count]>0 && [self hasCode:urlValues])
{
[self requestAccessToken:[[urlValues objectAtIndex:0]objectAtIndex:1]];
return NO;
}
return YES;
}
and this condition need to be full fill to get access token, but in my case this condition never gets true.
if([urlValues count]>0 && [self hasCode:urlValues])
{
[self requestAccessToken:[[urlValues objectAtIndex:0]objectAtIndex:1]];
return NO;
}