'reset_passwd' => 'MyAccount/reset_passwd',
'check_reset_passwd' => 'MyAccount/check_reset_passwd',
'process_reset_passwd' => 'MyAccount/process_reset_passwd',
+ 'list_tickets' => 'MyAccount/list_tickets',
'create_ticket' => 'MyAccount/create_ticket',
'get_ticket' => 'MyAccount/get_ticket',
'adjust_ticket_priority' => 'MyAccount/adjust_ticket_priority',
'call_time' => 'PrepaidPhone/call_time',
'call_time_nanpa' => 'PrepaidPhone/call_time_nanpa',
'phonenum_balance' => 'PrepaidPhone/phonenum_balance',
+
+ 'start_thirdparty' => 'MyAccount/start_thirdparty',
+ 'finish_thirdparty' => 'MyAccount/finish_thirdparty',
);
@EXPORT_OK = (
keys(%autoload),
# "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@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 } );
=item passwd
+Changes the password for an existing user in svc_acct. Takes a hash
+reference with the following keys:
+
+=over 4
+
+=item username
+
+Username of the account (required)
+
+=item domain
+
+Domain of the account (required)
+
+=item old_password
+
+Old password (required)
+
+=item new_password
+
+New password (required)
+
+=item new_gecos
+
+New gecos
+
+=item new_shell
+
+New Shell
+
+=back
+
=item chfn
=item chsh
=over 4
+=item email
+
+Email address (username@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
Package to order (see L<FS::part_pkg>).
+=item quantity
+
+Quantity for this package order (default 1).
+
+=item locationnum
+
+Optional locationnum for this package order, for existing locations.
+
+Or, for new locations, pass the following fields: address1*, address2, city*,
+county, state*, zip*, country. (* = required in this case)
+
+=item address1
+
+=item address 2
+
+=item city
+
+=item
+
=item svcpart
Service to order (see L<FS::part_svc>).
New package to order (see L<FS::part_pkg>).
+=item quantity
+
+Quantity for this package order (default 1).
+
=back
Returns a hash reference with the following keys:
'<INPUT TYPE="hidden" NAME="domsvc" VALUE="'. $key. '"></TD></TR>'
}
- my $text .= qq!<TR><TD ALIGN="right">Domain</TD><TD><SELECT NAME="domsvc" SIZE=1 STYLE="width: 20em"><OPTION>(Choose Domain)!;
+ my $text .= qq!<TR><TD ALIGN="right">Domain</TD><TD><SELECT NAME="domsvc" SIZE=1 STYLE="width: 20em">!;
+ $text .= '<OPTION>(Choose Domain)' unless $domsvc;
foreach my $domain ( sort { $domains->{$a} cmp $domains->{$b} } keys %$domains ) {
$text .= qq!<OPTION VALUE="!. $domain. '"'.