Skip to content

Instantly share code, notes, and snippets.

@jitendrapurohit
Created May 20, 2017 15:30
Show Gist options
  • Save jitendrapurohit/81b61b12e64bbaf629f138dec255176c to your computer and use it in GitHub Desktop.
Save jitendrapurohit/81b61b12e64bbaf629f138dec255176c to your computer and use it in GitHub Desktop.
diff --git a/CRM/Core/Payment/OmnipayMultiProcessor.php b/CRM/Core/Payment/OmnipayMultiProcessor.php
index 207f1a8..7f6ccb6 100644
--- a/CRM/Core/Payment/OmnipayMultiProcessor.php
+++ b/CRM/Core/Payment/OmnipayMultiProcessor.php
@@ -164,6 +164,12 @@ class CRM_Core_Payment_OmnipayMultiProcessor extends CRM_Core_Payment_PaymentExt
// Serialization of 'Closure' is not allowed error - issue #17
$this->gateway = NULL;
CRM_Core_Session::storeSessionObjects(FALSE);
+
+ //Commit the session if it is not already done.
+ $config = CRM_Core_Config::singleton();
+ if ($config->userSystem->is_drupal && function_exists('drupal_session_commit')) {
+ drupal_session_commit();
+ }
if ($response->isTransparentRedirect()) {
$this->storeTransparentRedirectFormData($params['qfKey'], $response->getRedirectData() + array(
'payment_processor_id' => $this->_paymentProcessor['id'],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment