<?php
// Simple script to log incoming requests
require_once (__DIR__.'/crest.php');
// Assuming PLACEMENT_OPTIONS is part of the request data
if (isset($_REQUEST['PLACEMENT_OPTIONS'])) {
    $dealPlacement = json_decode($_REQUEST['PLACEMENT_OPTIONS'], true);
    //print_r($dealPlacement);
    // Access the ID key
    //echo "Deal ID is: " . $dealPlacement['ID'];
    $dealId = $dealPlacement['ID'];
     $result = CRest::call('crm.deal.get', ['ID' => $dealId]);
     echo "<pre>";
    print_r($result);
     echo "</pre>";
} else {
    echo "PLACEMENT_OPTIONS not found in the request.";
}
?>