[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] CC Info in UserDB
Dear List,
Well, i havn't had any response to my previous question on this topic, but I
did find out some useful stuff and have more questions.
This part of checkout.html:
<input type="hidden" name="mv_order_route"
value="[either]__ORDER_ROUTES__[or]log log_entry main copy_user[/either]">
does not normally have log_entry in it. I added it here, and to the
ORDER_ROUTES variable.
Now the file in /etc/log_entry is being run when I checkout. The contents
of it are currently:
#### begin [value mv_order_number] #####
[seti transaction_record]
[tag flag write]userdb inventory[/tag]
[if cgi new_customer_id]
[or !cgi customer_id]
Add new customer: [value name=customer_id set="[counter
etc/customer.number]"]
Set password: [value name=password set="[value name=zip filter='word uc']"]
[/if]
Update userdb: [perl table=userdb]
my $id = $Values->{username} = $Values->{customer_id};
my $op = "mac";
@always = qw/
company
fname
lname
address1
address2
city
state
zip
country
phone_day
mv_shipmode
mv_credit_card_type
mv_credit_card_exp_month
mv_credit_card_exp_year
mv_credit_card_xref
mv_credit_card_info
email
phone_night
fax_order
email_copy
mail_list
/;
@sometimes = qw/
password
b_fname
b_lname
b_address1
b_address2
b_city
b_state
b_zip
b_country
b_phone
fax
credit_limit
/;
my $db = $Db{userdb};
if(! $db->record_exists($id)) {
$db->set_row($id);
$db->set_field($id, 'password', $Values->{password});
}
for(@always) {
$Tag->filter($op, $Values->{$_});
Log("Always: $_: $Values->{$_}");
$db->set_field($id, $_, $Values->{$_});
}
for (@sometimes) {
next unless $Values->{$_} =~ /\S/;
$Tag->filter($op, $Values->{$_});
Log("Sometimes: $_: $Values->{$_}");
$db->set_field($id, $_, $Values->{$_});
}
return "Updated customer record.";
[/perl]
[comment][perl] Log("Starting entry."); [/perl][/comment]
#### end [value mv_order_number] #####
I added the Log entries to debug the script, and everything goes through and
shows up in the log file, including mv_credit_card_info, which is a PGP
encrypted field. I added the $Tag->filter to accommodate the cc info field.
Everything EXCEPT mv_credit_card_info is appropriately updated and saved in
the userdb. I know the mv_credit_card_info is still set in the session,
because when I go back to the checkout section without logging out, it is
still in there.
So, any ideas folks?
Thanks,
Russ
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users