Damo Posted October 17, 2017 Share Posted October 17, 2017 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: If no card is on file display a note on the PDF invoice / email template / print invoice. If a card is on file display the card issuer and 4 digits on the PDF invoice / email template / print invoice. 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 More sharing options...
WHMCS Developer WHMCS Andrew Posted October 17, 2017 WHMCS Developer Share Posted October 17, 2017 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 More sharing options...
Damo Posted October 17, 2017 Author Share Posted October 17, 2017 Oh perfect. Thanks! I didn’t know about {debug} but it makes sense given it’s Smarty based. Link to comment Share on other sites More sharing options...
Recommended Posts