CMXX - Webhooks and giftcards
This commit is contained in:
12
index.php
12
index.php
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user