[freeside-commits] branch master updated. 6a89c38f9f9894e2f963b2dc08d587b83fd3350f

Ivan ivan at 420.am
Fri Apr 10 09:34:01 PDT 2015


The branch, master has been updated
       via  6a89c38f9f9894e2f963b2dc08d587b83fd3350f (commit)
       via  bc75a214c30ca0ae7554cc60d4f7754f5ea03366 (commit)
       via  ea12223d6a5241ff802a043a2b7c611038d3b355 (commit)
      from  94fefd033f726f9810bdaa905465af435d875a2f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6a89c38f9f9894e2f963b2dc08d587b83fd3350f
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Apr 10 09:33:59 2015 -0700

    new_customer_minimal accepts address, & doc it, RT#34084

diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm
index 9d0bcf3..174883a 100644
--- a/FS/FS/ClientAPI/Signup.pm
+++ b/FS/FS/ClientAPI/Signup.pm
@@ -941,6 +941,16 @@ sub new_customer_minimal {
 
   } );
 
+  if ( grep length($packet->{$_}), FS::cust_main->location_fields ) {
+    my $bill_hash;
+    foreach my $f (FS::cust_main->location_fields) {
+      $bill_hash->{$f} =  $packet->{$f};
+    }
+    my $bill_location = FS::cust_location->new($bill_hash);
+    $cust_main->set('bill_location' => $bill_location);
+    $cust_main->set('ship_location' => $bill_location);
+  }
+
   my @invoicing_list = $packet->{'invoicing_list'}
                          ? split( /\s*\,\s*/, $packet->{'invoicing_list'} )
                          : ();
diff --git a/fs_selfservice/FS-SelfService/SelfService.pm b/fs_selfservice/FS-SelfService/SelfService.pm
index 12ffbb0..c481372 100644
--- a/fs_selfservice/FS-SelfService/SelfService.pm
+++ b/fs_selfservice/FS-SelfService/SelfService.pm
@@ -256,7 +256,7 @@ FS::SelfService - Freeside self-service API
   #!!! cancel_pkg example
 
   # signup functionality
-  use FS::SelfService qw( signup_info new_customer );
+  use FS::SelfService qw( signup_info new_customer new_customer_minimal );
 
   my $signup_info = signup_info;
 
@@ -1260,6 +1260,147 @@ Default country
 
 =back
 
+=item new_customer_minimal HASHREF
+
+Creates a new customer.
+
+Current differences from new_customer: An address is not required.  promo_code
+and reg_code are not supported.  If invoicing_list and _password is passed, a
+contact will be created with self-service access (no pkgpart or username is
+necessary).  No initial billing is run (this may change in a future version).
+
+Takes a hash reference as parameter with the following keys:
+
+=over 4
+
+=item first
+
+first name (required)
+
+=item last
+
+last name (required)
+
+=item ss
+
+(not typically collected; mostly used for ACH transactions)
+
+=item company
+
+Company name
+
+=item address1
+
+Address line one
+
+=item address2
+
+Address line two
+
+=item city
+
+City
+
+=item county
+
+County
+
+=item state
+
+State
+
+=item zip
+
+Zip or postal code
+
+=item daytime
+
+Daytime phone number
+
+=item night
+
+Evening phone number
+
+=item fax
+
+Fax number
+
+=item payby
+
+CARD, DCRD, CHEK, DCHK, LECB, BILL, COMP or PREPAY (see L</signup_info> (required)
+
+=item payinfo
+
+Card number for CARD/DCRD, account_number at aba_number for CHEK/DCHK, prepaid "pin" for PREPAY, purchase order number for BILL
+
+=item paycvv
+
+Credit card CVV2 number (1.5+ or 1.4.2 with CVV schema patch)
+
+=item paydate
+
+Expiration date for CARD/DCRD
+
+=item payname
+
+Exact name on credit card for CARD/DCRD, bank name for CHEK/DCHK
+
+=item invoicing_list
+
+comma-separated list of email addresses for email invoices.  The special value 'POST' is used to designate postal invoicing (it may be specified alone or in addition to email addresses),
+
+=item referral_custnum
+
+referring customer number
+
+=item agentnum
+
+Agent number
+
+=item pkgpart
+
+pkgpart of initial package
+
+=item username
+
+Username
+
+=item _password
+
+Password
+
+=item sec_phrase
+
+Security phrase
+
+=item popnum
+
+Access number (index, not the literal number)
+
+=item countrycode
+
+Country code (to be provisioned as a service)
+
+=item phonenum
+
+Phone number (to be provisioned as a service)
+
+=item pin
+
+Voicemail PIN
+
+=back
+
+Returns a hash reference with the following keys:
+
+=over 4
+
+=item error
+
+Empty on success, or an error message on errors.  The special error '_decline' is returned for declined transactions; other error messages should be suitable for display to the user (and are customizable in under Configuration | View/Edit message catalog)
+
+=back
+
 =item new_customer HASHREF
 
 Creates a new customer.  Takes a hash reference as parameter with the

commit bc75a214c30ca0ae7554cc60d4f7754f5ea03366
Merge: ea12223 94fefd0
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Apr 10 09:33:56 2015 -0700

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


commit ea12223d6a5241ff802a043a2b7c611038d3b355
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Apr 7 12:19:40 2015 -0700

    multiple payment options, RT#23741

diff --git a/FS/FS/payby.pm b/FS/FS/payby.pm
index a3c9807..443a130 100644
--- a/FS/FS/payby.pm
+++ b/FS/FS/payby.pm
@@ -68,6 +68,13 @@ tie %hash, 'Tie::IxHash',
     cust_pay  => 'CHEK', #this is a customer type only, payments are CHEK...
     realtime  => 1,
   },
+  'BILL' => {
+    tinyname  => 'billing',
+    shortname => 'Billing',
+    payname   => 'Check',
+    longname  => 'Billing',
+    cust_main => '', #no longer a customer type
+  },
   'PPAL' => {
     tinyname  => 'PayPal',
     shortname => 'PayPal',
@@ -79,43 +86,43 @@ tie %hash, 'Tie::IxHash',
     tinyname  => 'prepaid card',
     shortname => 'Prepaid card',
     longname  => 'Prepaid card',
-    cust_main => 'BILL', #this is a payment type only, customers go to BILL...
+    cust_main => '', #this is a payment type only
   },
   'CASH' => {
     tinyname  => 'cash',
     shortname => 'Cash', # initial payment, then billing
     longname  => 'Cash',
-    cust_main => 'BILL', #this is a payment type only, customers go to BILL...
+    cust_main => '', #this is a payment type only
   },
   'WEST' => {
     tinyname  => 'western union',
     shortname => 'Western Union', # initial payment, then billing
     longname  => 'Western Union',
-    cust_main => 'BILL', #this is a payment type only, customers go to BILL...
+    cust_main => '', #this is a payment type only
   },
   'MCRD' => { #not the same as DCRD
     tinyname  => 'card',
     shortname => 'Manual credit card', # initial payment, then billing
     longname  => 'Manual credit card', 
-    cust_main => 'BILL', #this is a payment type only, customers go to BILL...
+    cust_main => '', #this is a payment type only
   },
   'MCHK' => { #not the same as DCHK
     tinyname  => 'card',
     shortname => 'Manual electronic check', # initial payment, then billing
     longname  => 'Manual electronic check', 
-    cust_main => 'BILL', #this is a payment type only, customers go to BILL...
+    cust_main => '', #this is a payment type only
   },
   'APPL' => {
     tinyname  => 'apple store',
     shortname => 'Apple Store',
     longname  => 'Apple Store',
-    cust_main => 'BILL', #this is a payment type only, customers go to BILL...
+    cust_main => '', #this is a payment type only
   },
   'ANRD' => {
     tinyname  => 'android market',
     shortname => 'Android Market',
     longname  => 'Android Market',
-    cust_main => 'BILL', #this is a payment type only, customers go to BILL...
+    cust_main => '', #this is a payment type only
   },
   'EDI' => {
     tinyname  => 'EDI',

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/ClientAPI/Signup.pm                    |   10 ++
 FS/FS/payby.pm                               |   21 ++--
 fs_selfservice/FS-SelfService/SelfService.pm |  143 +++++++++++++++++++++++++-
 3 files changed, 166 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list