CMXX - Webhooks and giftcards

This commit is contained in:
“VeLiTi”
2025-02-19 12:11:44 +01:00
parent d85923c299
commit 0e9d133ff9
10 changed files with 358 additions and 335 deletions

View File

@@ -12,22 +12,22 @@ define('base_url', rtrim($base_url, '/') . '/');
// Initialize a new session
session_start();
// Include the configuration file, this contains settings you can change.
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
// Includes
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
include './custom/settings/config.php';
// Include functions and connect to the database using PDO MySQL
include 'functions.php';
// Include translation file
include './custom/translations/translations_'.strtoupper(language_code).'.php';
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
//LOGIN TO API
$data = json_encode(array("username" => "paul@veliti.nl", "password" => "test1234"), JSON_UNESCAPED_UNICODE);
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
$data = json_encode(array("clientID" => clientID, "clientsecret" => clientsecret), JSON_UNESCAPED_UNICODE);
$responses = ioAPIv2('/v2/authorization', $data,'');
//Decode Payload
if (!empty($responses)){$responses = json_decode($responses,true);}else{$responses = '400';}
$clientsecret = $responses['token'];
// Connect to MySQL database
$pdo = pdo_connect_mysql();
// Output error variable
$error = '';
//error reporting