barnjamin/dwolla — Issue #3: user function - needed options params
Author: cvarick
Created: 2012-02-17 18:05:13+00:00
State: open

Ben,

Wanted to let you know in testing your class further. I found the "user" function to not work properly. I kept getting the error: (Invalid application credentials.) After taking a look at the "user" function I realized you were not passing the "options" as a parameter to the build_url function. I added the $params required for the users end-point and all is well now.

See the fix below:
[code]

//"accountinfofull" scope
function user($user=null){
$this->end_point = "rest/users";
if(!empty($user)) $this->end_point .= '/'.$user;

//quick fix
$params = $this->options;

$url = $this->build_url($params);
$result = $this->execute_query('GET', $url);
return $result;
}

[/code]

thanks again for putting this class together, it is great!