dongmie3987067 2016-10-26 23:53
浏览 20

Quickbooks woocommerce同步网络连接器

I am using a plugin called Quickbooks Integration Woocommerce. I am having some problems getting this to work correctly. There is a more recent version of the plugin however I can not purchase as it is out of stock for some reason.

I also found This Github repository Which seems to be very similar to the plugin. Written by the same author. However I am not going to lie. I am in over my head. This is my first run at something like this and I cant seem to figure it out.

So I am hoping if I post my error logs, someone can help point me in the direction needed and possibly provide me with some answers.

For those that are not ware. You install the plugin and generate a .QWC file. You then upload that file to Quickbooks Web Connector and it will sync up your woocommerce products.

Here is my .QWC file:

<?xml version="1.0"?>
<QBWCXML>
    <AppName>WooCommerce QuickBooks Connector</AppName>
    <AppID></AppID>
    <AppURL>https://my-site.com/?qbconnector=A2DRnLfb8qrU</AppURL>
    <AppDescription>QuickBooks Connector for Woocommerce.</AppDescription>
    <AppSupport>https://my-site.com/?qbconnector=support</AppSupport>
    <UserName>ply-quickbooks-connection</UserName>
    <OwnerID>{ADA96507-86F1-4FCC-B1FF-166DE1813D21}</OwnerID>
    <FileID>{ADA96507-86F1-4FCC-B1FF-966DE1813D21}</FileID>
    <QBType>QBFS</QBType>
    <Notify>false</Notify>
    <IsReadOnly>false</IsReadOnly>
</QBWCXML>

When I make the connection with Quickbooks Web Connector it seems to connect and authenticate. Then it proceeds to Say "SendRequestXML failed". Here is the Log file: https://jsfiddle.net/m8berLyu/. The thing that stood out to me is :

0161026.22:43:22 UTC    : QBWebConnector.SOAPWebService.do_sendRequestXML() : QBWC1041: SendRequestXML failed.
Error message: Response is not well-formed XML.

And I have no clue what that means.

Here is my error logs from the server:

[Wed Oct 26 23:23:23.100819 2016] [:error] [pid 10927] [client ] PHP Notice: wpdb::prepare was called <strong>incorrectly</strong>. The query argument of wpdb::prepare() must have a placeholder. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.9.0.) in /nas/content/live/ply/wp-includes/functions.php on line 3996, referer: https://my-site.com/wp-admin/plugins.php?plugin_status=all&paged=1&s
[Wed Oct 26 23:23:45.015771 2016] [:error] [pid 10926] [client ] PHP Notice: unserialize(): Error at offset 65529 of 65535 bytes in /nas/content/live/ply/wp-content/plugins/woocommerce-quickbooks/QuickBooks/WebConnector/Handlers.php on line 756
[Wed Oct 26 23:35:09.153751 2016] [:error] [pid 312] [client ] PHP Notice: unserialize(): Error at offset 65532 of 65535 bytes in /nas/content/live/ply/wp-content/plugins/woocommerce-quickbooks/QuickBooks/WebConnector/Handlers.php on line 756
[Wed Oct 26 23:38:37.273773 2016] [:error] [pid 466] [client ] PHP Notice: wpdb::prepare was called <strong>incorrectly</strong>. The query argument of wpdb::prepare() must have a placeholder. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.9.0.) in /nas/content/live/ply/wp-includes/functions.php on line 3996, referer: https://my-site.com/wp-admin/admin.php?page=quickbooks_setup&tab=sod_qbconnector_setup

And finally the code on line 756 on Handlers.php:

    $extra = '';
                    if ($next['extra'])
                    {
//Line 756 below
                        $extra = unserialize($next['extra']);
                    }

As always any help at all is greatly appreciated. I am not unfamiliar to PHP but I am completely a noob when it comes to this specifically. Please let me know if any other information is needed.

Thank You.

Cheers,

Sean

  • 写回答

1条回答 默认 最新

  • doufeng3602 2016-10-27 01:58
    关注

    I also found This Github repository Which seems to be very similar to the plugin. Written by the same author.

    It's actually not written by the same author (source: I'm the author).

    I built the core library. They took it (it's open source, so that's cool) and then wrote a lot of their own "glue" code to integrate QuickBooks with WooCommerce.

    Then it proceeds to Say "SendRequestXML failed". Error message: Response is not well-formed XML.

    Anytime you see this, it means there's something wrong with the PHP "glue" code.

    WooCommerce is doing something bad/incorrect in their code.

    Did you contact WooCommerce support and tell them their integration with QuickBooks is broken? You should.

    This:

    [Wed Oct 26 23:35:09.153751 2016] [:error] [pid 312] [client ] PHP Notice: unserialize(): Error at offset 65532 of 65535 bytes in /nas/content/live/ply/wp-content/plugins/woocommerce-quickbooks/QuickBooks/WebConnector/Handlers.php on line 756

    Is a really good clue! Go you for debugging like this, that's awesome!

    65535 bytes is the maximum size of a MySQL text column. If you look in your database, I bet that WooCommerce is building extremely large XML documents (exactly what they should NOT be doing) and trying to store them in MySQL (probably in the quickbooks_queue SQL table).

    They should not be doing this. If they are storing XML in the quickbooks_queue table, then they are doing things wrong.

    You might be able to temporarily fix your issue by changing the SQL quickbooks_queue.extra column to a longtext type. It's a terrible hack to get around WooCommerce's broken implementation, but it might work/be worth a try.

    Failing that, your first step should be to talk to WooCommerce support. Tell them to reach out to me if they need help -- I'd be happy to help! I talk to people all the time that suffer from their broken implementation, and would be happy to help them improve it!

    评论

报告相同问题?

悬赏问题

  • ¥15 gg加速器加速游戏时,提示不是x86架构
  • ¥15 python按要求编写程序
  • ¥15 Python输入字符串转化为列表排序具体见图,严格按照输入
  • ¥20 XP系统在重新启动后进不去桌面,一直黑屏。
  • ¥15 opencv图像处理,需要四个处理结果图
  • ¥15 无线移动边缘计算系统中的系统模型
  • ¥15 深度学习中的画图问题
  • ¥15 java报错:使用mybatis plus查询一个只返回一条数据的sql,却报错返回了1000多条
  • ¥15 Python报错怎么解决
  • ¥15 simulink如何调用DLL文件