PHP with certificate of type A1

1

I have the following question: I bought the certificate of type A1 to issue electronic invoices in the city hall here in Florianopolis. I already integrated my entire system with the City Hall API and the way to generate NFe is very simple: I perform a POST containing an XML and the City Hall will generate the NFe.

My question is this: at the end of the XML file there are several lines that I need to fill in the format below. How do I generate these lines using PHP and the certificate of type A1? I searched a lot on the internet and did not figure out how to generate this final part of the XML file.

For example, at the end of the XML file I have to fill in a field like this:

<ds:Reference Id="RefElement-3.496850484729869E7" URI="">

How do I set the value of RefElement?

In another part of XML I need to fill in this line:

<ds:DigestValue>KsPAoHg2H0y/wSrrOGRihebcE/g=</ds:DigestValue>

How do I generate this value from my digital certificate A1?

    
asked by anonymous 31.01.2018 / 16:11

1 answer

0

I use the NFePHP API to perform invoices, but I have never developed a service note, which is the one that uses the WebServices of City Halls.

Follow the project link and have a look there. link

And if you are in doubt there is a group on google about this tool, the staff always helps a lot, link

on YouTube you have a video that explains how to use the tool, it helped me a lot when I started (it's a bit long but worth it). link

I hope it helps you;

    
01.02.2018 / 18:03