Skip to content

Commit

Permalink
Add method_exists check
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed May 23, 2022
1 parent 0e50068 commit 9dc1a9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Core/Payment/OmnipayMultiProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ public function processPaymentNotification($params) {
$this->updatePaymentTokenWithAnyExtraData($trxnReference);
}
}
if (!empty($this->contribution['contribution_recur_id']) && ($tokenReference = $response->getCardReference()) != FALSE) {
if (!empty($this->contribution['contribution_recur_id']) && method_exists($response, 'getCardReference') && ($tokenReference = $response->getCardReference()) != FALSE) {
$this->storePaymentToken(array_merge($params, ['contact_id' => $this->contribution['contact_id']]), $this->contribution['contribution_recur_id'], $tokenReference);
}
}
Expand Down

0 comments on commit 9dc1a9f

Please sign in to comment.