2015-11-24 73 views
0

我對Kashflow非常陌生,但我正試圖將其集成到我一直在努力的CRM中。目前,我正在嘗試創建發票,然後使用InsertInvoice調用通過API將其推送到Kashflow。Kashflow集成 - 對象在創建發票時沒有「UseCustomDeliveryAddress」屬性

這是我使用來創建測試發票代碼:

$kashflow = new Kashflow($username,$password); 

// Initialise the invoice. 
$invoice = new KashflowInvoice($kashflow_customer_id,$invoice_number,$invoice_date,$due_date); 

// Add a line to the invoice: 1 unit, with a unit price of £10 @ 20% VAT. 

$invoice->addLine(1,10,2,20,$nominal_id,"Test invoice item"); 

// Now insert the invoice on Kashflow. 
$response = $kashflow->insertInvoice($invoice); 

addLine()只是增加了入門到發票,然後insertInvoice()方法如下:

public function insertInvoice(KashflowInvoice $invoice) 
{ 
    $lines = $this->prepareInvoiceLines($invoice->getLines()); 

    $parameters['Inv'] = array 
    (
      // parameters here... 
    ); 

    return $this->makeRequest("InsertInvoice",$parameters); 
} 

所有「參數」都是Kashflow所需的參數。

當我運行該腳本,我得到下面的異常輸出:

Unhandled exception: SOAP-ERROR: Encoding: object has no 'UseCustomDeliveryAddress' property

我沒有任何財產的任何地方在我的班級或文件名爲UseCustomeDeliveryAddress也可以找到它的Kashflow API文檔中記錄 - 這使得我想知道它是否被棄用,但它仍然被引用?

有沒有人提出過這個問題,並設法解決它?

在此先感謝 邁克爾

回答