diff options
author | jeff <jeff> | 2009-03-10 16:14:11 +0000 |
---|---|---|
committer | jeff <jeff> | 2009-03-10 16:14:11 +0000 |
commit | 32db3ad86bcf04e4f34705a396b718061d333f20 (patch) | |
tree | 1c64247c48327cb36d3bf7cbee466a655917fea4 /FS/FS/payby.pm | |
parent | 200171841941972b3305cf8be8ef367a1a363e93 (diff) |
merge webpay support in with autoselection of old realtime_bop and realtime_refund_bop
Diffstat (limited to 'FS/FS/payby.pm')
-rw-r--r-- | FS/FS/payby.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/FS/FS/payby.pm b/FS/FS/payby.pm index b54e5d938..30a03ddfe 100644 --- a/FS/FS/payby.pm +++ b/FS/FS/payby.pm @@ -48,28 +48,33 @@ tie %hash, 'Tie::IxHash', tinyname => 'card', shortname => 'Credit card', longname => 'Credit card (automatic)', + realtime => 1, }, 'DCRD' => { tinyname => 'card', shortname => 'Credit card', longname => 'Credit card (on-demand)', cust_pay => 'CARD', #this is a customer type only, payments are CARD... + realtime => 1, }, 'CHEK' => { tinyname => 'check', shortname => 'Electronic check', longname => 'Electronic check (automatic)', + realtime => 1, }, 'DCHK' => { tinyname => 'check', shortname => 'Electronic check', longname => 'Electronic check (on-demand)', cust_pay => 'CHEK', #this is a customer type only, payments are CHEK... + realtime => 1, }, 'LECB' => { tinyname => 'phone bill', shortname => 'Phone bill billing', longname => 'Phone bill billing', + realtime => 1, }, 'BILL' => { tinyname => 'billing', @@ -131,6 +136,15 @@ sub can_payby { return 1; } +sub realtime { # can use realtime payment facilities + my( $self, $payby ) = @_; + + return 0 unless $hash{$payby}; + return 0 unless exists( $hash{$payby}->{realtime} ); + + return $hash{$payby}->{realtime}; +} + sub payby2longname { my $self = shift; map { $_ => $hash{$_}->{longname} } $self->payby; @@ -157,6 +171,7 @@ sub longname { %payby2bop = ( 'CARD' => 'CC', 'CHEK' => 'ECHECK', + 'MCRD' => 'CC', ); sub payby2bop { |