Credit Card masking to only show the...

User 389612 Photo


Registered User
43 posts

I have a form that I want customers to be able to enter a CC number on.
But I can't use a processor because my company will charge the transaction sometime in the future through our normal accounting system. So basically, I want customers to place an order that shows up in my office just like they called it in.

On both the Payment Configure Payment html page and Confirmation Email, I want to mask the actual credit card number.
I've looked at trying to use a regexp, as well as some jquery script to do this but I'll freely admit I'm in over my head on this.

I just want to show the last 4 digits. It can even be "Card ending in 1234." for my purposes. But I have to keep the original CC number because we need that in our office for to enter the order.
I'd like to do this as an html element so that it can stay inside the WFB file itself without me having to edit the php code.
But each time I actually write a <script> in the Content box, I get a warning about scripts. So that may not be the appropriate location.

It may not be the most secure; but once we get the order entered into our accounting system, then we can delete the email except for the paper copy that stays with all of our paperwork.
Thoughts?
User 187934 Photo


Senior Advisor
20,271 posts

I don't think I would do this on the client side. I would do it on the sever side with php.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.