The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

About the correction in the wrapper file

Highlighted
Occasional Advisor

About the correction in the wrapper file

Hi,

 

I am not sure if this is a fix or not. But I was just trying to fetch the Optout of a campaigns and I just found that it's giving fatal error.

So i debug the code and found that in wrapper file constantcontact.php line number 335 approx.

return $CampaignsCollection->getCampaignEvents($url, 'OptOutEvent');

replace this with 

return $CampaignsCollection->getCampaignEvents($url, 'OptoutEvent');

 

in event type "out" must be in small case.

Hope this will help some of the developers.

2 REPLIES 2
Highlighted
Employee

Re: About the correction in the wrapper file

Hi,

 

Thank you for bringing this to our attention!  We will fix it in the wrapper shortly.

 

Thank you for contacting Constant Contact, and have a wonderful day!

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted
Employee

Re: About the correction in the wrapper file

Hi,

 

I looked into this more deeply, and some of our PHP repositories on GitHub show OptOutEvent and some have OptoutEvent, so that string is not consistent across our wrappers, based on which repository you download (we have a main wrapper, an email campaign example, and a contact example, among others).  The casing of the string isn't very important, since it is just an arbitrary string and not a variable being called from somewhere else (that string is only declared/used once in the wrapper).

 

However, if you tried to use part of one wrapper and part of another, because the case does change, you could run into problems.  This also would matter when parsing your results (your case would just need to match).  I will look into making the wrappers more consistent; thanks again for letting us know about that.

 

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured