使用phpsdk时,Quickbook获取Accesstoken问题


Quickbook get Accesstoken Issue while using the phpsdk

试图使用沙箱连接quickbook,但在授权后显示签名问题。

任何以前做过这件事的人都可以向我发送php中的工作示例代码。

OAuthException Object
(
    [message:protected] => Invalid auth/bad request (got a 401, expected HTTP/1.1 20X or a redirect)
    [string:Exception:private] => 
    [code:protected] => 401
    [file:protected] => /var/www/mssdev/quickbook/PHPSample/Test/oauth.php
    [line:protected] => 37
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/mssdev/quickbook/PHPSample/Test/oauth.php
                    [line] => 37
                    [function] => getAccessToken
                    [class] => OAuth
                    [type] => ->
                    [args] => Array
                        (
                            [0] => https://oauth.intuit.com/oauth/v1/get_access_token
                        )
                )
        )
    [previous:Exception:private] => 
    [lastResponse] => oauth_problem=signature_invalid
    [debugInfo] => Array
        (
            [sbs] => GET&https%3A%2F%2Foauth.intuit.com%2Foauth%2Fv1%2Fget_access_token&oauth_consumer_key%3DqyprdVAVnQU3sqJFd8R2SfksB73AXF%26oauth_nonce%3D1585561009557178083e35b6.09089809%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1433499656%26oauth_token%3DqyprdwSq502Ge9SEEBRIJ2ybhPCFtX7lo7H0gtGOPoGFGKrF%26oauth_verifier%3Ddrg9rff%26oauth_version%3D1.0
            [headers_recv] => HTTP/1.1 401 Unauthorized
Date: Fri, 05 Jun 2015 10:20:58 GMT
Server: Apache
WWW-Authenticate: OAuth oauth_problem="signature_invalid"
Cache-Control: no-cache, no-store
Pragma: no-cache
Content-Length: 31
Connection: close
Content-Type: text/plain
X-Pad: avoid browser bug
            [body_recv] => oauth_problem=signature_invalid
        )
)

从GitHub:开始

  • https://github.com/consolibyte/quickbooks-php

遵循以下快速入门指南:

  • http://www.consolibyte.com/docs/index.php/PHP_DevKit_for_QuickBooks_-_Quick-Start

您最终将运行以下示例:

  • https://github.com/consolibyte/quickbooks-php/tree/master/docs/partner_platform/example_app_ipp_v3