从 Quickbooks 数据库中获取所有账单支付支票

问题描述:

我想从 quickbooks 数据库中获取所有账单支付支票.我正在使用 PHP Quickbooks 开发工具包 2.0.我创建了一个这样的请求查询,但网络连接器显示错误.

I want to fetch all the bill payment checks from quickbooks database. Iam using PHP Quickbooks dev kit 2.0. I created a request query like this, but web connector showing error.

  function _quickbooks_billpaymentcheck_query_request($requestID, $user,       $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale)
  {

 $xml = '<?xml version="1.0" encoding="utf-8"?>
     <?qbxml version="2.0"?>
     <QBXML>
        <QBXMLMsgsRq onError="stopOnError">
    <BillPaymentCheckQueryRq  requestID="' . $requestID . '">

               <FromModifiedDate>1990-01-01T00:00:00</FromModifiedDate>
                <OwnerID>0</OwnerID>
            </BillPaymentCheckQueryRq>  
        </QBXMLMsgsRq>
      </QBXML>';

  return $xml;
  }   

请求代码就像:-

       function _quickbooks_billpaymentcheck_query_response($requestID, $user,  $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents)
     {  
          $errnum = 0;
          $errmsg = '';
          $Parser = new QuickBooks_XML_Parser($xml);
        if ($Doc = $Parser->parse($errnum, $errmsg))
         {
           $Root = $Doc->getRoot();
          $List = $Root->getChildAt('QBXML/QBXMLMsgsRs/BillPaymentCheckRs');
             foreach($List->children() as $BillPaymentCheck)
               {
        $TxnID=$BillPaymentCheck->getChildDataAt('BillPaymentCheckRet  TxnID');



    }
       }

return true;

}

他们这段代码有什么问题吗??请帮忙??

Is their anything wrong with this code?? please help??

K...我明白了,在响应代码中

K... I got it , In the response code

$List = $Root->getChildAt('QBXML/QBXMLMsgsRs/BillPaymentCheckRs');

改为

$List = $Root->getChildAt('QBXML/QBXMLMsgsRs/BillPaymentCheckQueryRs');

效果很好...