Jump to content

Automatically change an SQL entry before diplaying in TPL


evolution.x

Recommended Posts

Hi,

 

I use a "provider" to accept card payments on my prestashop site.

 

If a card payment fails due to a failed address / postcode entered or some other error the "provider" sends an error code to display on the payment return tpl.

 

This error code is stored in the database under the ps_message - message table.

 

The error code is then shown on the success.tpl page but here is my problem.

 

The error code is very vague and does not provide a human readable reason as to why the payment has failed; this is due to fraud prevention.

 

What I would like to achieve is to automatically change the field in ps_message - message to something else before it is displayed on the tpl.

 

Is this possible? Or does anybody have any other ideas?

 

The module i am using is cs_cardsave which i have attached.

 

You can see the error message is generated in callback.php and then displayed on tpl as {$ReturnMessage}

 

Any help would be appreciated.

 

Regards

cs_cardsave.zip

Edited by evolution.x (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...