PHP with type A1 certificate

Asked

Viewed 1,011 times

1

I have the following question: I bought the type A1 certificate to issue electronic tax notes at the city hall here in Florianopolis. I have 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 ready, the City Hall will generate Nfe.

My question is the following: at the end of the XML file there are several lines that I need to fill in the format below. How do I get these lines using PHP and the A1 certificate? I searched a lot on the internet and did not discover how that Gero this end 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 Refelement value?

Elsewhere in XML I need to fill this line:

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

How do I value this from my A1 digital certificate?

  • Take a look at this project and help: https://github.com/nfephp-org/sped-nfe .

  • thanks friend. I took a look at the methods but it is very confusing, has many technical terms even in the comments!

  • I understood, but in this line of certification there are not very simple things, they are advanced topics.

1 answer

0


I use the Nfephp API to carry out the issuance of tax notes, but I have never developed a service note, which is the one that uses the City Hall Webservices.

follows the project link of a glance there. https://github.com/nfephp-org

and if you are in doubt there is a group in google about this tool, the staff always helps a lot, https://groups.google.com/forum/#! forum/nfephp

youtube has a video that explains how to use the tool, helped me a lot when I started (it’s a little long but worth it). https://www.youtube.com/watch?v=v1rByVX1_FY

I hope it helps you;

  • originated friend the problem is that I just need to authenticate the note, ie generate her electronic signature and in nfephp gets very confused because it does much thing!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.