You are here

function mailchimp_webhook_key in Mailchimp 8

Same name and namespace in other branches
  1. 7.5 mailchimp.module \mailchimp_webhook_key()
  2. 7.2 mailchimp.module \mailchimp_webhook_key()
  3. 7.3 mailchimp.module \mailchimp_webhook_key()
  4. 7.4 mailchimp.module \mailchimp_webhook_key()

Generates a key to include in the webhook URL based on a hash.

Return value

string The key.

2 calls to mailchimp_webhook_key()
mailchimp_process_webhook_access in ./mailchimp.module
Access callback for mailchimp_process_webhook().
mailchimp_webhook_url in ./mailchimp.module
Generates the webhook endpoint URL.

File

./mailchimp.module, line 1152
Mailchimp module.

Code

function mailchimp_webhook_key() {
  return Crypt::hashBase64($GLOBALS['base_url'] . Drupal::service('private_key')
    ->get() . Settings::getHashSalt());
}