#XXXFIXME still a bit sloppy for multi-gateway of differing namespace
my $i = 0;
while($i < scalar(@cust_paybys)) { last if $cust_paybys[$i] =~ /^CARD/; $i++ }
- if ( $cust_paybys[$i] =~ /^CARD/ ) {
+ if ( $cust_paybys[$i] && $cust_paybys[$i] =~ /^CARD/ ) {
push @menu, { title => 'Recharge my account with a credit card',
url => $hide_payment_fields[$i]
? 'make_thirdparty_payment&payby_method=CC'
$i = 0;
while($i < scalar(@cust_paybys)) { last if $cust_paybys[$i] =~ /^CHEK/; $i++ }
- if ( $cust_paybys[$i] =~ /^CHEK/ ) {
+ if ( $cust_paybys[$i] && $cust_paybys[$i] =~ /^CHEK/ ) {
push @menu, { title => 'Recharge my account with a check',
url => $hide_payment_fields[$i]
? 'make_thirdparty_payment&payby_method=ECHECK'