Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Update addContact and updateContact examples #155

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/addOrUpdateContact.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
*
* See: http://developer.constantcontact.com/docs/contacts-api/contacts-index.html#opt_in
*/
$returnContact = $cc->contactService->addContact(ACCESS_TOKEN, $contact, true);
$returnContact = $cc->contactService->addContact(ACCESS_TOKEN, $contact, ['action_by' => 'ACTION_BY_VISITOR']);

// update the existing contact if address already existed
} else {
Expand All @@ -83,7 +83,7 @@
*
* See: http://developer.constantcontact.com/docs/contacts-api/contacts-index.html#opt_in
*/
$returnContact = $cc->contactService->updateContact(ACCESS_TOKEN, $contact, true);
$returnContact = $cc->contactService->updateContact(ACCESS_TOKEN, $contact, ['action_by' => 'ACTION_BY_VISITOR']);
} else {
$e = new CtctException();
$e->setErrors(array("type", "Contact type not returned"));
Expand Down