• Hi there

    Would you be able to help me use the plugin to get Gravity forms to submit some field data to the API call I have been given ? – I am a bit lost

    ————–

    /Send to Easy Call Now API
    function send_to_easy_call($info){
    	$Debug = false;
    	$API_URL = 'api.dxi.eu';
    	$API_USER = '';
    	$API_PASS = '';
    
    	$Token = get_auth_token($API_URL, $API_USER, $API_PASS, $Debug);
    	if (empty($Token)) die("Unable to obtain a token\n");
    	//if ($Debug) echo "Token: $Token\n";
    
    	if ($Debug) {echo '<br>';print_r($info);echo '<br>';}
    
    	$xml  = "<?xml version='1.0' encoding='utf-8' ?>\n";
    
    	$xml .= '<easycall>';
    	$xml .= '<ecnow_data>';
    	$xml .= '<dataset>'.$info['dataset'].'</dataset>';
    	$xml .= '<campaign>iTalk</campaign>';
    	$xml .= '<URN>'.$info['mobilePhone'].'</URN>';
    	$xml .= '<ddi_home>'.$info['mobilePhone'].'</ddi_home>';
    	$xml .= '<Title>'.$info['title'].'</Title>';
    	$xml .= '<FirstName>'.$info['firstName'].'</FirstName>';
    	$xml .= '<LastName>'.$info['lastName'].'</LastName>';
    	$xml .= '<Postcode>'.$info['postCode'].'</Postcode>';
    	$xml .= '<From>https://www.italktelecom.co.uk/</From>';
    	$xml .= '<IP>217.45.187.210</IP>';
    	$xml .= '<Email>[email protected]</Email>';
    	$xml .= '</ecnow_data>';
    	$xml .= '</easycall>';
    
    	//var_dump($xml);
    
    	//Upload the data
    	upload_xml_data($xml, 'ecnow_data', 'create', $API_URL, $Token, $Debug);
    }

    https://www.ads-software.com/plugins/gravitate-gforms-api-helper/

  • The topic ‘help using API call’ is closed to new replies.