[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] What do I change to put credit card numbers in database?
Robert Smith wrote:
>
> Hello,
>
> What do I need to change to get Interchange to put credit card numbers
> directly in a database? Do I need to do some Perl work, and if so, on what
> file? I really need to be able to do this...
>
> Thanks!
> Robert Smith
simple, when checking the creditcard number is valid use DBI to put it into a
DB.
for example when I check some thing I use this in interchange.cfg....
GlobalSub <<EOF
sub set_up_extra_check {
BEGIN {
package Vend::Order;
sub _check_copy_and_ship_address {
#::logDebug("wib");
# $ref is to Vend::Session->{'values'} hash
# $var is the passed name of the variable
# $val is current value of checked variable
my($ref, $var, $val) = @_;
#::logDebug("\$var = $var");
#::logDebug("\$val = $val");
if(( $var eq "copy") && ($val =~ /billing/oi)){
return 1,"copy","Ouch, not copy";
}
else{
my @array = (0,"Ship Address","Ouch not copy");
return @array if !$ref->{shipname};
return @array if !$ref->{shipemail};
return @array if !$ref->{shipaddress};
return @array if !$ref->{shipcity};
return @array if !$ref->{shipzip};
return (1,"Ship Address","Ouch not copy");
}
return (0,"Ship Address","Ouch not copy");
}
}
}
EOF
------------------------------------
so order profile look like this...
copy=check_copy_and_ship_address We need to know your copy
------------------------------------
You do something simular but you might want to pipe it through gpg first, and
put a "use DBI" in it, etc
Or just find the code in Order.pm that deals with credit cards and put in a
couple of lines, one pipeing it through gpg the other saving it to a DB.
YMMV
Yours
Murray
--
____
\__/ Murray Gibbins murray@scotweb.ltd.uk
/ \ Programmer
_ \__/ _ ================================================
\\ || // Scotweb Limited, info@scotweb.ltd.uk
\\||// 13a Albert Terrace, http://www.scotweb.ltd.uk
\||/ Edinburgh EH10 5EA Tel: +44 (0) 131 270 82 33
|| Scotland. Europe. Fax: +44 (0) 7020 93 49 04
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users