I'm trying to automatically add a contact to a Constant Contact list when a form is submitted and have started with the addOrUpdateContact sample code that uses Constant Contact v2 API. I'm getting the following error when I submit the form:
Catchable fatal error: Argument 3 passed to Ctct\Services\ContactService::addContact() must be of the type array, boolean given, called in /home/cspacetribeca/public_html/mh/test.php on line 65 and defined in /home/cspacetribeca/public_html/mh/vendor/constantcontact/constantcontact/src/Ctct/Services/ContactService.php on line 131
The line referenced is:
$returnContact = $cc->contactService->addContact(ACCESS_TOKEN, $contact, true);
And ContactService.php, on line 131, does ask for an array:
public function addContact($accessToken, Contact $contact, Array $params = array())
How do I fix this?
Thanks - Joe