projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
652b2d9
)
better error message for signup duplicate cards, allow editing of those customer...
author
ivan
<ivan>
Wed, 20 Jul 2011 21:16:23 +0000
(21:16 +0000)
committer
ivan
<ivan>
Wed, 20 Jul 2011 21:16:23 +0000
(21:16 +0000)
FS/FS/cust_main.pm
patch
|
blob
|
history
fs_selfservice/FS-SelfService/cgi/signup.cgi
patch
|
blob
|
history
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
d0a071c
..
5fce743
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-1440,6
+1440,11
@@
sub replace {
&& $self->payby =~ /^(CARD|DCRD)$/
&& ( $old->payinfo eq $self->payinfo || $old->paymask eq $self->paymask );
&& $self->payby =~ /^(CARD|DCRD)$/
&& ( $old->payinfo eq $self->payinfo || $old->paymask eq $self->paymask );
+ local($ignore_banned_card) = 1
+ if ( $old->payby =~ /^(CARD|DCRD)$/ && $self->payby =~ /^(CARD|DCRD)$/
+ || $old->payby =~ /^(CHEK|DCHK)$/ && $self->payby =~ /^(CHEK|DCHK)$/ )
+ && ( $old->payinfo eq $self->payinfo || $old->paymask eq $self->paymask );
+
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{QUIT} = 'IGNORE';
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{QUIT} = 'IGNORE';
@@
-1835,7
+1840,11
@@
sub check {
if ( $ban ) {
if ( $ban->bantype eq 'warn' ) {
#or others depending on value of $ban->reason ?
if ( $ban ) {
if ( $ban->bantype eq 'warn' ) {
#or others depending on value of $ban->reason ?
- return '_duplicate_card' unless $self->override_ban_warn;
+ return '_duplicate_card'.
+ ': disabled from'. time2str('%a %h %o at %r', $ban->_date).
+ ' until '. time2str('%a %h %o at %r', $ban->_end_date).
+ ' (ban# '. $ban->bannum. ')'
+ unless $self->override_ban_warn;
} else {
return 'Banned credit card: banned on '.
time2str('%a %h %o at %r', $ban->_date).
} else {
return 'Banned credit card: banned on '.
time2str('%a %h %o at %r', $ban->_date).
diff --git
a/fs_selfservice/FS-SelfService/cgi/signup.cgi
b/fs_selfservice/FS-SelfService/cgi/signup.cgi
index
5c9d11c
..
1725561
100755
(executable)
--- a/
fs_selfservice/FS-SelfService/cgi/signup.cgi
+++ b/
fs_selfservice/FS-SelfService/cgi/signup.cgi
@@
-255,7
+255,7
@@
if ( $magic eq 'process' || $action eq 'process_signup' ) {
no strict 'refs';
${$_} = $cgi->param($_) foreach grep { /^snarf_/ } $cgi->param;
no strict 'refs';
${$_} = $cgi->param($_) foreach grep { /^snarf_/ } $cgi->param;
- if ( $error =~ /^_duplicate_(card|ach)
$
/ ) {
+ if ( $error =~ /^_duplicate_(card|ach)/ ) {
my $what = ($1 eq 'card') ? 'Credit card' : 'Electronic check';
$error = "Warning: $what already used to sign up recently";
$init_data->{'override_ban_warn'} = 1;
my $what = ($1 eq 'card') ? 'Credit card' : 'Electronic check';
$error = "Warning: $what already used to sign up recently";
$init_data->{'override_ban_warn'} = 1;