Skip to content

Commit 1fe18e6

Browse files
Get processor id from message if not otherwise clear"
Gi Get processor_id from context if n
1 parent 827516b commit 1fe18e6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

api/v3/PaymentNotification.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
function civicrm_api3_payment_notification_create($params) {
1111
if (!empty($params['system_log_id'])) {
1212
// lets replace params with this rather than allow altering
13-
$params = json_decode(civicrm_api3('system_log', 'getvalue', array('id' => $params['system_log_id'], 'return' => 'context')), TRUE);
13+
$log = civicrm_api3('system_log', 'getsingle', array('id' => $params['system_log_id'], 'return' => 'context, message'));
14+
$params = json_decode($log['context'], TRUE);
15+
}
16+
if (empty($params['processor_id']) && stristr($log['message'], 'processor_id=')) {
17+
$parts = explode('processor_id=', $log['message']);
18+
$params['processor_id'] = array_pop($parts);
1419
}
1520
return civicrm_api3_create_success(CRM_Core_Payment_OmnipayMultiProcessor::processPaymentResponse($params));
1621
}

0 commit comments

Comments
 (0)