Jump to content

[SOLVED] Display only last 4 digits of a database entry?


jaxdevil

Recommended Posts

I have my cc authorization system create a temporary table to store cc info during the transaction with the processor. When it is done I need to display the last 4 digits of the card number on the receipt. I then save this back to the database, I can do that part, what i cannot figure out is what function strips all the data away except the last 4 digits? Anyone? I found a good one yesterday but lost it. I thought it was in the tutorials or code library but I can't find it. Anyone can point me in the right direction?

 

Thanks in advance,

SK

Link to comment
Share on other sites

Yes, but its not actually 'stored, its a temporary table that last like 30 seconds, enough time to post the data to the processor, retrieve the response, pull the data back up (since the payment data is not transfered back from the processor during approval) extract the last 4 digits, and store the approval code, last 4, card type, and transaction number. (transaction number and auth code are transmitted back with approval) so the only thing we will store is the last 4 digits, which is perfectly legal.

 

Thanks for the help man! That was the exact code I found yesterday (well almost exact, same function though) perfect!

SK

Link to comment
Share on other sites

  • 2 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.