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 Esi
      Hi all
      i need to solve a problem with a wrong invoice ( obv paid from my client ) due a wrong data insert in registration from client. in my 7.5 whmcs version there's checked "Store Client Data Snapshot" option and it's working correctly, i need so ( i think that is the only way ) modify wrong data from db table mod_invoicedata.customfields and mod_invoicedata.clientdetails but value that i need to change is into a big array and i don't know how touch correctly it.
      Someone has some suggestions or workaround to solve this problem that i think could be really common after whmcs upgrade system and changing ?
      Thank you so much.
      Regards
       
       
    • By Screamfox
      Hello everyone, 

      Well i forget to put the Cron Job task in my Cpanel runing every 5 minutes so, and now after 2 month many invoices as not sent and not due or generated automatically ,the right question is how can i generate all the invoices the cron task usually create for all clients ?  Because now all the 2 month automatic invoices is not here only the transaction ID from PayPal and CoinGate, but the invoice is not created/generated by the automatic system and i have more than two thousand clients so how can i generate again all invoice and put all has payed marked pay and others unpaid if unpaid ? 
       
      I only found this issue after 2 month so now i many "automatic" invoice is not here, there is a way to generate all invoice again ? and mark payed if the transaction is on that month, or a smiliar way ? 

      Very Important
      Regards
      Screamfox 
    • 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
  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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