Closed yespbs closed 9 years ago
Its was aquick fix, I applied following changes, please merge
public static $test_mode = false; public static function setTestMode(){ self::$test_mode = true; }
public static function getTestMode() { return self::$test_mode; }
APIRequest.php in request() method before requestWithCURL call
// test mode if( Iugu::getTestMode() ){ $data['mode'] = 'TEST'; }
Just use the TEST API TOKEN. There is no need to add a data['mode'] = 'TEST'.
yes, I used that first, when it returned no data( tested plan list and customer fetch which resulted in not found error), I investigated further and found that the mode variable as instructed in API documentation is missing. Which when added started fetching the test account data.
So not only the test account token but also the mode variable is needed
Here is working, just tested.
Check again. There is like 300 startups using this way and work.
Not sure, should I send you the copy I have? the git was just downloaded today and tested?
I have attached the test screens, one without the mode and one with the mode
here is the print part in code https://gist.github.com/yespbs/5f0020d0d3ba7d13a87e
I can send you the api key but to email, where should I send?
patrick@iugu.com
Send me the account ID too.
sure, sent
may be this is an account level issue? I am not sure, this is my first work with Iugu
Closing the issue since i am solving this by email.
There is no option specify a TEST account? In Iugu_APIRequest::request() I added forced $data['mode'] = 'TEST'; before requestWithCURL and it works
Please add support