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

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

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.