greenter/xmldsig
PHP library for signing SUNAT electronic invoices in Peru. Load a PEM certificate and sign XML files or strings, adding the required ds:Signature block with transforms, digest and RSA signature to your comprobantes.
greenter/xmldsig is a PHP library for digitally signing Peruvian electronic invoices (comprobantes electrónicos) according to SUNAT regulations. It applies XMLDSig to embed an enveloped ds:Signature element directly into your XML document, producing a valid signed file ready for submission.
A PEM certificate (private key + certificate) is required; the project links a guide for converting .PFX files to PEM. The API is minimal: load the certificate, then sign a string or a file.
signXml() and signFromFile()setCertificateFromFile) or an inline string (setCertificate)composer require greenter/xmldsigHow can I help you explore Laravel packages today?