QuickBooks IPP v3 getting error 3200 when adding Invoice

泪湿孤枕 提交于 2019-12-23 19:22:27

问题


I've been using the QuickBooks PHP DevKit for some time now in production with no issues.

However, recently I've been getting the following error from my create_invoice ajax script when I spit out:

if($resp = $InvoiceService->add($Context, $realm, $Invoice)){ 
    //create invoice code here
} else 
{
    echo $InvoiceService->lastError();
}

I get the following error:

3200: [message=ApplicationAuthenticationFailed; errorCode=003200; statusCode=401, ]

The only documentation I can find about this error is that error code 3200 means "Outdated edit sequence" but I am creating an Invoice.

So why is this error all of a sudden appearing?

It seems to have started giving me this error since July 11th. Before then everything was working fine.

Do I need to refresh my access tokens, and how would I go about doing that?


回答1:


The only documentation I can find about this error is that error code 3200 means "Outdated edit sequence" but I am creating an Invoice.

Error code 3200 (for qbXML) is entirely separate from error code 003200 (for IPP/v3), so "outdated edit sequence" isn't really relevant here at all.

So why is this error all of a sudden appearing?

Generally a "401 Authentication Failed" error pretty much means exactly what it says - authentication against the app failed.

This could be because of several reasons:

  • Your OAuth tokens expired (they expire after 6 months if you don't renew them)
  • Your OAuth tokens/connection were disconnected (this can be done from within the UI Intuit provides)
  • You're not sending the correct OAuth tokens anymore

Did you check your OAuth tokens? Are they still valid? Are you sending the correct ones?

Do I need to refresh my access tokens, and how would I go about doing that?

Maybe.

You can go back through the connection process (e.g. click the "Connect to QuickBooks" button again) to renew them.

If they have expired (e.g. you didn't renew within 6 months) you should implement the reconnect call to avoid this in the future:

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

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

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



来源:https://stackoverflow.com/questions/24891385/quickbooks-ipp-v3-getting-error-3200-when-adding-invoice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!