我正在使用以下配置:Apache/2.2.22 (Win32) PHP/5.4.17
执行 php 示例时,我收到以下错误消息:
注意:未定义的偏移量:1 在 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Intuit_Original\class.aggcatauth.php 第 199 行 $ResponseKVPairs[$OneKVPair[0]] = $OneKVPair[1 ];
注意:未定义索引:C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Intuit_Original\class.aggcatauth.php 中的 oauth_token 在第 202 行 $oauth_token = $ResponseKVPairs['oauth_token'];
注意:未定义索引: oauth_token_secret 在 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Intuit_Original\class.aggcatauth.php 第 203 行 $oauth_token_secret = $ResponseKVPairs['oauth_token_secret'];
警告:在 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Intuit_Original\example.php 中为 foreach() 提供的参数无效,第 65 行 foreach($xmlObj as $OneInstitution)
我认为原因是从https://oauth.intuit.com/oauth/v1/get_access_token_by_saml收到空令牌(我检查了这个)
我的 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");
提供的键适用于 C# 示例。(但我使用了 p12 文件)。
那么为什么它不起作用呢?期待您的回答。