udpate parsing of response codes from civicrm api

This commit is contained in:
Philipp Batroff 2019-07-18 11:34:18 +02:00
parent 1ffa67865d
commit f83fc0c77e
1 changed files with 4 additions and 4 deletions

View File

@ -112,8 +112,8 @@ function webhook2api_processConfiguration($configuration, $post_input) {
// internal communication Error occured. Aborting process // internal communication Error occured. Aborting process
return $result['internal_error']; return $result['internal_error'];
} }
if (!empty($result['http_code'])) { if (!empty($result['values']['http_code'])) {
$http_code = $result['http_code']; $http_code = $result['values']['http_code'];
} else { } else {
$http_code = 403; $http_code = 403;
break; break;
@ -125,8 +125,8 @@ function webhook2api_processConfiguration($configuration, $post_input) {
// internal communication Error occured. Aborting process // internal communication Error occured. Aborting process
return $result['internal_error']; return $result['internal_error'];
} }
if (!empty($result['http_code'])) { if (!empty($result['values']['http_code'])) {
$http_code = $result['http_code']; $http_code = $result['values']['http_code'];
} else { } else {
$http_code = 403; $http_code = 403;
} }