For digestion and encryption, Java can perform these 2 steps by calling a single class (See listing 7). To do this, we first have to have a PrivateKey object (see listing 6), which is the representation of our private key granted by the SAT to sign the receipts we generate.
Listing 6. Function to obtain the private key.
Listing 7. Function to generate the digital stamp.
Now we only have to call the 2 previous functions to generate Uganda Mobile Database the digital stamp and assign the result to the Receipt object, this can be seen in listing 8.
Listing 8. Generation of the digital seal.
Stamping of CFDI
At this point, although we have already created and signed a receipt as indicated in Annex 20, it is still not valid since it does not contain a digital tax stamp. We must send our generated XML to a PAC, so that it can verify it and generate the digital tax stamp (TFD) that we must include within our XML in the complement node.
On the SAT website you can consult the list of authorized PACs that can offer us the stamping service. All of them implement a standard web service defined by the SAT and that performs the following:
Listing Function to generate the original string
-
- Posts: 117
- Joined: Thu Jan 16, 2025 8:32 am