View Full Version : Credit Card Number Encryption

02-11-2008, 12:50 AM
GREAT Contribution!

I'm not sure why, but I had some difficultly with the encrypt_ccnum.php script which applies encryption to past orders. I had over 8000 records to update and it would crap out after about 500 or so updates (some records would get encrypted but the remaining would be untouched).

I could tell that something wasn't quite right because the browser did not display the last line of output:

Print '
Updating completed!';

But there were no other error messages. Maybe its the type of table I'm using (transaction logged?) I dont know. I never got down to the true source of the problem, but the quicker fix was to make the page choose 250 un-encrypted records at a time and encrypt them. Then, it all worked. If you have more than 250 records, just keep refreshing until all records are encrypted. Also added an COMMIT statement after each batch of 250 updates - didnt seem to make a difference and didnt hurt, so I left it there..

Decided not to create a new full package because this problem may not apply to everyone.

More... (http://addons.oscommerce.com/info/4359)