5

私は小規模なローカル ビジネス向けの e コマース ソリューションを考案する任務を負っています。私のクライアントは、Intuit/Quickbooks POS ソフトウェアを使用しています。Intuit には、相互運用性を可能にする一連の PHP 5+ クラスがあることを発見しました (これにつまずく可能性のある他の人へのリンク: https://code.intuit.com/sf/sfmain/do/viewProject/projects.php_devkit)。

Web サイトは共有ホスティングでホストされるため、2 つのシステムは文字通り分割されます。彼女のデスクトップはインターネットにアクセスできます。

だから、私の質問:

  1. 彼女のデスクトップにカール経由で接続する方法はありますか?
  2. もしそうなら、ホストで VPN を作成できない場合に安全に行う方法はありますか?
  3. そういえば、利用できるVPNサービスはありますか?
  4. 他に注意すべきセキュリティ事項はありますか?

支払い処理は、Stripe ( http://www.stripe.com ) を通じて処理されます。これは、在庫/注文の同期のためだけのものです。

4

1 に答える 1

6

Your best bet is the QuickBooks Web Connector, along with that set of PHP classes you mentioned. See my specific comments below:

I've just discovered that Intuit has a series of PHP 5+ classes that allow interoperability (link for anyone else that may stumble on this: https://code.intuit.com/sf/sfmain/do/viewProject/projects.php_devkit).

It's worth noting that that library is NOT developed by Intuit (disclaimer - I'm the developer of that library). Intuit hosts our Subversion repository, but we're a separate company, and Intuit does not contribute to the actual PHP code. Intuit provides a Windows COM-based API only, we provide the actual PHP components so you can talk to QuickBooks from a remote server via the Web Connector, without the need to muck with COM.

We have a ton of information on our QuickBooks integration wiki which might be helpful - specifically the QuickBooks integration with PHP section and this overview of the QuickBooks Web Connector.

Consider grabbing the latest nightly build from the link you posted, and taking a look at this file: * docs/example_web_connector_point_of_sale.php

It illustrates exchanging data between PHP and QuickBooks Point of Sale.

The website will be hosted on shared hosting, so the two systems are split quite literally. Her desktop does have internet access.

This ^^^ is just fine, and a typical scenario. It's exactly what the Web Connector was designed for. The Web Connector essentially acts as a "dumb proxy" between a PHP SOAP service, and QuickBooks itself - it relays messages from your PHP app, over HTTP(S), to QuickBooks.

Is there a way for me to connect to her desktop via curl?

Not with Curl, no (though you could build one... but why reinvent the wheel?). The Web Connector is SOAP based, but your PHP components will be the SOAP server half, not the SOAP client half.

If so, is there a way for me to do it securely if I can't create a VPN on my host?

The Web Connector can use SSL via HTTPS to keep the data secure while in transit across the net.

Now that I think about it, is there a VPN service I could use?

Just buy an SSL certificate, it's easier. :-)

Any other security things I should be aware of?

Not beyond the typical web application security guidelines that you could find elsewhere on Stackoverflow.

If you're going to sync to a system like Quickbooks, don't do it real-time, do it in a batch process that is resilient to things like her desktop being turned off, the crappy office internet (compared to a datacenter) being slow or down, etc.

This ^^^ is great advice, and is exactly how the Web Connector works.

If you need real-time, Quickbooks running on a desktop is NOT the way to go.

In fact, if you need real-time, QuickBooks period is not the way to go. QuickBooks is a great small to medium business accounting software... but is slow and not reliable enough for consistent real-time communication. With that said... what you're talking about does not require real-time communication, so this shouldn't bother you.

Batching the orders isn't a problem, but how would I make even a batch process resilient?

The PHP code uses a queue with a status, so you can track what got processed, what didn't, what you got back from QuickBooks as a response ("Added a customer successfully!" vs. "Ooops, failed to add a customer because ..."), what error messages QuickBooks threw, etc. and then react appropriately with your code, or manually.

You won't need cron - the Web Connector can be scheduled to run, and it'll relay all errors and a ton of other information back to you so that you can handle errors, send out warnings, build reports to show to people about what failed/succeeded, etc.

于 2012-10-11T12:33:47.983 に答える