Download the PHP package oxygensuite/aade-mydata-oxygen without Composer
On this page you can find all versions of the php package oxygensuite/aade-mydata-oxygen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oxygensuite/aade-mydata-oxygen
More information about oxygensuite/aade-mydata-oxygen
Files in oxygensuite/aade-mydata-oxygen
Package aade-mydata-oxygen
Short Description Routes firebed/aade-mydata SendInvoices and CancelInvoice through the Oxygen e-invoicing provider (mydataprovider v2 API).
License MIT
Informations about the package aade-mydata-oxygen
Oxygen Provider bridge for firebed/aade-mydata
Routes SendInvoices, CancelInvoice and SendPaymentsMethod from
firebed/aade-mydata through the Oxygen
e-invoicing provider, with no changes to the code that builds and sends your invoices.
Every other request keeps talking to ΑΑΔΕ directly.
Requirements
- PHP ^8.2
firebed/aade-mydata^5.11- A company API token from the Oxygen provider. For sandbox and production API keys, contact [email protected].
Setup
The provider environment follows MyDataRequest's: prod is the live API, anything else the
sandbox. Force one with register(token: '…', env: 'dev'); go back to ΑΑΔΕ with unregister().
Your ΑΑΔΕ credentials are never sent to the provider.
What is routed
| Package call | What happens |
|---|---|
SendInvoices::handle() |
each invoice is issued through the provider, in order |
CancelInvoice::handle($mark) |
the invoice with that mark is cancelled at the provider |
SendPaymentsMethod::handle() |
each PaymentMethod is recorded at the provider against its invoice mark |
| everything else | ΑΑΔΕ, unchanged |
Correlated and connected marks are sent as they are; the provider links its own documents and forwards the rest to myDATA. Only 9.3 delivery notes and 10.1 / 10.2 receiving notes can be cancelled; anything else needs a credit note.
Results
You get the usual ResponseDoc, one Response per invoice, in order.
| Provider answer | statusCode |
Notes |
|---|---|---|
| 201 | Success |
getInvoiceUid(), getInvoiceMark(), getAuthenticationCode(), getQrUrl() |
| 202 | Success |
issued and queued for retransmission: getInvoiceMark() is null, fetch it later |
| 422 / 403 / 404 | ValidationError |
myDATA codes are relayed; provider messages carry the HTTP status as code |
| 423 / 429 / 5xx, unreachable | TechnicalError |
code = HTTP status, 0 (connection) or 28 (timeout) |
| 401 | — | throws MyDataAuthenticationException |
Bridge codes: 9001 the provider does not hold the invoice to cancel or pay (retry once if it
was transmitted a second ago), 9002 unreadable provider response, 9003 the invoice has no
issue time. A batch never stops midway, and re-sending an invoice the provider already holds
returns its stored mark.
What the provider needs that myDATA does not have
These stay on the models and never reach the myDATA XML:
Values are forwarded exactly as set; nothing is computed or filled in for you. The issue date
and time are read as Athens local time and sent with their offset; the provider accepts any
timezone, but the instant must not be in the future and must fall on today's date in Athens,
unless transmissionFailure is ERP_CONNECTION_FAILURE.
POS payments
A card payment needs the provider's own signature. Ask for it, put it on the payment, send:
To pay an invoice that was already transmitted, set its mark on the invoice before signing
and send the payment with SendPaymentsMethod. A signature is single use and cannot be
renewed; signatures()->pending() lists the unused ones, find($id) and cancel($id) manage
them. The provider refuses with SignatureException (getCode() is the HTTP status,
$e->errors the field messages).
Limitations
- Not forwarded:
ProvidersSignature.SigningAuthorandtidon the document (the provider fills them in),ECRToken,EndToEndReferenceID,discountOption,invoiceVariationType,toWeighandpackingsDeclarations. - Documents transmitted through the ERP channel before the switch can be correlated but not cancelled or paid through the provider.
Development
All versions of aade-mydata-oxygen with dependencies
composer-runtime-api Version ^2.0
ext-dom Version *
ext-json Version *
firebed/aade-mydata Version ^5.11
guzzlehttp/guzzle Version ^7.0