Support

Home Forums Ticketing Add-on Payment gateway display button image does not work with root-relative paths

Payment gateway display button image does not work with root-relative paths

Posted: November 26, 2013 at 1:41 am


Cristi Constantin

November 26, 2013 at 1:41 am

In an attempt to make the site domain independent (between live and test environments), I have selected, in the payment settings screen, a root-relative path for the button image related to one of the payment gateways. If that gateway uses function espresso_select_button_for_display, then the image display fails, probably due to the fact that empty($settings_location) returns true.
As a conclusion, the mentioned function requires some rewrite, as to properly handle root-relative paths.

P.S: root-relative path is described here: http://goo.gl/uLchIF


Cristi Constantin

November 26, 2013 at 1:48 am

As a workaround, in a custom gateway that I have prepared, I replaced this line:

$button_url = espresso_select_button_for_display($mobilpayro_settings[‘button_url’], “mobilpayro/mobilpayro-logo.png”);

with this line:

$button_url = espresso_select_button_for_display(site_url($mobilpayro_settings[‘button_url’]), “mobilpayro/mobilpayro-logo.png”);

However, the problem remains for non custom gateways as well as custom gateways of other people, who want to use this kind of root-relative path.


Dean

November 28, 2013 at 4:10 am

Hi Cristi,

Thanks for that, it certainly is an interesting point. I don’t think it is something we will consider changing for 3.1 but I’ll add it to the feature request list for 4.x

The support post ‘Payment gateway display button image does not work with root-relative paths’ 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.

Event Espresso