简体   繁体   English

QuickBooks PHP API创建发票,邮件不起作用

[英]QuickBooks PHP API Creating Invoice, mail not working

have a problem with QB PHP api, when creating Invoices I can not set the email address. QB PHP api有问题,创建发票时我无法设置电子邮件地址。 Here is the code; 这是代码;

$InvoiceService = new QuickBooks_IPP_Service_Invoice();
$Invoice = new QuickBooks_IPP_Object_Invoice();
$Invoice->setDocNumber($sale->ID);
$Invoice->setDueDate($sale->duedate);
$Invoice->setCustomerRef($customer->qbID);
$Invoice->setBillEmail("at@at.com");

setBillEmail should work, but can not understand why it is not working. setBillEmail应该可以工作,但是不明白为什么它不能工作。

The QuickBooks PHP libs exactly mirror the Intuit schema. QuickBooks PHP库完全反映了Intuit模式。 That means that when you see a nested object in the schema like this: 这意味着当您在模式中看到嵌套对象时,如下所示:

 "BillEmail": {
     "Address": "Familiystore@intuit.com"
 },

You need a nested object in your PHP code too: 您还需要在PHP代码中嵌套一个对象:

$BillEmail = new QuickBooks_IPP_Object_BillEmail();
$BillEmail->setAddress('you@youremail.com');
$Invoice->setBillEmail($BillEmail);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM