<form>
            contactId: <input type="text" name="contactId" value="<?php 
if (isset($_REQUEST['contactId'])) {
    echo htmlspecialchars($_REQUEST['contactId']);
}
?>
"><br/>
            campaignId: <input type="text" name="campaignId" value="<?php 
if (isset($_REQUEST['campaignId'])) {
    echo htmlspecialchars($_REQUEST['campaignId']);
}
?>
"><br/>
    <input type="submit">
<input type="hidden" name="go">
</form>
<?php 
include '../infusionsoft.php';
include 'testUtils.php';
if (isset($_REQUEST['go'])) {
    $out = Infusionsoft_ContactService::addToCampaign($_REQUEST['contactId'], $_REQUEST['campaignId']);
    var_dump($out);
}
コード例 #2
0
?>
</pre>

<h1>Testing Save With Existing Contact</h1>
<?php 
$contact->FirstName = 'Joey';
$out = Infusionsoft_ContactService::save($contact);
?>
<pre><?php 
didItWorkInt($out);
?>
</pre>

<h1>Testing Add To Campaign</h1>
<?php 
$out = Infusionsoft_ContactService::addToCampaign($contact, 1);
?>
<pre><?php 
didItWorkBool($out);
?>
</pre>



<h1>Testing Add To Group</h1>
<?php 
$out = Infusionsoft_ContactService::addToGroup($contact, '1');
?>
<pre><?php 
didItWorkBool($out);
?>