Im trying to create invoice in xero through this library webfox/xero-php-oauth2 and getting this error
XeroAPI \ XeroPHP \ ApiException (500) [500] Server error: `PUT https://api.xero.com/api.xro/2.0/Invoices?summarizeErrors=false&unitdp=2` resulted in a `500 Internal Server Error` response: {"Title":"An error occurred","Detail":"An error occurred in Xero. Check the API Status page http://status.developer.xero (truncated...)
invoice Creating Code
$apiInstance = resolve(\XeroAPI\XeroPHP\Api\AccountingApi::class);
$invoice = new \XeroAPI\XeroPHP\Models\Accounting\Invoice;
$invoice->setType('APOVERPAYMENT')
->setContact('52f09f84-2078-49cc-8a62-6e27602ccb55')
->setDate('2020-07-01')
->setDueDate('2020-07-08');
$invoices= new \XeroAPI\XeroPHP\Models\Accounting\Invoices;
$invoices->setInvoices($invoice);
$apiInstance->createInvoices($xeroCredentials->getTenantId(),$invoices,false,2);
I make sure that my app is connected with xero . also clear my cache . but still getting this error. tried to search from other platform but didn't get satisfactory answer.
I made mistake while creating invoice . i was missing required parameters for invoice. $contact array and $lineItem array are necessary to pass in order to create invoice
Im trying to create invoice in xero through this library webfox/xero-php-oauth2 and getting this error
invoice Creating Code
I make sure that my app is connected with xero . also clear my cache . but still getting this error. tried to search from other platform but didn't get satisfactory answer.