[freeside-commits] branch FREESIDE_3_BRANCH updated. c17a293de4655acfe58e1996f84f43be0ab896d7
Ivan
ivan at 420.am
Sun Feb 22 17:11:05 PST 2015
The branch, FREESIDE_3_BRANCH has been updated
via c17a293de4655acfe58e1996f84f43be0ab896d7 (commit)
from e9e20fd7440f6a33462270a271dab53f84bc420f (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 c17a293de4655acfe58e1996f84f43be0ab896d7
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sun Feb 22 17:11:03 2015 -0800
update self-service login docs, RT#33628
diff --git a/fs_selfservice/FS-SelfService/SelfService.pm b/fs_selfservice/FS-SelfService/SelfService.pm
index adbf32f..6301b65 100644
--- a/fs_selfservice/FS-SelfService/SelfService.pm
+++ b/fs_selfservice/FS-SelfService/SelfService.pm
@@ -201,17 +201,43 @@ FS::SelfService - Freeside self-service API
# "my account" functionality
use FS::SelfService qw( login customer_info invoice cancel payment_info process_payment );
+ #new-style login with an email address and password
+ # can also be used for svc_acct login, set $emailaddress to username at domain
+ my $rv = login ( { 'email' => $emailaddress,
+ 'password' => $password,
+ },
+ );
+ if ( $rv->{'error'} ) {
+ #handle login error...
+ } else {
+ #successful login
+ $session_id = $rv->{'session_id'};
+ }
+
+ #classic svc_acct-based login with separate username and password
my $rv = login( { 'username' => $username,
'domain' => $domain,
'password' => $password,
}
);
+ if ( $rv->{'error'} ) {
+ #handle login error...
+ } else {
+ #successful login
+ $session_id = $rv->{'session_id'};
+ }
+ #svc_phone login with phone number and PIN
+ my $rv = login( { 'username' => $phone_number,
+ 'domain' => 'svc_phone',
+ 'password' => $pin,
+ }
+ );
if ( $rv->{'error'} ) {
#handle login error...
} else {
#successful login
- my $session_id = $rv->{'session_id'};
+ $session_id = $rv->{'session_id'};
}
my $customer_info = customer_info( { 'session_id' => $session_id } );
@@ -308,6 +334,11 @@ following keys:
=over 4
+=item email
+
+Email address (username at domain), instead of username and domain. Required for
+contact-based self-service login, can also be used for svc_acct-based login.
+
=item username
Username
-----------------------------------------------------------------------
Summary of changes:
fs_selfservice/FS-SelfService/SelfService.pm | 33 +++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list