Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

DPS PxPay - undefined function: htmlspecialchars_decode


gayleenp

Recommended Posts

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

Link to comment
Share on other sites

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.

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

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;

}

}

 

*****

Link to comment
Share on other sites

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.

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...