'card_types' => card_types(),
+ 'withcvv' => $conf->exists('selfservice-require_cvv'), #or enable optional cvv?
+ 'require_cvv' => $conf->exists('selfservice-require_cvv'),
+
'paytypes' => [ @FS::cust_main::paytypes ],
'paybys' => [ $conf->config('signup_server-payby') ],
$payinfo = $p->{'payinfo'};
+ my $onfile = 0;
+
#more intelligent matching will be needed here if you change
#card_masking_method and don't remove existing paymasks
- $payinfo = $cust_main->payinfo
- if $cust_main->paymask eq $payinfo;
+ if ( $cust_main->paymask eq $payinfo ) {
+ $payinfo = $cust_main->payinfo;
+ $onfile = 1;
+ }
$payinfo =~ s/\D//g;
$payinfo =~ /^(\d{13,16}|\d{8,9})$/
or return { 'error' => "CVV2 (CVC2/CID) is three digits." };
$paycvv = $1;
}
+ } elsif ( !$onfile && $conf->exists('selfservice-require_cvv') ) {
+ return { 'error' => 'CVV2 is required' };
}
} else {
'inbound' => ( $_ eq 'inbound' ? 1 : 0 ),
'begin' => ($cust_pkg->last_bill || 0),
'nonzero' => 1,
+ 'disable_charged_party' => 1,
);
$hash{$_} = $sum_cdr->hashref;
}
# we have to return the results all at once...
my($svc_phone, $begin, $end, %opt) = @_;
map [ $_->downstream_csv(%opt, 'keeparray' => 1) ],
- $svc_phone->get_cdrs( 'begin'=>$begin, 'end'=>$end, %opt );
+ $svc_phone->get_cdrs(
+ 'begin'=>$begin,
+ 'end'=>$end,
+ 'disable_charged_party' => 1,
+ %opt
+ );
}
sub list_cdr_usage {