This is a Message Broker producer that listens for Mailchimp webhooks. Webhook events are received and passed onto the Message Broker queue to be handled by any listening consumers.
- Install Composer: https://getcomposer.org/doc/00-intro.md#installation-nix
- Setup configs:
- Clone the messagebroker-config repository: https://github.com/DoSomething/messagebroker-config.
- Create a symlink in the root of
mbp-mailchimp-webhooks
tomb-config.inc
inmessagebroker-config
. - Create a symlink in the root of
mbp-mailchimp-webhooks
to wherever themb-secure-config.inc
file is.
- Install dependencies:
composer install
- Send POST requests to mbp-mailchimp-webhooks.php.
- To simulate
unsubscribe
webhook events, make sure to include atype
parameter set tounsubscribe
. - As a basic layer of security against spam, a proper key needs to be included in the URL. See code to find out what it should be.