[ic] extracting encrypted cc number from order file

Stefan Hornburg racke at linuxia.de
Fri Jul 18 14:21:28 EDT 2003


On Fri, 18 Jul 2003 11:53:13 +0100
"Jonathan Clark" <jonc at webmaint.com> wrote:

> 
> > IC 4.8.3
> >
> > First of all, dont panic, im not trying to retrieve a decrypted
> > number or do the decrypting on the server.  However, I would like to be
> > able to retrieve the PGP Block from the order file
> > in the admin so that you dont have to open up ftp in order to
> > get the card number block for a repeat customer.
> >
> > Here is what I have so far (please be kind, I really dont know much perl,
> > just adapted this from a maillist)
> >
> > [calc]
> > my $order = [file name="orders/[scratch lookup]" interpolate=1];
> > $cc = (split(/Info\:(.*?)Payment/, $order))[1];
> > return $cc;
> > [/calc]
> >
> > This appears to kind of be working, even if its a stupid way
> > of doing it.  However, in the error log (since I get NO output)
> > it is complaining about special characters that need to have
> > a "\" in front of them that are contained in this string, which
> > is the whole order file.
> >
> > I have not found anything like this on the list, and even
> > though I know it is really a perl question, is anyone willing to give me
> > some direction?  All I really want is to
> > print to the browser the text block including the BEGIN and END lines so
> > that you can copy right from there to decrypt
> > it if you have admin access to that page and of course the passphrase.  I
> > am using PGP for windows to decrypt the clipboard.
> >
> > Thanks a lot!
> 
> I would be tempted to add a field to the transactions table (say cc_details)
> to store the encrypted block and then just pull it out of the table when
> needed.
> 
> If you edit the etc/log_transaction file you can add the field in there for
> when it writes the order. Something like:
> 
> cc_details: [value name=mv_credit_card_info filter=mac]
> 
> in amongst the [import table=transactions type=LINE continue=NOTES] tag.

The UI in 4.9.x contains a facility to retrieve and decrypt the PGP block
in orders/* (see pages/admin/order_view). 

Bye
	Racke


-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list