requestIsJson()) { $requestData = file_get_contents('php://input'); $requestData = json_decode($requestData, true); if (array_key_exists('gatewayData', $requestData)) { $gatewayData = give_clean($requestData['gatewayData']); } } return $gatewayData; } /** * This checks the server content type for 'application/json' to determine if it is a json request. * * @since 3.0.0 */ protected function requestIsJson(): bool { return isset($_SERVER['CONTENT_TYPE']) && str_contains($_SERVER['CONTENT_TYPE'], 'application/json'); } }