【问题标题】:Consolibyte QuickBooks PHP Library - How Do You Pass Parameters To Queued Functions?Consolibyte QuickBooks PHP 库 - 如何将参数传递给队列函数?
【发布时间】:2019-06-19 17:55:37
【问题描述】:

我希望使用 Consolibyte PHP 库将客户添加到我的 QB 安装中。我知道我需要使用以下命令来初始化和排队我的请求:

$Queue = new QuickBooks_WebConnector_Queue('mysql://root:password@localhost/my_database');  
$Queue->enqueue(QUICKBOOKS_ADD_CUSTOMER, $id_value);

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

【问题讨论】:

    标签: quickbooks qbxml qbfc


    【解决方案1】:

    这是函数定义:

    ->enqueue($action, $ident = null, $priority = 0, $extra = null, $user = null, $qbxml = null, $replace = true)
    

    从这里开始:

    文档:

    * @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
    

    【讨论】:

      猜你喜欢
      • 2022-01-07
      • 2014-08-23
      • 1970-01-01
      • 1970-01-01
      • 2011-09-24
      • 2020-07-22
      • 2015-10-30
      • 1970-01-01
      相关资源
      最近更新 更多