nfse-nacional/nfse-php ? reverse-engineered prompt

Reverse engineered prompt

Build me a PHP SDK for integrating with NFS e Nacional, using a certificate file and environment choice like homologation or production.

I want it to let me create a context once, then work with two main flows, one for companies that issue invoices and one for city halls or tax offices. For the company side, I need to send a DPS, issue an NFS e, check an invoice by access key, download documents, get the DANFSE PDF, register events like cancellation, and consult agreement parameters. For the municipality side, I need to download documents, look up a taxpayer, and consult parameters and tax rates.

Please make it handle the XML and data objects cleanly, and include a few working examples I can copy and run. If some endpoint details vary by city, make that easy to configure, and look up current docs online if you need to.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab