-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreatepdf.php
32 lines (29 loc) · 904 Bytes
/
createpdf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
if (!isset($_COOKIE["ambient"])) {
exit;
}
include '../../../wp-load.php';
require_once( __DIR__ . "/libwebpay/tcpdf/reportPDFlog.php");
require_once( __DIR__ . "/libwebpay/healthcheck.php");
ob_clean();
$ecommerce = 'woocommerce';
$arg = array('MODO' => $_COOKIE["ambient"],
'COMMERCE_CODE' => $_COOKIE["storeID"],
'PUBLIC_CERT' => $_COOKIE["certificate"],
'PRIVATE_KEY' => $_COOKIE["secretCode"],
'WEBPAY_CERT' => $_COOKIE["certificateTransbank"],
'ECOMMERCE' => $ecommerce);
$document = $_POST["document"];
$healthcheck = new HealthCheck($arg);
$json =$healthcheck->printFullResume();
$rl = new reportPDFlog($ecommerce, $document);
$temp = json_decode($json);
if ($document == "report"){
unset($temp->php_info);
}
else
{
$temp = array('php_info' => $temp->php_info);
}
$json = json_encode($temp);
$rl->getReport($json);