Zaktualizowano pliki konfiguracyjne oraz poprawiono logikę w klasie Tickets.
This commit is contained in:
24
.vscode/ftp-kr.sync.cache.json
vendored
24
.vscode/ftp-kr.sync.cache.json
vendored
@@ -10,15 +10,15 @@
|
||||
},
|
||||
"api.php": {
|
||||
"type": "-",
|
||||
"size": 10554,
|
||||
"size": 968,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
"modified": true
|
||||
},
|
||||
"autoload": {
|
||||
"class.Cron.php": {
|
||||
"type": "-",
|
||||
"size": 29610,
|
||||
"lmtime": 0,
|
||||
"size": 27,
|
||||
"lmtime": 1756895449615,
|
||||
"modified": false
|
||||
},
|
||||
"class.DbModel.php": {
|
||||
@@ -54,9 +54,9 @@
|
||||
"controls": {
|
||||
"class.Apanel.php": {
|
||||
"type": "-",
|
||||
"size": 4864,
|
||||
"size": 5166,
|
||||
"lmtime": 1746048812388,
|
||||
"modified": false
|
||||
"modified": true
|
||||
},
|
||||
"class.Cron.php": {
|
||||
"type": "-",
|
||||
@@ -84,8 +84,8 @@
|
||||
},
|
||||
"class.Users.php": {
|
||||
"type": "-",
|
||||
"size": 3819,
|
||||
"lmtime": 1746048812702,
|
||||
"size": 3949,
|
||||
"lmtime": 1756895574116,
|
||||
"modified": false
|
||||
},
|
||||
".htaccess": {
|
||||
@@ -104,8 +104,8 @@
|
||||
},
|
||||
"class.Cron.php": {
|
||||
"type": "-",
|
||||
"size": 25590,
|
||||
"lmtime": 1746048812954,
|
||||
"size": 45,
|
||||
"lmtime": 1756895770647,
|
||||
"modified": false
|
||||
},
|
||||
"class.Tickets.php": {
|
||||
@@ -136,8 +136,8 @@
|
||||
"view": {
|
||||
"class.Cron.php": {
|
||||
"type": "-",
|
||||
"size": 164,
|
||||
"lmtime": 0,
|
||||
"size": 46,
|
||||
"lmtime": 1756895555214,
|
||||
"modified": false
|
||||
},
|
||||
"class.Site.php": {
|
||||
|
||||
@@ -453,10 +453,14 @@ class Tickets
|
||||
$mdb->update('orders', ['payment_status' => 1], ['id' => $order['id']]);
|
||||
$mdb->update('orders', ['payment_date' => date('Y-m-d H:i:s')], ['id' => $order['id']]);
|
||||
|
||||
// file_put_contents( 'sandbox_przelewy24_response.txt', print_r( $_POST, true ) );
|
||||
// file_put_contents( 'sandbox_przelewy24_response.txt', print_r( $order, true ), FILE_APPEND );
|
||||
|
||||
//* Wystawienie faktury
|
||||
if ($order['invoice_status'] == 0)
|
||||
if ( $order['invoice_status'] == 0 )
|
||||
{
|
||||
if($order['vat'] == 0){
|
||||
if ( $order['vat'] == 0 )
|
||||
{
|
||||
$api = array();
|
||||
$api["api_id"] = "9fa7772af97ab35b6d8a1cd05ac9e1b5";
|
||||
$api["api_zadanie"] = "1";
|
||||
@@ -490,7 +494,7 @@ class Tickets
|
||||
}
|
||||
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, "https://www.fakturowo.pl/api");
|
||||
curl_setopt($curl, CURLOPT_URL, "https://konto.fakturowo.pl/api");
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 300);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
@@ -499,6 +503,7 @@ class Tickets
|
||||
curl_close($curl);
|
||||
|
||||
$result = explode("\n", $result);
|
||||
// file_put_contents( 'sandbox_przelewy24_response.txt', print_r( $result, true ), FILE_APPEND );
|
||||
if ($result[0] == 1)
|
||||
{
|
||||
$subject = "brzezovka.pl - zamówienie biletów 'paragon'";
|
||||
@@ -519,7 +524,7 @@ class Tickets
|
||||
echo "ERROR: " . $result[1];
|
||||
}
|
||||
}
|
||||
elseif ($order['vat'] == 1)
|
||||
elseif ( $order['vat'] == 1 )
|
||||
{
|
||||
$api = array();
|
||||
$api["api_id"] = "9fa7772af97ab35b6d8a1cd05ac9e1b5";
|
||||
@@ -551,7 +556,7 @@ class Tickets
|
||||
}
|
||||
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, "https://www.fakturowo.pl/api");
|
||||
curl_setopt($curl, CURLOPT_URL, "https://konto.fakturowo.pl/api");
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 300);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
@@ -560,6 +565,7 @@ class Tickets
|
||||
curl_close($curl);
|
||||
|
||||
$result = explode("\n", $result);
|
||||
// file_put_contents( 'sandbox_przelewy24_response.txt', print_r( $result, true ), FILE_APPEND );
|
||||
if ($result[0] == 1)
|
||||
{
|
||||
$subject = "brzezovka.pl - zamówienie biletów 'faktura'";
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
<?php
|
||||
if ( $_GET['debug'] == 'lower_price_ticket' )
|
||||
$_SESSION['lower_price_ticket'] = true;
|
||||
|
||||
$database['name'] = 'srv81099_brzez_ticket';
|
||||
$database['host'] = 'localhost';
|
||||
$database['user'] = 'srv81099_brzez_ticket';
|
||||
|
||||
@@ -35,6 +35,9 @@ if ($_SESSION['ip'] !== $_SERVER['REMOTE_ADDR']) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $_GET['debug'] == 'lower_price_ticket' )
|
||||
$_SESSION['lower_price_ticket'] = true;
|
||||
|
||||
\R::setup('mysql:host=' . $database['host'] . ';dbname=' . $database['name'], $database['user'], $database['password']);
|
||||
\R::ext('xdispense', function ($type) {
|
||||
return R::getRedBean() -> dispense($type);
|
||||
|
||||
Reference in New Issue
Block a user