-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mollie with Event payment: Serialization of 'Closure' is not allowed when using Redis #55
Comments
I found that the mollie vendor uses a Closure or anonymous function in the AbstractRequest class. This Closures bubbles down through the omnipay extension to the cache somewhere somehow and that can't be serialized. I'm not sure if this should be fixed in mollie vendor or omnipay extension or CiviCRM core maybe? |
Hmm - so the previous fix was to unset the gateway object before the form was going to be serialised - ie https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/blob/master/CRM/Core/Payment/OmnipayMultiProcessor.php#L1000 So doing it in the completetransaction routine too makes sense - pushed a commit that does that |
As an aside- if you are doing Redis there are changes in the current rc that affect Redis caching so it would be great if you could test it https://download.civicrm.org/latest |
Thanks @eileenmcnaughton your fix seems to work on my setup! I will test further and more in depth later with my teammates and give you an update. |
Thanks @wannesderoy |
I am hitting a slightly obscure bug in Redis that is solved by this change. Per eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor#55 we have an issue whereby Omnipay adds the gateway to a variable on class when processing payments. In some cases this gateway will not serialize into a key under Redis causing a fatal. However, we don't really need it to - the payment processor that we are aiming to cache is 'as loaded' not 'as used'. The caching of the processors appears to have been removed in the past because of issues around domains -however, I think we can get past that by changing the cache key.
I hit this on another processor with Redis (which I'm now using locally) - Mollie seems to just sneak through with this patch but Paypal Rest I needed to address it in the caching function because completetransaction is being called from the form so I have less control. |
I am hitting a slightly obscure bug in Redis that is solved by this change. Per eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor#55 we have an issue whereby Omnipay adds the gateway to a variable on class when processing payments. In some cases this gateway will not serialize into a key under Redis causing a fatal. However, we don't really need it to - the payment processor that we are aiming to cache is 'as loaded' not 'as used'. The caching of the processors appears to have been removed in the past because of issues around domains -however, I think we can get past that by changing the cache key.
I am hitting a slightly obscure bug in Redis that is solved by this change. Per eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor#55 we have an issue whereby Omnipay adds the gateway to a variable on class when processing payments. In some cases this gateway will not serialize into a key under Redis causing a fatal. However, we don't really need it to - the payment processor that we are aiming to cache is 'as loaded' not 'as used'. The caching of the processors appears to have been removed in the past because of issues around domains -however, I think we can get past that by changing the cache key.
OK I think we sorted this out - closing |
In reference to issue #17 we encountered the same issue but only when using Redis caching.
We looked at all the solutions and patches suggested in #17 but to no avail.
We only use Mollie on our site so can't confirm for other payment providers.
A registration for an event is registered correctly by civi and the user is redirected to and from Mollie corrected, but the status of the payment always remains on "Pending (incomplete transaction)". If we set the cache to ArrayCache, everything works correctly.
In the logs we see for example:
Something is still going wrong with the storage of session or cache data. We already spend some time looking into this issue but found nothing out of the ordinary except the
Serialization of 'Closure' is not allowed
error.The text was updated successfully, but these errors were encountered: