2016-12-20 2 views
0

여러분이 도와 주실 수 있는지 궁금합니다. 중력 양식을 Eloqua CRM과 통합하려고합니다. 나는 'Third Party Integration'플러그인을 시험해 보았고, functions.php 파일에 submission 함수를 추가했다. 그러나, 나는 이것을 작동시킬 수 없었다. 내 코드는 아래와 같습니다. 나는 'eloqua'(https://s1913652004.t.eloqua.com/e/f2)에 내 양식의 URL을 입력했습니다. 또한 양식 ID가 있지만 그 위치를 알 수는 없습니다.중력 양식을 타사와 통합 (Eloqua)

add_action('gform_after_submission_1', 'post_to_third_party', 10, 2); function post_to_third_party($entry, $form) { 

$post_url = 'https://s1913652004.t.eloqua.com/e/f2'; 
$body = array(
    'first_name' => rgar($entry, '1.3'), 
    'last_name' => rgar($entry, '1.6'), 
    'email' => rgar($entry, '2'), 
    'country' => rgar($entry, '3'), 
    ); 
GFCommon::log_debug('gform_after_submission_1: body => ' . print_r($body, true)); 

$request = new WP_Http();`enter code here` 
$response = $request->post($post_url, array('body' => $body)); 
GFCommon::log_debug('gform_after_submission_1: response => ' . print_r($response, true)); 

답변

관련 문제