From b44e9dd38128209b12647bc4f973d360887f9a3e Mon Sep 17 00:00:00 2001 From: giansalex Date: Sun, 11 Mar 2018 13:10:47 -0500 Subject: [PATCH] fix return xml from signed xml. close #1 --- src/Sunat/SignedXml.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sunat/SignedXml.php b/src/Sunat/SignedXml.php index 3d90120..f8ef344 100644 --- a/src/Sunat/SignedXml.php +++ b/src/Sunat/SignedXml.php @@ -66,8 +66,8 @@ class SignedXml public function signXml($content) { $doc = $this->getDocXml($content); - $this->sign($doc); + return $doc->saveXML(); } @@ -152,6 +152,7 @@ public function sign(DOMDocument $data) /** * Sign from file. * @param string $filename + * @return string */ public function signFromFile($filename) { @@ -159,8 +160,7 @@ public function signFromFile($filename) throw new \InvalidArgumentException('File to sign, not found'); } - $doc = $this->getDocXml(file_get_contents($filename)); - $this->sign($doc); + return $this->signXml(file_get_contents($filename)); } /**