<%=
@@ -141,21 +200,24 @@ Contact Information
$cardselect .= qq!!;
}
$cardselect .= '';
+
+ my $table = '';
my %payby = (
- 'CARD' => qq!Credit card *$cardselect *Exp !. expselect("CARD"). qq! *Name on card !,
- 'DCRD' => qq!Credit card *$cardselect *Exp !. expselect("DCRD"). qq! *Name on card !,
+ 'CARD' => qq!$table* Card type | $cardselect | * Card number | | * Expiration | !. expselect("CARD"). qq! | * Name on card | | !,
+ 'DCRD' => qq!$table* Card type | $cardselect | * Card number | | * Expiration | !. expselect("DCRD"). qq! | * Name on card | | !,
'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 *!,
);
if ( $cvv_enabled ) {
foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5
- $payby{$payby} .= qq!CVV2 (help) | | !;
+ my $cvv_r = $require_cvv ? '* ' : '';
+ $payby{$payby} .= qq!${cvv_r}CVV2 (help) | | !;
}
}
if ( $paystate_enabled ) {
@@ -173,19 +235,20 @@ Contact Information
my( $account, $aba ) = split('@', $payinfo);
my %paybychecked = (
- 'CARD' => qq!* Card type | $cardselect | * Card number | | * Expration | !. 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 !,
+ 'CARD' => qq!$table* Card type | $cardselect | * Card number | | * Expiration | !. expselect("CARD", $paydate). qq! | * Name on card | | !,
+ 'DCRD' => qq!$table* Card type | $cardselect | * Card number | | * Expiration | !. 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 !,
'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 *!,
);
if ( $cvv_enabled ) {
foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5
- $paybychecked{$payby} .= qq!CVV2 (help) | | !;
+ my $cvv_r = $require_cvv ? '* ' : '';
+ $paybychecked{$payby} .= qq!${cvv_r}CVV2 (help) | | !;
}
}
if ( $paystate_enabled ) {
@@ -204,13 +267,10 @@ Contact Information
}
}
-use Tie::IxHash;
-use HTML::Widgets::SelectLayers;
-
my %payby_index = ( 'CARD' => qq/Credit Card/,
- 'DCRD' => qq/Credit Card/,
+ 'DCRD' => qq/Credit Card (no auto-charge)/,
'CHEK' => qq/Check/,
- 'DCHK' => qq/Check/,
+ 'DCHK' => qq/Check (no auto-charge)/,
'LECB' => qq/Phone Bill Billing/,
'BILL' => qq/Billing/,
'COMP' => qq/Complimentary/,
@@ -224,23 +284,60 @@ 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 => ' ',
+ html_between => ' ',
form_action => 'dummy.cgi',
- layer_callback => sub { my $layer = shift; return $paybychecked{$layer}. ' |