Php Kashflow集成-对象没有';使用CustomDeliveryAddress';创建发票时的属性

Php Kashflow集成-对象没有';使用CustomDeliveryAddress';创建发票时的属性,php,soap,Php,Soap,我对Kashflow还很陌生,但我正在尝试将它集成到我一直在开发的CRM中。目前,我正在尝试创建一个发票,然后使用InsertInvoice调用通过API将其推送到Kashflow 这是我用来创建测试发票的代码: $kashflow = new Kashflow($username,$password); // Initialise the invoice. $invoice = new KashflowInvoice($kashflow_customer_id,$invoice_numbe

我对Kashflow还很陌生,但我正在尝试将它集成到我一直在开发的CRM中。目前,我正在尝试创建一个发票,然后使用InsertInvoice调用通过API将其推送到Kashflow

这是我用来创建测试发票的代码:

$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()只需将条目添加到发票中,然后插入invoice()方法如下:

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

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

     return $this->makeRequest("InsertInvoice",$parameters);
}
其中所有“参数”都是来自Kashflow的必需参数

当我运行脚本时,我得到以下异常输出:

未处理的异常:SOAP-ERROR:编码:对象没有 “UseCustomDeliveryAddress”属性

我的类或文件中没有名为UseCustomedLiveryAddress的属性,也找不到Kashflow API文档中记录的属性-这让我想知道它是否已被弃用,但仍在某个地方被引用

还有其他人遇到这个问题并设法解决了吗

提前谢谢
迈克尔

好吧,我想出来了。基本上,我使用的示例需要将UseCustomDeliveryAddress传递给API,而不管它是真是假

引用自