I found the funtion possibly_use_deprecated_aim_server() inside /event_espresso/caffeinated/payment_methods/Aim/EEG_Aim.gateway.php
Looks like I could hack the plugin here. But I would rather use a hook and do it the right way. Better yet, create a functionality plugin to work alongside EE4.
First, would you add this functionality into the next version of EE?
Second – if not, what is the best way to hook into that function?
There is already a filter available within the AIM payment method, possibly_use_deprecated_aim_server() uses that filter and its actually within the first method in the screenshot you posted:
FHEE__EEG_Aim___get_server_url
Add your own function that uses that same hook to change the URL to whatever you prefer, just make sure it hooks in later than possibly_use_deprecated_aim_server() does, id use priority 20.
Tony, thankyou. This helps.
One more thing – do you know how I can find out if the code is working? Is there an EE4 object I can print_r to view gateway url? (I’m guessing not). But im just wondering if there is a way other than when we get into testing.
When you attempt a payment you will create log entries there (likely at least 3 for AIM) if you view those logs you can see which URL is being used there within the ‘Server URL’ field.
Viewing 3 reply threads
The support post ‘EE4 Authorize.net gateway – change processing url for ProCharge’ 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.
If you would like help from the Event Espresso staff, then please purchase a support license right now so you can create a support topic in our premium support forums.