X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpayby.pm;h=e223a050feea1883de5c116a8fa26bc02fceca2b;hb=a1a0800de7c69fe5ee414b79e408ceacd4a1c2c3;hp=b54e5d93852246f5f3a14f9032f9d0f3b330f2fa;hpb=46a7257273fdae101658c8a1ee74f654ca0876b5;p=freeside.git diff --git a/FS/FS/payby.pm b/FS/FS/payby.pm index b54e5d938..e223a050f 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', @@ -77,6 +82,13 @@ tie %hash, 'Tie::IxHash', payname => 'Check', longname => 'Billing', }, + 'PPAL' => { + tinyname => 'PayPal', + shortname => 'PayPal', + longname => 'PayPal', + cust_main => '', #not yet a customer type, but could be once we can do + # invoice presentment via paypal + }, 'PREP' => { tinyname => 'prepaid card', shortname => 'Prepaid card', @@ -101,6 +113,30 @@ tie %hash, 'Tie::IxHash', longname => 'Manual credit card', cust_main => 'BILL', #this is a payment type only, customers go to BILL... }, + 'APPL' => { + tinyname => 'apple store', + shortname => 'Apple Store', + longname => 'Apple Store', + cust_main => 'BILL', #this is a payment type only, customers go to BILL... + }, + 'ANRD' => { + tinyname => 'android market', + shortname => 'Android Market', + longname => 'Android Market', + cust_main => 'BILL', #this is a payment type only, customers go to BILL... + }, + 'EDI' => { + tinyname => 'EDI', + shortname => 'Electronic Debit', + longname => 'Electronic Debit', + cust_main => '', #not a customer type + }, + 'WIRE' => { + tinyname => 'Wire', + shortname => 'Wire transfer', + longname => 'Wire transfer', + cust_main => '', #not a customer type + }, 'COMP' => { tinyname => 'comp', shortname => 'Complimentary', @@ -131,6 +167,20 @@ 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 payby2shortname { + my $self = shift; + map { $_ => $hash{$_}->{shortname} } $self->payby; +} + sub payby2longname { my $self = shift; map { $_ => $hash{$_}->{longname} } $self->payby; @@ -157,6 +207,8 @@ sub longname { %payby2bop = ( 'CARD' => 'CC', 'CHEK' => 'ECHECK', + 'MCRD' => 'CC', + 'PPAL' => 'PAYPAL', ); sub payby2bop {