Jump to content

Credit card type and last 4 digits on invoices


Damo

Recommended Posts

Hello,

Has anyone implemented a way to show the card type and four digits of the credit card used for invoice payments?

We would like to do three things:

  1. If no card is on file display a note on the PDF invoice / email template / print invoice.
  2. If a card is on file display the card issuer and 4 digits on the PDF invoice / email template / print invoice.
  3. As for #2 display the same information in the transactions table below the transaction ID.

I was not able to find any template variables so suspect it may be a direct call to the database to look this up.

Thanks, as always.

Link to comment
Share on other sites

  • WHMCS Developer

If you are editing a file where $clientsdetails are available (may be part of another param array too), you should find cctype and cardlastfour are parameters available to you.

There are separate merge fields for these values available in Email Templates.

$clientsdetails is available in the PDF invoice and the online viewable invoice.

 

In a template, remember you can use {debug} to see the variables available. This also applies to email templates, but you have to send the email to see what is available. https://www.smarty.net/docs/en/language.function.debug.tpl

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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