Skip to content

Commit

Permalink
Merge pull request #19 from josemmo/pruebas-travis
Browse files Browse the repository at this point in the history
Pruebas Travis
  • Loading branch information
josemmo authored Jan 15, 2018
2 parents a98f8da + 87d6ad6 commit 3a1cfeb
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/Facturae.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,6 @@ private function injectTimestamp($signedXml) {
shell_exec($cmd);
$tsq = file_get_contents($tmpTsqPath);

// Debug in case of Travis
if (getenv('CI')) echo "TRAVIS DEBUG (TSQ):\n" . base64_encode($tsq) . "\n";

// Clean up temporal files
unlink($tmpPayloadPath);
unlink($tmpTsqPath);
Expand All @@ -530,17 +527,9 @@ private function injectTimestamp($signedXml) {
$ch = curl_init();
curl_setopt_array($ch, $chOpts);
$tsr = curl_exec($ch);
if (($str === false) && getenv('CI')) {
echo "TRAVIS DEBUG (cURL error):\n" . curl_error($ch) . "\n";
}
if ($tsr === false) throw new \Exception('cURL error: ' . curl_error($ch));
curl_close($ch);

// Debug in case of Travis
if (getenv('CI')) {
var_dump($tsr);
echo "TRAVIS DEBUG (TSR):\n" . base64_encode($tsr) . "\n";
}

// Validate TSR
if (strlen($tsr) < 1000) throw new \Exception('The returned TSR is invalid');

Expand Down

0 comments on commit 3a1cfeb

Please sign in to comment.