X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fchange_pay.html;h=75ceee8f7275210aa9d3927f20a455d141cf78e3;hb=3872c1d3a2d975989e342be389b8260bfcc5ec41;hp=7283cb850ea9ed8161a6f378d76ce6a9ad7433e3;hpb=32db3ad86bcf04e4f34705a396b718061d333f20;p=freeside.git
diff --git a/fs_selfservice/FS-SelfService/cgi/change_pay.html b/fs_selfservice/FS-SelfService/cgi/change_pay.html
index 7283cb850..75ceee8f7 100644
--- a/fs_selfservice/FS-SelfService/cgi/change_pay.html
+++ b/fs_selfservice/FS-SelfService/cgi/change_pay.html
@@ -1,22 +1,5 @@
-
MyAccount
-
-
-MyAccount
-<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('myaccount_menu') %>
-
-Change payment information
+<%= include('header', 'Change payment information') %>
+
<%= if ( $error ) {
$OUT .= qq!Error: $error
!;
} ''; %>
@@ -29,8 +12,9 @@
my $preauto = ' | Charge future payments to this card automatically |
';
- my $tail = qq().
+ my $tail = qq().
qq().
+ qq().
qq(
).
qq( ).
@@ -54,6 +38,11 @@
'PREP' => qq/Prepaid Card/,
'PREPAY' => qq/Prepaid Card/,
);
+
+ ## Don't show CHEK or DCHK option if ACH is read only
+ delete( $payby_index{'CHEK'} ) unless !$ach_read_only;
+ delete( $payby_index{'DCHK'} ) unless !$ach_read_only;
+
tie my %options, 'Tie::IxHash', ();
foreach my $payby_option ( grep { exists( $payby_index{$_} ) } @paybys ) {
$options{$payby_option} = $payby_index{$payby_option};
@@ -61,6 +50,17 @@
$options{$payby} = $payby_index{$payby}
unless exists($options{$payby});
+ #don't want to show multiple "Credit card" or "Check" options
+ my %paybyremove = (
+ 'CARD' => 'DCRD',
+ 'DCRD' => 'CARD',
+ 'CHEK' => 'DCHK',
+ 'DCHK' => 'CHEK',
+ );
+ delete( $options{ $paybyremove{$payby} } );
+ delete $options{'DCRD'} unless $payby eq 'DCRD' || ! exists $options{'CARD'};
+ delete $options{'DCHK'} unless $payby eq 'DCHK' || ! exists $options{'CHEK'};
+
HTML::Widgets::SelectLayers->new(
options => \%options,
selected_layer => $payby,
@@ -70,5 +70,5 @@
)->html;
%>
-
+
<%= include('footer') %>