Skip to content

Commit

Permalink
#17 unset gateway before storing session
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Feb 5, 2017
1 parent 91bd74d commit 9338069
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CRM/Core/Payment/OmnipayMultiProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,12 @@ public function doDirectPayment(&$params, $component = 'contribute') {
return $params;
}
elseif ($response->isRedirect()) {
$isTransparentRedirect = ($response->isTransparentRedirect() || !empty($this->gateway->transparentRedirect));
// Unset $this->gateway before storing session to cache due to risk of
// Serialization of 'Closure' is not allowed error - issue #17
$this->gateway = NULL;
CRM_Core_Session::storeSessionObjects(FALSE);
if ($response->isTransparentRedirect() || !empty($this->gateway->transparentRedirect)) {
if ($$isTransparentRedirect) {
$this->storeTransparentRedirectFormData($params['qfKey'], $response->getRedirectData() + array(
'payment_processor_id' => $this->_paymentProcessor['id'],
'post_submit_url' => $response->getRedirectURL(),
Expand Down

1 comment on commit 9338069

@magnolia61
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR redirecting to Mollie from an event registration finally worked again!

Please sign in to comment.