Skip to content

Commit f344113

Browse files
Mollie - redirect to fail url if transaction has already been updated as failed.
If the webhook has already notified the site of failure use the fail url
1 parent 716768b commit f344113

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CRM/Core/Payment/OmnipayMultiProcessor.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,12 @@ public function processPaymentNotification($params) {
645645
$q = explode('/', CRM_Utils_Array::value(CRM_Core_Config::singleton()->userFrameworkURLVar, $_GET, ''));
646646
array_pop($q);
647647
$this->setTransactionID(array_pop($q));
648+
if (!civicrm_api3('Contribution', 'getcount', array(
649+
'id' => $this->transaction_id,
650+
'contribution_status_id' => array('IN' => array('Completed', 'Pending'))
651+
))) {
652+
$this->redirectOrExit('fail');
653+
}
648654
$this->redirectOrExit('success');
649655
}
650656

0 commit comments

Comments
 (0)