Posted: April 29, 2024 at 8:54 am
My clients site keeps getting a critical error when I activate payfast extention. PayFast payment gateway Version 1.1.1 | By PayFast | Visit plugin site An error of type E_COMPILE_ERROR was caused in line 57 of the file /home/ocafricaorg/domains/ocafrica.org/public_html/wp-content/plugins/Payfast/payment_methods/Payfast/EE_PMT_Payfast.pm.php. Error message: Declaration of EE_PMT_Payfast::finalize_payment_for($transaction) must be compatible with EE_PMT_Base::finalize_payment_for(EE_Transaction $transaction): ?EE_Payment |
|
Hi there, The above isn’t from a recent update to Event Espresso, we changed the signature for The PayFast payment method needs to be updated to match the current payment method function signatures to fix this. |
|
How does your response solve my critical error on my website. IS THAT YOUR IDEA OF SUPPORT? |
|
Payfast payment gateway Version 1.1.8 | By Payfast | Visit plugin site An error of type E_COMPILE_ERROR was caused in line 70 of the file /home/ocafricaorg/domains/ocafrica.org/public_html/wp-content/plugins/Payfast/payment_methods/Payfast/EE_PMT_Payfast.pm.php. Error message: Declaration of EE_PMT_Payfast::finalize_payment_for($transaction) must be compatible with EE_PMT_Base::finalize_payment_for(EE_Transaction $transaction): ?EE_Payment |
|
The error isn’t from EE itself, its from the PayFast add-on and that add-on needs to be updated. We provide support for Event Espresso and any add-ons we (EventEspresso.com) create, we didn’t create or write any part of the PayFast add-on so we can’t provide support for it, the author of that add-on needs to fix this. So in short, you are using a 3rd party payment method which we did not create and we don’t provide support for so I’m not sure what other response I can give you here. Any fix I can give you would be overridden by any updates PayFast make, if they don’t fix the code in their add-on then any changes you make to fix their code running on your site will be wiped out on their next update and you end up in the same situation all over again. |
|
I realised that without some additional context, my replies likely come across differently than intended here. So to explain a little, PayFast created the above payment method themselves and we didn’t have anything at all to do with the development of that add-on. We don’t provide support for other people’s code as we don’t have any control over it, so if we didn’t write it and release it ourselves, it’s not code we support. The issue above is from PayFast not updating the add-on to keep up with EE’s core payment method functions, one of the methods the PayFast add-on overrides has changed and needs to match so PHP then throws an error because those method signatures don’t match. PayFast themselves show they support Event Espresso 4.9 with no mention of 5+ The error you are getting means that the PayFast add-on needs to be updated to work with EE5, any fixes I give you may well work, but will be wiped out when/if PayFast release an update themselves. They may (or may not) include the fix for this in their update, but if not, your back to square one again. So they need to update their payment method to prevent this error. The error you’ve posted shows that:
Line 70 needs to change from this:
To this:
Which should fix that specific error, but there may be more and again, this is not something we provide support for, it needs to be properly fixed in the add-on itself. |
|
The support post ‘Not available to activate Payfast after Upgrade to EE 5.0.19p’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.