<?php

/*
 STORE THE WALLET NOTIFICATION IN A DATABASE

 Usefull to use as a notification URL in BO WALLET
*/

header("Access-Control-Allow-Origin: *");

require("../shared/functions.php");

$db = connecti('mvalezy');
    
$notification    = $db->real_escape_string($_POST['xml']);

if(!$notification) {
    $notification = implode(',\n', $_POST);
}

$query_ins = "INSERT INTO NotificationsWallet SET content = '$notification'";
$sql = $db->query($query_ins);

echo "OK";

?>