Skip to content

Commit

Permalink
fix return xml from signed xml. close #1
Browse files Browse the repository at this point in the history
  • Loading branch information
giansalex committed Mar 11, 2018
1 parent c3850dd commit b44e9dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Sunat/SignedXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class SignedXml
public function signXml($content)
{
$doc = $this->getDocXml($content);

$this->sign($doc);

return $doc->saveXML();
}

Expand Down Expand Up @@ -152,15 +152,15 @@ public function sign(DOMDocument $data)
/**
* Sign from file.
* @param string $filename
* @return string
*/
public function signFromFile($filename)
{
if (!file_exists($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));
}

/**
Expand Down

0 comments on commit b44e9dd

Please sign in to comment.