<%=
@@ -148,7 +189,7 @@ Contact Information
'CHEK' => qq!Electronic check ${r}Account number ${r}ABA/Routing code Type {$r}Bank State ${r}Bank name !,
'DCHK' => qq!Electronic check ${r}Account number Type ${r}ABA/Routing code {$r}Bank State ${r}Bank name !,
'LECB' => qq!Phone bill billing ${r}Phone number !,
- 'BILL' => qq!Billing P.O. *Exp !. expselect("BILL", "12-2037"). qq! *Attention !,
+ 'BILL' => qq!Billing P.O. Attention!,
'COMP' => qq!Complimentary *Approved by *Exp !. expselect("COMP"),
'PREPAY' => qq!Prepaid card *!,
);
@@ -173,12 +214,12 @@ Contact Information
my( $account, $aba ) = split('@', $payinfo);
my %paybychecked = (
- 'CARD' => qq!* Card type | $cardselect | * Card number | | * Expration | !. expselect("CARD", $paydate). qq! | * Name on card | | !,
+ 'CARD' => '* Card type | $cardselect | * Card number | | * Expiration | !. expselect("CARD", $paydate). qq! | * Name on card | | !,
'DCRD' => qq!Credit card *$cardselect *Exp !. expselect("DCRD", $paydate). qq! *Name on card !,
- 'CHEK' => qq!Electronic check ${r}Account number Type ${r}ABA/Routing code ${r}Bank name !,
- 'DCHK' => qq!Electronic check ${r}Account number Type ${r}ABA/Routing code ${r}Bank name !,
+ 'CHEK' => qq!Electronic check ${r}Account number Type ${r}ABA/Routing code ${r}Bank name !,
+ 'DCHK' => qq!Electronic check ${r}Account number Type ${r}ABA/Routing code ${r}Bank name !,
'LECB' => qq!Phone bill billing ${r}Phone number !,
- 'BILL' => qq!Billing P.O. *Exp !. expselect("BILL", $paydate). qq! *Attention !,
+ 'BILL' => qq!Billing P.O. Attention!,
'COMP' => qq!Complimentary *Approved by *Exp !. expselect("COMP", $paydate),
'PREPAY' => qq!Prepaid card *!,
);
@@ -204,9 +245,6 @@ Contact Information
}
}
-use Tie::IxHash;
-use HTML::Widgets::SelectLayers;
-
my %payby_index = ( 'CARD' => qq/Credit Card/,
'DCRD' => qq/Credit Card/,
'CHEK' => qq/Check/,
@@ -224,13 +262,15 @@ foreach my $payby_option ( @payby ) {
$options{$payby_option} = $payby_index{$payby_option};
}
+my $selected_layer = ( grep { $_ eq 'CARD' } @payby ) ? 'CARD' : $payby[0];
+
HTML::Widgets::SelectLayers->new(
options => \%options,
- selected_layer => 'CARD',
+ selected_layer => $selected_layer,
form_name => 'dummy',
html_between => ' ',
form_action => 'dummy.cgi',
- layer_callback => sub { my $layer = shift; return $paybychecked{$layer}. ' '; },
+ layer_callback => sub { my $layer = shift; return ( shift @hide_payment_fields ? '' : $paybychecked{$layer} ) . ' |