From f5d0dc8311af041bea720996f3c0a20d17798642 Mon Sep 17 00:00:00 2001 From: systopia Date: Wed, 21 Mar 2018 11:31:51 +0100 Subject: [PATCH] minor adjustments to #26 --- proxy/callback.functions.php | 5 +++++ proxy/callback.php | 6 ++++++ proxy/config.php | 26 ++++++++++++++++++-------- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/proxy/callback.functions.php b/proxy/callback.functions.php index 7ebb5b4..7f43fba 100644 --- a/proxy/callback.functions.php +++ b/proxy/callback.functions.php @@ -1,4 +1,9 @@ "; @@ -118,13 +123,18 @@ $rest_allowed_actions = array( ), ); -$callbacks_enabled = false; -$callbacks = [ - 'sparkpost' => [ - 'secret' => '85c573b980c3c248f083f9ca6a175659', +/**************************************************************** + ** ALLOWED CALLBACKS ** + ****************************************************************/ + +// defines the callbacks that are to be forwarded to the target system +// make sure $callbacks_enabled is TRUE for this to work +$callbacks = array( + 'sparkpost_example' => array( + 'secret' => '85c573b980c3c248f083f9ca6a175659', 'request_method' => 'POST', // single value or array - 'content_type' => 'application/json', - 'target_path' => 'civicrm/sparkpost/callback' - ] -]; + 'content_type' => 'application/json', + 'target_path' => 'civicrm/sparkpost/callback' + ) +);