Invalid aggcat php example

I use the following configuration: Apache / 2.2.22 (Win32) PHP / 5.4.17

When running the php example, I get the following error messages:

Note: Undefined offset: 1 in C: \ Program Files (x86) \ Apache Software Foundation \ Apache2.2 \ htdocs \ Intuit_Original \ class.aggcatauth.php on line 199 $ ResponseKVPairs [$ OneKVPair [0]] = $ OneKVPair [1 ];

Note: Undefined index: oauth_token in C: \ Program Files (x86) \ Apache Software Foundation \ Apache2.2 \ htdocs \ Intuit_Original \ class.aggcatauth.php on line 202 $ oauth_token = $ ResponseKVPairs ['oauth_token'];

Note: Undefined index: oauth_token_secret in C: \ Program Files (x86) \ Apache Software Foundation \ Apache2.2 \ htdocs \ Intuit_Original \ class.aggcatauth.php on line 203 $ oauth_token_secret = $ ResponseKVPairs ['oauth_token_secret'];

Warning: invalid argument provided by foreach () in C: \ Program Files (x86) \ Apache Software Foundation \ Apache2.2 \ htdocs \ Intuit_Original \ example.php on line 65 foreach ($ xmlObj as $ OneInstitution)

I assume the reason is empty tokens (I checked this) from https://oauth.intuit.com/oauth/v1/get_access_token_by_saml

My Config.php:

<?php define('SIMPLESAML_PATH', 'C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/phplibs/simplesamlphp-1.11.0'); define('SIMPLEOAUTH_PATH', 'C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/phplibs'); define('OAUTH_CONSUMER_KEY', 'qyprdM8VUKLwmWSytg83gPmnRSGLWJ'); define('OAUTH_SHARED_SECRET', 'yWdb7SHKubxEKxxFnkliGfDAKnehuwh9fkRmfAYk'); define('SAML_IDENTITY_PROVIDER_ID', 'accountingsuite.12359.cc.dev-intuit.ipp.prod'); define('SAML_X509_CERT_PATH', 'C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Intuit keys\intuit.crt'); define('SAML_X509_PRIVATE_KEY_PATH', 'C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Intuit keys\intuit.key'); define('SAML_NAME_ID', '001'); // Up to you; just "keep track" of what you use define('OAUTH_SAML_URL', 'https://oauth.intuit.com/oauth/v1/get_access_token_by_saml'); define('FINANCIAL_FEED_HOST', 'financialdatafeed.platform.intuit.com'); define('FINANCIAL_FEED_URL', 'https://'.FINANCIAL_FEED_HOST.'/'); require_once(SIMPLESAML_PATH . "/lib/xmlseclibs.php"); require_once(SIMPLESAML_PATH . "/lib/SimpleSAML/Utilities.php"); require_once(SIMPLEOAUTH_PATH . "/OAuthSimple.php"); 

The above keys work fine with the C # example. (But I used the p12 file).

So why doesn't it work? Waiting for your answer.

+3
source share
1 answer

I'm having problems with the PHP example application and getting started. After some debugging, here is what I had to change to make it work:

• The OAuthSimple.php file was not part of the SimpleSAML package that I downloaded, as described in the phpaggcat example . I found the OAuthSimple.php file here: OAuthSimple.php download .

• curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, false); // Changed from true to false in class.aggcatauth.php

• curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, false); // Added this line in the curl example.php option

• set_time_limit (120); // Added this at the beginning of example.php, because the download to the bank lasted longer than 30 seconds

• changed max_input_vars = 2500 in php.ini

As soon as I made these changes, I was able to connect to the API and make it work.

+2
source

All Articles