minor adjustments to #26
This commit is contained in:
parent
324b8c2e96
commit
f5d0dc8311
|
|
@ -1,4 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
/*--------------------------------------------------------+
|
||||||
|
| SYSTOPIA CiviProxy |
|
||||||
|
| a simple proxy solution for external access to CiviCRM |
|
||||||
|
| Author: McAndrews (michaelmcandrew@thirdsectordesign.org|
|
||||||
|
+---------------------------------------------------------*/
|
||||||
|
|
||||||
function civiproxy_callback_validate_request_method($expected, $actual){
|
function civiproxy_callback_validate_request_method($expected, $actual){
|
||||||
if(is_array($expected) && in_array($actual, $expected)){
|
if(is_array($expected) && in_array($actual, $expected)){
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
/*--------------------------------------------------------+
|
||||||
|
| SYSTOPIA CiviProxy |
|
||||||
|
| a simple proxy solution for external access to CiviCRM |
|
||||||
|
| Author: McAndrews (michaelmcandrew@thirdsectordesign.org|
|
||||||
|
+---------------------------------------------------------*/
|
||||||
|
|
||||||
// Handles callback URLs as follows:
|
// Handles callback URLs as follows:
|
||||||
// 1. Validates callback
|
// 1. Validates callback
|
||||||
// 2. Passes to civicrm if the payload passes validation
|
// 2. Passes to civicrm if the payload passes validation
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,11 @@ $target_mail_view = $target_civicrm . '/civicrm/mailing/view';
|
||||||
** GENERAL OPTIONS **
|
** GENERAL OPTIONS **
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
|
// Set this option to enable or disable callback processing
|
||||||
|
// The individual callbacks still have to be defined
|
||||||
|
// by the $callbacks variable, see below
|
||||||
|
$callbacks_enabled = FALSE;
|
||||||
|
|
||||||
// This logo is shown if the proxy server is address with a web browser
|
// This logo is shown if the proxy server is address with a web browser
|
||||||
// add your own logo here
|
// add your own logo here
|
||||||
$civiproxy_logo = "<img src='{$proxy_base}/static/images/proxy-logo.png' alt='SYSTOPIA Organisationsberatung'></img>";
|
$civiproxy_logo = "<img src='{$proxy_base}/static/images/proxy-logo.png' alt='SYSTOPIA Organisationsberatung'></img>";
|
||||||
|
|
@ -118,13 +123,18 @@ $rest_allowed_actions = array(
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
$callbacks_enabled = false;
|
|
||||||
|
|
||||||
$callbacks = [
|
/****************************************************************
|
||||||
'sparkpost' => [
|
** ALLOWED CALLBACKS **
|
||||||
'secret' => '85c573b980c3c248f083f9ca6a175659',
|
****************************************************************/
|
||||||
|
|
||||||
|
// 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
|
'request_method' => 'POST', // single value or array
|
||||||
'content_type' => 'application/json',
|
'content_type' => 'application/json',
|
||||||
'target_path' => 'civicrm/sparkpost/callback'
|
'target_path' => 'civicrm/sparkpost/callback'
|
||||||
]
|
)
|
||||||
];
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue