gayleenp Posted July 18, 2011 Share Posted July 18, 2011 I've just installed PxPay, and tried to initiate a test transaction. I am able to select DPS as the payment type, but am not getting to the credit card input screen. I get this error: Fatal error: Call to undefined function: htmlspecialchars_decode() in /XXXXXXXXXXXXXXXX/catalog/includes/modules/payment/dps_pxpay.php on line 473 Is anyone able to shed light on this? Thanks Quote Link to comment Share on other sites More sharing options...
germ Posted July 18, 2011 Share Posted July 18, 2011 As of PHP 5.1.0 it's been a "standard" php function (see here) Look in Admin >> Tools >>> Server Info (I think that's where to look) to see what the PHP version is on your server. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
gayleenp Posted July 18, 2011 Author Share Posted July 18, 2011 Thanks Jim. Looks like I've got 4.4.4. The link you provided gave a suggestion as follows - would I need to put the following code within my payment module file (dps_pxpay.php)? ***** Here is how you can get this function in php < 5.1, just make sure this function is before you try and call the function. if (!function_exists('htmlspecialchars_decode')) { function htmlspecialchars_decode($str, $options="") { $trans = get_html_translation_table(HTML_SPECIALCHARS, $options); $decode = ARRAY(); foreach ($trans AS $char=>$entity) { $decode[$entity] = $char; } $str = strtr($str, $decode); return $str; } } ***** Quote Link to comment Share on other sites More sharing options...
germ Posted July 18, 2011 Share Posted July 18, 2011 Sounds like a winner. :) Do like the note says and "make sure this function is before you try and call the function." I would place it towards the top of the file. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
gayleenp Posted July 18, 2011 Author Share Posted July 18, 2011 I tried all the function options on that page, but unfortunately none of them worked. I still get the same fatal error. Quote Link to comment Share on other sites More sharing options...
gayleenp Posted July 18, 2011 Author Share Posted July 18, 2011 I've fixed it. Found this: use html_entity_decode() function it works on php 4 Replaced the function and it works just fine. Thanks for your help today Jim. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.