1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Send UBL via storecove

This commit is contained in:
David Bomba 2024-07-18 08:53:19 +10:00
parent 014452e484
commit 5f0c08e7e9
2 changed files with 15 additions and 8 deletions

View File

@ -103,14 +103,17 @@ class Storecove {
$payload = [
"legalEntityId"=> 290868,
"idempotencyGuid"=> \Illuminate\Support\Str::uuid(),
"routing" => [
"eIdentifiers" => [],
"emails" => ["david@invoiceninja.com"]
],
"document"=> [
'documentType' => 'invoice',
"invoice" => [],
],
"rawDocumentData"=> [
"document" => base64_encode($document),
"parse" => true,
"parseStrategy"=> "ubl",
"rawDocumentData"=> [
"document" => base64_encode($document),
"parse" => true,
"parseStrategy"=> "ubl",
],
],
];

View File

@ -103,7 +103,12 @@ class StorecoveTest extends TestCase
public function testSendDocument()
{
$x = '<?xml version="1.0"?>
$x = '
<?xml version="1.0" encoding="utf-8"?>
<Invoice
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:ID>0061</cbc:ID>
<cbc:IssueDate>2024-07-15</cbc:IssueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
@ -221,7 +226,6 @@ class StorecoveTest extends TestCase
</cac:Price>
</cac:InvoiceLine>';
$sc = new \App\Services\EDocument\Gateway\Storecove\Storecove();
$sc->sendDocument($x);