Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CRM/Core/Payment/OmnipayMultiProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,20 @@ public static function processPaymentResponse($params) {
* @param null|object $response
*/
protected function redirectOrExit($outcome, $response = NULL) {
// Session is reset for event registration for unknown reason.
// set the component so that the url is build correctly.
if (!empty($this->transaction_id)) {
$participantCount = civicrm_api3('ParticipantPayment', 'getcount', [
'contribution_id' => $this->transaction_id,
]);
if ($participantCount) {
$this->_component = 'event';
}
else {
$this->_component = 'contribute';
}
}

switch ($outcome) {
case 'fail':
$userMsg = ts('Your payment was not successful. Please try again');
Expand Down Expand Up @@ -1324,4 +1338,3 @@ public function getResponseBodies() {
}

}