{"id":36253233,"url":"https://github.com/taocomp/php-sdicoop-client","last_synced_at":"2026-01-11T07:02:54.745Z","repository":{"id":39578523,"uuid":"161515594","full_name":"taocomp/php-sdicoop-client","owner":"taocomp","description":"A PHP package for connecting to Italian Exchange System (aka SdI) web services. (Pacchetto PHP per inviare fatture e notifiche ai webservices del SdI).","archived":false,"fork":false,"pushed_at":"2022-06-24T15:55:45.000Z","size":1154,"stargazers_count":21,"open_issues_count":3,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-01T20:25:12.469Z","etag":null,"topics":["client","e-invoice","einvoice","fattura","fattura-elettronica","fattura-pa","fatturazione-elettronica","invoice","italy","open-source","opensource","php","sdi","sdicoop","soap"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taocomp.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-12T16:31:03.000Z","updated_at":"2023-07-14T14:09:34.000Z","dependencies_parsed_at":"2022-08-09T15:02:56.063Z","dependency_job_id":null,"html_url":"https://github.com/taocomp/php-sdicoop-client","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/taocomp/php-sdicoop-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taocomp%2Fphp-sdicoop-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taocomp%2Fphp-sdicoop-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taocomp%2Fphp-sdicoop-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taocomp%2Fphp-sdicoop-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taocomp","download_url":"https://codeload.github.com/taocomp/php-sdicoop-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taocomp%2Fphp-sdicoop-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28296941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","e-invoice","einvoice","fattura","fattura-elettronica","fattura-pa","fatturazione-elettronica","invoice","italy","open-source","opensource","php","sdi","sdicoop","soap"],"created_at":"2026-01-11T07:02:54.665Z","updated_at":"2026-01-11T07:02:54.731Z","avatar_url":"https://github.com/taocomp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: PHP SdICoop - Client\n\nA PHP package for connecting to [[https://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm?l=en][Italian Exchange System (aka \"SdI\")]] web services.\n\n/(Pacchetto PHP per inviare fatture e notifiche ai webservices del SdI)./\n\nPlease refer to\n- [[https://github.com/taocomp/php-sdicoop-server][PHP SdICoop - Server]] to implement your web services required by SdI\n- [[https://github.com/taocomp/php-e-invoice-it][PHP E-invoice It]] for managing italian e-invoice and notice XML formats\n\nSee [[https://forum.italia.it/c/fattura-pa][Forum Italia - Fatturazione Elettronica]] for server configuration, interoperability tests, etc. In particular:\n- Apache configuration :: [[https://forum.italia.it/t/accreditamento-sdicoop-configurazione-ssl-su-apache/3314][Accreditamento SDICoop: configurazione SSL su Apache - Fatturazione Elettroni...]]\n- Interoperability tests :: [[https://forum.italia.it/t/test-interoperabilita-soluzioni/4370][Test Interoperabilità Soluzioni - Fatturazione Elettronica - Forum Italia]]\n\n* Getting started\n** Dependencies\n- PHP \u003e=5.5\n- ~php-curl~\n- ~php-soap~\n** Install\n*** Composer\n#+BEGIN_SRC\ncomposer require taocomp/php-sdicoop-client\n#+END_SRC\n\n*** Manually\n- Clone/download the repository\n- ~require_once('/path/to/php-sdicoop-client/vendor/autoload.php');~\n\n*** Namespaces\nPlease note namespace is changed (v0.1.5), it is now ~Taocomp\\Einvoicing\\SdicoopClient~.\n\nSo to use e.g. ~Client~ class:\n#+BEGIN_SRC\nuse \\Taocomp\\Einvoicing\\SdicoopClient\\Client;\n#+END_SRC\n\n** Setup\nAccording to Italian Exchange System (aka SdI), you need:\n- a client key\n- a client certificate\n- a CA certificate\nto send invoices and notices to SdI web services.\n\nAdditionally you must provide an endpoint to connect to and the correspondent WSDL for each web service.\n\nYou can configure key and certs as follow:\n#+BEGIN_SRC\nClient::setPrivateKey('/path/to/client.key');\nClient::setClientCert('/path/to/client.pem');\nClient::setCaCert('/path/to/ca.pem');\n#+END_SRC\n\nYou can also configure a proxy if needed:\n#+BEGIN_SRC\nClient::setProxyUrl('proxy_url');\nClient::setProxyAuth('username:password');\n#+END_SRC\n\nAnd then you can instantiate the client by providing endpoint/WSDL.\n\nWeb service ~SdIRiceviFile~ (test) for sending invoices:\n#+BEGIN_SRC\n$client = new Client(array(\n    'endpoint' =\u003e 'https://testservizi.fatturapa.it/ricevi_file',\n    'wsdl'     =\u003e '/path/to/php-sdicoop-client/assets/wsdl/SdIRiceviFile_v1.0.wsdl'\n));\n#+END_SRC\n\nWeb service ~SdIRiceviNotifica~ (test) for sending notices:\n#+BEGIN_SRC\n$client = new Client(array(\n    'endpoint' =\u003e 'https://testservizi.fatturapa.it/ricevi_notifica',\n    'wsdl'     =\u003e '/path/to/php-sdicoop-client/assets/wsdl/SdIRiceviNotifica_v1.0.wsdl'\n));\n#+END_SRC\n\nOr you can pass all parameters (key, certs, wsdl, endpoint) to client constructor:\n#+BEGIN_SRC\n$client = new Client(array(\n    'key'      =\u003e '/path/to/client.key',\n    'cert'     =\u003e '/path/to/client.pem',\n    'ca_cert'  =\u003e '/path/to/ca.pem',\n    'endpoint' =\u003e 'https://testservizi.fatturapa.it/ricevi_file',\n    'wsdl'     =\u003e '/path/to/php-sdicoop-client/assets/wsdl/SdIRiceviFile_v1.0.wsdl'\n));\n#+END_SRC\n\n** Send invoices to SdI (web service \"SdIRiceviFile\")\n#+BEGIN_SRC\n$fileSdI = new FileSdIBase();\n$fileSdI-\u003eload('/path/to/invoice.xml');\n$response = new RispostaSdIRiceviFile($client-\u003eRiceviFile($fileSdI));\n\n// Process response:\n// -----------------------------------------\n// $id       = $response-\u003eIdentificativoSdI;\n// $datetime = $response-\u003eDataOraRicezione;\n// $error    = $response-\u003eErrore;\n// -----------------------------------------\n#+END_SRC\n\nSee ~examples/invoice.php~ for a working example.\n\nYou can also send ~\\Taocomp\\Einvoicing\\FatturaElettronica~ objects: see [[https://github.com/taocomp/php-e-invoice-it][https://github.com/taocomp/php-e-invoice-it]].\n\n** Send notices to SdI (web service \"SdIRiceviNotifica\", endpoint test)\n#+BEGIN_SRC\n$fileSdI = new FileSdI();\n$fileSdI-\u003eload('/path/to/notice.xml');\n$response = new RispostaSdINotificaEsito($client-\u003eNotificaEsito($fileSdI));\n\n// Process response:\n// ----------------------------------\n// $result          = $response-\u003eEsito;\n// $discard         = $response-\u003eScartoEsito;\n// $discardFilename = $discard-\u003eNomeFile;\n// $discardFile     = $discard-\u003eFile;\n// ----------------------------------\n#+END_SRC\n\nSee ~examples/notice.php~ for a working example.\n\nYou can also send ~\\Taocomp\\Einvoicing\\EsitoCommittente~ objects: see [[https://github.com/taocomp/php-e-invoice-it][https://github.com/taocomp/php-e-invoice-it]].\n\n* Credits\nWe want to thank all contributors of [[https://forum.italia.it/c/fattura-pa][Forum Italia - Fatturazione Elettronica]] who have shared their snippets and any available info.\n\nThanks to Luca Cristofalo for testing the code on his old PHP 5.5.38. :-)\n\n* License\nGPLv3.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaocomp%2Fphp-sdicoop-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaocomp%2Fphp-sdicoop-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaocomp%2Fphp-sdicoop-client/lists"}