Jump to content
Damo

Credit card type and last 4 digits on invoices

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.

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

Oh perfect. Thanks!

I didn’t know about {debug} but it makes sense given it’s Smarty based. 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • By WHMCS John
      An issue has been identified in the 7.4.2 release - published on 9th January, 2018 - that can result in tax being rounded down in certain circumstances when a negative line item is manually added to an invoice.
      This can result in the tax being calculated at 0.01 too little on some invoices.
    • By spartanza
      Hello
      Quick question... in the backend/admin area of WHMCS, where can I edit the invoice and the invoice logo that is attached to an email that is sent.
      I have installed an Invoice Style add-on, however, it seems to not be affecting the attachment invoice that is sent to clients. Where can I edit that logo and where does it take the logo from?
      Thank you
    • By Frankc
      Original invoice amount is $100
      Payment of $50 applied
      But the invoice amount still stay $100 on notices, admin and client area etc even while the amount due is now $50 and correct in all calculations.
      While not a problem by itself it cause unnecessry support calls and misunderstandings when the invoice is still for $100 and not $50
      Even if the PDF invoice can't be changed, surely the notices and outstanding invoices can show the DUE AMOUNT for that invoice instead than original invoice amount?
    • By wellconnit
      Hi All,
       
      Has anyone had any experience with a hook updating an invoice?
      I want to use InvoicePaidPreEmail to append a credit card fee to the invoice.
      I understand WHMCS is not willing to budge on per Gateway charges, but I can disclose to my customers that there is a credit card fee of x% and then send the right payment value to the bank, once it returns as approved I can then append it to the invoice and prior to the email being sent it will now include the charge on the invoice.
       
      Any help with this is appreciated.
       
  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines