接收webhook数据并在PHP中使用

I need help with a simple PHP, receive webhook data and run php. My php works correctly but doesn't get webhook data, maybe i used wrong code to capture it. I tried to capture [loc] data with (.$_POST['loc'].) or (.$var.) or (.$_GET['loc'].)

WEBHOOK POST DATA

Array
(
    [submission_id] => 4391491919028897
    [formID] => 4673665580
    [ip] => 203.63.121.491
    [id] => 26926177418929
    [loc] => -31.86450, 154.08260
    [typea] => BROWSER: Chrome
OS: MacOS
DEVICE: Desktop
LANGUAGE: en-US
TIMEZONE: GMT +10
)


PHP Code:
$_POST['submission_id'];
$_POST['formID'];
$_POST['ip'];
$_POST['id'];
$_POST['loc'];
$_POST['typea'];

PHP

  $products=json_decode($_POST['data'],true);
  $val = $_POST['loc'];
  $textString='';
     $jsonprod = $_POST['data'];
  $url = 'https://api.manychat.com/fb/sending/sendContent';

  $data_string = '{"subscriber_id":"617647418929",
  "data":{
     "version":"v2",
     "content": {
       "messages": [
      {
        "type":"text",
        "text":" test '.$_POST['loc'].'",
        "buttons": [
          {
            "type": "url",
            "caption": "Edit",
            "url": "https://test/cart.php?",
            "webview_size": "medium"
          }
        ]
      }
  ],
  "actions": [
    {
      "action": "set_field_value",
      "field_name": "address",
      "value": "test"
    }
    ]
     }
  }

Do like this:

print_r(json_decode($json_webhookdata, TRUE));