Jump to content

Credit Card Message


souzadavi

Recommended Posts

In clientarea.php?action=creditcard there is a error message to user, there is anyway to give a better error message that come from the payment module gateway?  

 

Example: I would like to tell my user the real problem and not only: Remote Transaction Failure. Please Contact Support. So I can tell my user, this credit card brand is wrong, or please check the validation date, or your credit card is not able to use in this country.

 

I think it could be more useful, but I got no clue how to print the error message in template from a gateway payment module....This message error come from when the function _storeremote() is executed... Any ideia will be appreciate.... thanks

 

remote-whmcs-credit-card.png.85cecaae77f9f57a016aad4f36325bde.png

 

 

Link to comment
Share on other sites

Ah okay.  Thought I saw another function return rawdata that outputted and figured it may work there also.  

One method may be to do a $_SESSION variable in storeremote, then do a hook for ClientAreaPageCreditCard and return errormessage = 'your error'; so like:

<?php 
add_hook('ClientAreaPageCreditCard', 1, function($vars) 
{ 
     return array('errormessage'=>$_SESSION['gateway_error']);
});

but have not tested that and so do not know if that replacement would work.  If not, you could set your own template variable with the same method and just update the template file to show it.   If session doesn't work, last option is to store the error somewhere else, like a db table, and then output that via above method. 

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
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated