[freeside-commits] branch master updated. 467dfa2d10e8e54bb162554c8f11dca65ec5b565
Ivan
ivan at 420.am
Sun Feb 22 17:11:02 PST 2015
The branch, master has been updated
via 467dfa2d10e8e54bb162554c8f11dca65ec5b565 (commit)
from 7f30c88ec340acb697c4dad7582945e25d4b5d0f (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 467dfa2d10e8e54bb162554c8f11dca65ec5b565
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sun Feb 22 17:11:01 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 0f78080..db9f5fa 100644
--- a/fs_selfservice/FS-SelfService/SelfService.pm
+++ b/fs_selfservice/FS-SelfService/SelfService.pm
@@ -203,17 +203,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 } );
@@ -310,6 +336,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