首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Consoli字节QuickBooks PHP如何将参数传递给排队的函数?

Consoli字节QuickBooks PHP如何将参数传递给排队的函数?
EN

Stack Overflow用户
提问于 2019-06-19 17:55:37
回答 1查看 204关注 0票数 0

我希望使用Consoli字节PHP库将客户添加到我的QB安装中。我知道,我需要使用以下方法初始化和排队请求:

代码语言:javascript
复制
$Queue = new QuickBooks_WebConnector_Queue('mysql://root:password@localhost/my_database');  
$Queue->enqueue(QUICKBOOKS_ADD_CUSTOMER, $id_value);

在上面,当我对请求($id_value)进行排队时,我只是传递一个唯一的ID。查看_quickbooks_customer_add_request()方法,我看到该函数有9个参数。当我调用$Queue->enqueue()时这些参数是如何设置的

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-06-19 19:03:07

下面是函数定义:

代码语言:javascript
复制
->enqueue($action, $ident = null, $priority = 0, $extra = null, $user = null, $qbxml = null, $replace = true)

从这里:

文档:

代码语言:javascript
复制
* @param string $action     An action to be performed within QuickBooks (see the qbXML and QuickBooks SDK documentation, i.e.: "CustomerAdd", "InvoiceAdd", "CustomerMod", etc.)
* @param mixed $ident           A unique identifier (if required) for a record being operated on (i.e. if you're doing a "CustomerAdd", you'd probaly put a unique customer ID number here, so you're SOAP handler function knows which customer it is supposed to add)
* @param integer $priority      The priority of the update (higher priority actions will be pushed to QuickBooks before lower priority actions)
* @param array $extra           If you need to make additional bits of data available to your request/response functions, you can pass an array of extra data here
* @param string $user           The username of the QuickBooks Web Connector user this item should be queued for 
* @param boolean $replace       Whether or not to replace any other currently queued entries with the same action/ident
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56673392

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档