changes to support PayPal, #22395
[freeside.git] / FS / FS / payby.pm
index bee787c..e223a05 100644 (file)
@@ -82,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',
@@ -124,6 +131,12 @@ tie %hash, 'Tie::IxHash',
     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',
@@ -163,6 +176,11 @@ sub realtime {  # can use realtime payment facilities
   return $hash{$payby}->{realtime};
 }
 
+sub payby2shortname {
+  my $self = shift;
+  map { $_ => $hash{$_}->{shortname} } $self->payby;
+}
+
 sub payby2longname {
   my $self = shift;
   map { $_ => $hash{$_}->{longname} } $self->payby;
@@ -190,6 +208,7 @@ sub longname {
   'CARD' => 'CC',
   'CHEK' => 'ECHECK',
   'MCRD' => 'CC',
+  'PPAL' => 'PAYPAL',
 );
 
 sub payby2bop {