From dcdf657e77ec7b46dc69e19a849a9c133123db7c Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 14 Dec 2006 06:00:46 +0000 Subject: encryption fixes from huntsberg & jayce --- httemplate/edit/cust_main/billing.html | 26 +++--- httemplate/edit/cust_refund.cgi | 147 ++++++++++++++++++++------------- httemplate/edit/process/cust_main.cgi | 6 ++ 3 files changed, 111 insertions(+), 68 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 78a2002a4..ae5630739 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -23,7 +23,10 @@
% # XXX key -% foreach my $field (qw( payinfo payname paycvv paystart_month paystart_year payissue payip )) { + + + +% foreach my $field (qw( payname paycvv paystart_month paystart_year payissue payip )) { @@ -136,16 +139,19 @@ % % -% my($payby, $payinfo, $payname)=( +% my($payby, $paymask, $payname)=( % $cust_main->payby, -% $cust_main->payinfo, +% $cust_main->paymask, % $cust_main->payname, % ); -% my( $account, $aba ) = split('@', $payinfo); +% my( $account, $aba ) = split('@', $paymask); % % my $disabled = 'DISABLED style="background-color: #dddddd"'; % my $text_disabled = 'style="color: #999999"'; -% if ( $payby =~ /^(CARD|DCRD)$/ && cardtype($payinfo) =~ /^(Switch|Solo)$/ ) { +% +% # this is not going to work unless the mask-generation recognizes +% # Switch/Solo cards +% if ( $payby =~ /^(CARD|DCRD)$/ && cardtype($paymask) =~ /^(Switch|Solo)$/ ) { % $disabled = 'style="background-color: #ffffff"'; % $text_disabled = 'style="color: #000000";' % } @@ -157,7 +163,7 @@ % ''. % % qq!!. -% qq!!. +% qq!!. % % qq!!. % '!. -% '!. @@ -188,7 +194,7 @@ % 'end_year' => (localtime())[5] + 1900, % 'selected_date' => ( % ( $payby =~ /^(CARD|DCRD)$/ -% && cardtype($payinfo) =~ /^(Switch|Solo)$/ ) +% && cardtype($paymask) =~ /^(Switch|Solo)$/ ) #also % ? $cust_main->paystart_month. '-'. % $cust_main->paystart_year % : '' @@ -236,7 +242,7 @@ % '
${r}Card number
${r}Expiration '. @@ -174,7 +180,7 @@ % % qq!(help)!. % qq!'. +% ''. % % % qq!
Start date
'. % % qq!!. -% qq!!. +% qq!!. % % qq!!. % qq!!. @@ -256,7 +262,7 @@ % '
${r}Phone number
'. % % qq!!. -% qq!!. +% qq!!. % % qq!!. % qq!!. diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi index 2b3e02614..aa825af94 100755 --- a/httemplate/edit/cust_refund.cgi +++ b/httemplate/edit/cust_refund.cgi @@ -1,4 +1,3 @@ - % % %my $conf = new FS::Conf; @@ -26,70 +25,102 @@ % %my $p1 = popurl(1); % -%print header('Refund '. ucfirst(lc($payby)). ' payment', ''); -%print qq!Error: !, $cgi->param('error'), -% "" -% if $cgi->param('error'); -%print <config('countrydefault')); -% -% -% -% -% -% -% -% -% -%
-%END % -%if ( $cust_pay ) { + + +<% include('/elements/header.html', 'Refund '. ucfirst(lc($payby)). ' payment', '') %> +% if ( $cgi->param('error') ) { + + Error: <% $cgi->param('error') %> +

+% } + + +<% small_custview($custnum, $conf->config('countrydefault')) %> + + + + + + + + + + +
+% if ( $cust_pay ) { % % #false laziness w/FS/FS/cust_pay.pm % my $payby = $cust_pay->payby; -% my $payinfo = $cust_pay->payinfo; -% $payby =~ s/^BILL$/Check/ if $payinfo; +% my $paymask = $cust_pay->paymask; +% $payby =~ s/^BILL$/Check/ if $paymask; % $payby =~ s/^CHEK$/Electronic check/; -% $payinfo = $cust_pay->payinfo_masked if $payby eq 'CARD'; % -% print '
Payment'. ntable("#cccccc", 2). -% '
'. -% ''. -% ''; +% + + +
Payment + <% ntable("#cccccc", 2) %> + + + + + + + + + + + + +% % #false laziness w/FS/FS/cust_main::realtime_refund_bop % if ( $cust_pay->paybatch =~ /^(\w+):(\w+)(:(\w+))?$/ ) { % my ( $processor, $auth, $order_number ) = ( $1, $2, $4 ); -% print ''; -% print '' -% if length($auth); -% print '' -% if length($order_number); -% } -% print '
P.O.
Amount$'. -% $cust_pay->paid. '
Date'. -% time2str("%D",$cust_pay->_date). '
Method'. -% ucfirst(lc($payby)). ' # '. $payinfo. '
Amount$<% $cust_pay->paid %>
Date<% time2str("%D",$cust_pay->_date) %>
Method<% ucfirst(lc($payby)) %> # <% $paymask %>
Processor'. -% $processor. '
Authorization'. -% $auth. '
Order number'. -% $order_number. '
'; -%} -% -%print '
Refund'. ntable("#cccccc", 2). -% 'Date'. -% time2str("%D",$_date). ''; -% -%print qq!Amount\$!; -% -%print qq!Reason!; -% -%print < -%
-% -% -% -% -%END -% -% +% + + + + Processor<% $processor %> + +% if ( length($auth) ) { + + + Authorization<% $auth %> + +% } +% if ( length($order_number) ) { + + + Order number<% $order_number %> + +% } +% } + + +% } + + +
Refund +<% ntable("#cccccc", 2) %> + + + Date<% time2str("%D",$_date) %> + + + + Amount$ + + + + Reason + + + +
+ + + + +<% include('/elements/footer.html') %> diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index d5d127b2d..789f29522 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -46,6 +46,9 @@ % } fields('cust_main') %} ); % +% delete( $new->hashref->{'agent_custid'} ) +% unless $new->hashref->{'agent_custid'}; +% %if ( defined($cgi->param('same')) && $cgi->param('same') eq "Y" ) { % $new->setfield("ship_$_", '') foreach qw( % last first company address1 address2 city county state zip @@ -151,6 +154,9 @@ % && $new->paycvv =~ /^\s*\*+\s*$/ ) { % $new->paycvv($old->paycvv); % } +% if ($new->payby =~ /CARD|DCRD|CHEK|DCHK/ && $new->payinfo =~ /xx/) { +% $new->payinfo($old->payinfo); +% } % $error ||= $new->replace($old, \@invoicing_list); % %} -- cgit v1.2.1