Closed BetterCallJohn closed 12 years ago
Hey thx for the pull request but i wont be able to merge. You added json_encode
to the global payload which will break the export class. If you like open a new pull request and add json_encode
to $payload
in https://github.com/miguel250/MZMailChimpBundle/blob/master/Services/Methods/MCList.php#L172
When we use "merge_vars" for subscription, there is an error if $payload is not encoded in JSON.
Ok so the problem is https://github.com/miguel250/MZMailChimpBundle/blob/master/Services/Methods/MCList.php#L143. Do you have any sample code that i can use to test it?
$mailchimp = $this->get('Mailchimp');
$mailchimp->setListID('YOURID');
$list = $mailchimp->getList();
$payload = array('FNAME' => 'CHUCK', 'LNAME' => 'NORRIS');
$list->setMerge($payload);
$list->setEmailType('html');
$list->setDoubleOption(false);
$list->setUpdateExisting(true);
$list->SendWelcome(false);
$list->Subscribe('chuck@norris.com');
error :
Notice: Array to string conversion in /myfullpath/Symfony/vendor/kriswallsmith/buzz/lib/Buzz/Client/AbstractCurl.php line 87
I opened a new pull request with an other solution to fix this.
doc : http://apidocs.mailchimp.com/api/1.3/listsubscribe.func.php