This repository contains a Laravel package that can be used to control the test environment for the Exchange System (ES, Italian: SDI) for Electronic Invoices, via a Remote Procedure Call (RPC) API over the HTTP protocol.
Use cases:
- perform manual simulations
- run automated tests
- display status information in User Interfaces.
To perform the actual operations, it relies on fatturapa-core, a composer package with the core classes required to interact with the Exchange System.
For more details, refer to fatturapa-testsdi, the test environment for the Italian B2B invoice system.
-
general simulation control:
POST /clear
: resets the stateGET /datetime
: retrieves current simulated date and timePOST /timestamp/ timetamp: 2018-09-15T23:59Z
: tweak the timestamp of all following eventsPOST /speed/10
: set factor for simulated time to wallclock time
-
notifications:
GET /notifications/id
: retrieves notification with idPOST /dispatch
: attempt dispatching for all N_PENDING notifications, on success makes the notification N_DELIVERED
-
invoices:
GET /invoices?status=R_ACCEPTED
: retrieves array of ids in R_ACCEPTED statusGET /invoices/id
: retrieves invoice with id
-
issuer-specific:
POST /upload {file XML}
callIssuer::upload(XML)
POST /transmit
: callIssuer::transmit
-
exchange-specific
POST /checkValidity
: callExchange::checkValidity
POST /deliver
: callExchange::deliver
POST /checkExpiration
: callExchange::checkExpiration
GET /actors
: callsBase::getActors
GET /issuers
: callsBase::getIssuers
-
recipient-specific
POST /accept {invoices}
: callRecipient::accept(invoices)
POST /refuse {invoices}
: callRecipient::refuse(invoices)
// get list of actors
GET sdi/rpc/actors
// reset state for all actors
POST sdi/rpc/clear
POST td0000001/rpc/clear
POST td0000002/rpc/clear
// upload invoice to issuer
POST td0000001/rpc/upload {name: 'File', contents: '<xml></xml>', filename: 'aaa.xml'}
// force issuer to attempt transmission to ES
POST td0000001/rpc/transmit
// force ES to check validity of received invoices
POST sdi/rpc/checkValidity
// force ES to deliver the invoice to the recipient
POST sdi/rpc/deliver
// force ES to notify back to the issuer the delivery
POST sdi/rpc/dispatch
For your contributions please use the git-flow workflow.
Emanuele Aina, Paolo Greppi
Copyright (c) 2018, simevo s.r.l.
License: AGPL 3, see LICENSE file.