diff options
author | ivan <ivan> | 2003-04-21 20:53:57 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-04-21 20:53:57 +0000 |
commit | 030bef17868168b05a67d9f5866b55da1bb9439c (patch) | |
tree | afb0ca6f648985fe710dc07b87ab5008a55c2a0b /FS/FS | |
parent | 6eedae5614eee808d0e0c4b9d9b3fe7d1217b776 (diff) |
on-demand vs. automatic cards & checks: added DCRD and DCHK payment types
Diffstat (limited to 'FS/FS')
-rw-r--r-- | FS/FS/Conf.pm | 4 | ||||
-rw-r--r-- | FS/FS/cust_main.pm | 17 | ||||
-rw-r--r-- | FS/FS/part_bill_event.pm | 4 |
3 files changed, 14 insertions, 11 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index cb404ff..5681dde 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -905,7 +905,7 @@ httemplate/docs/config.html 'section' => '', 'description' => 'Acceptable payment types for the signup server', 'type' => 'selectmultiple', - 'select_enum' => [ qw(CARD CHEK LECB PREPAY BILL COMP) ], + 'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB PREPAY BILL COMP) ], }, { @@ -1013,7 +1013,7 @@ httemplate/docs/config.html 'section' => 'UI', 'description' => 'Default payment type. HIDE disables display of billing information and sets customers to BILL.', 'type' => 'select', - 'select_enum' => [ '', qw(CARD CHEK LECB BILL COMP HIDE) ], + 'select_enum' => [ '', qw(CARD DCRD CHEK DCHK LECB BILL COMP HIDE) ], }, { diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index cde370c..cefc764 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -159,7 +159,7 @@ FS::Record. The following fields are currently supported: =item ship_fax - phone (optional) -=item payby - `CARD' (credit cards), `CHEK' (electronic check), `LECB' (Phone bill billing), `BILL' (billing), `COMP' (free), or `PREPAY' (special billing type: applies a credit - see L<FS::prepay_credit> and sets billing type to BILL) +=item payby - I<CARD> (credit card - automatic), I<DCRD> (credit card - on-demand), I<CHEK> (electronic check - automatic), I<DCHK> (electronic check - on-demand), I<LECB> (Phone bill billing), I<BILL> (billing), I<COMP> (free), or I<PREPAY> (special billing type: applies a credit - see L<FS::prepay_credit> and sets billing type to I<BILL>) =item payinfo - card number, P.O., comp issuer (4-8 lowercase alphanumerics; think username) or prepayment identifier (see L<FS::prepay_credit>) @@ -700,11 +700,11 @@ sub check { } } - $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP|PREPAY)$/ + $self->payby =~ /^(CARD|DCRD|CHEK|DCHK|LECB|BILL|COMP|PREPAY)$/ or return "Illegal payby: ". $self->payby; $self->payby($1); - if ( $self->payby eq 'CARD' ) { + if ( $self->payby eq 'CARD' || $self->payby eq 'DCRD' ) { my $payinfo = $self->payinfo; $payinfo =~ s/\D//g; @@ -717,7 +717,7 @@ sub check { return gettext('unknown_card_type') if cardtype($self->payinfo) eq "Unknown"; - } elsif ( $self->payby eq 'CHEK' ) { + } elsif ( $self->payby eq 'CHEK' || $self->payby eq 'DCHK' ) { my $payinfo = $self->payinfo; $payinfo =~ s/[^\d\@]//g; @@ -770,7 +770,9 @@ sub check { } if ( $self->payname eq '' && $self->payby ne 'CHEK' && - ( ! $conf->exists('require_cardname') || $self->payby ne 'CARD' ) ) { + ( ! $conf->exists('require_cardname') + || $self->payby !~ /^(CARD|DCRD)$/ ) + ) { $self->payname( $self->first. " ". $self->getfield('last') ); } else { $self->payname =~ /^([\w \,\.\-\']+)$/ @@ -1244,8 +1246,9 @@ sub bill { (Attempt to) collect money for this customer's outstanding invoices (see L<FS::cust_bill>). Usually used after the bill method. -Depending on the value of `payby', this may print an invoice (`BILL'), charge -a credit card (`CARD'), or just add any necessary (pseudo-)payment (`COMP'). +Depending on the value of `payby', this may print or email an invoice (I<BILL>, +I<DCRD>, or I<DCHK>), charge a credit card (I<CARD>), charge via electronic +check/ACH (I<CHEK>), or just add any necessary (pseudo-)payment (I<COMP>). Most actions are now triggered by invoice events; see L<FS::part_bill_event> and the invoice events web interface. diff --git a/FS/FS/part_bill_event.pm b/FS/FS/part_bill_event.pm index a75a011..e0e4f3f 100644 --- a/FS/FS/part_bill_event.pm +++ b/FS/FS/part_bill_event.pm @@ -37,7 +37,7 @@ FS::Record. The following fields are currently supported: =item eventpart - primary key -=item payby - CARD, CHEK, LECB, BILL, or COMP +=item payby - CARD, DCRD, CHEK, DCHK, LECB, BILL, or COMP =item event - event name @@ -140,7 +140,7 @@ sub check { } my $error = $self->ut_numbern('eventpart') - || $self->ut_enum('payby', [qw( CARD CHEK LECB BILL COMP )] ) + || $self->ut_enum('payby', [qw( CARD DCRD CHEK DCHK LECB BILL COMP )] ) || $self->ut_text('event') || $self->ut_anything('eventcode') || $self->ut_number('seconds') |