projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 39340 - Created minimal selfservice that only allows payments to be made, authori...
[freeside.git]
/
FS
/
FS
/
ClientAPI
/
MyAccount.pm
diff --git
a/FS/FS/ClientAPI/MyAccount.pm
b/FS/FS/ClientAPI/MyAccount.pm
index
0bf594f
..
8c8cfc2
100644
(file)
--- a/
FS/FS/ClientAPI/MyAccount.pm
+++ b/
FS/FS/ClientAPI/MyAccount.pm
@@
-151,7
+151,6
@@
sub skin_info {
personal.php Profile
personal.php Personal Information
personal.php Profile
personal.php Personal Information
- payment_accounts.php Payment Accounts
password.php Change Password
payment.php Payments
password.php Change Password
payment.php Payments
@@
-237,6
+236,13
@@
sub login {
$svc_x = $svc_phone;
$svc_x = $svc_phone;
+ } elsif ( $p->{'domain'} eq 'ip_mac' ) {
+
+ my $svc_broadband = qsearchs( 'svc_broadband', { 'mac_addr' => $p->{'username'} } );
+ return { error => 'IP address not found' }
+ unless $svc_broadband;
+ $svc_x = $svc_broadband;
+
} elsif ( $p->{email}
&& (my $contact = FS::contact->by_selfservice_email($p->{email}))
)
} elsif ( $p->{email}
&& (my $contact = FS::contact->by_selfservice_email($p->{email}))
)
@@
-601,6
+607,8
@@
sub customer_info_short {
for (@cust_main_editable_fields) {
$return{$_} = $cust_main->get($_);
}
for (@cust_main_editable_fields) {
$return{$_} = $cust_main->get($_);
}
+ $return{$_} = $cust_main->masked($_) for qw/ss stateid/;
+
#maybe a little more expensive, but it should be cached by now
for (@location_editable_fields) {
$return{$_} = $cust_main->bill_location->get($_);
#maybe a little more expensive, but it should be cached by now
for (@location_editable_fields) {
$return{$_} = $cust_main->bill_location->get($_);
@@
-724,7
+732,7
@@
sub edit_info {
or return { 'error' => "unknown custnum $custnum" };
my $conf = new FS::Conf;
or return { 'error' => "unknown custnum $custnum" };
my $conf = new FS::Conf;
- if (($p->{payby} eq "CHEK" || $p->{payby} eq "DCH
E
K") && $conf->exists('selfservice-ACH_info_readonly')) {
+ if (($p->{payby} eq "CHEK" || $p->{payby} eq "DCHK") && $conf->exists('selfservice-ACH_info_readonly')) {
return { 'error' => "You do not have authority to add a bank account" };
}
return { 'error' => "You do not have authority to add a bank account" };
}
@@
-936,6
+944,7
@@
sub payment_info {
$return{paybatch} = $return{payunique}; #back compat
$return{credit_card_surcharge_percentage} = $conf->config('credit-card-surcharge-percentage', $cust_main->agentnum);
$return{paybatch} = $return{payunique}; #back compat
$return{credit_card_surcharge_percentage} = $conf->config('credit-card-surcharge-percentage', $cust_main->agentnum);
+ $return{credit_card_surcharge_flatfee} = $conf->config('credit-card-surcharge-flatfee', $cust_main->agentnum);
return { 'error' => '',
%return,
return { 'error' => '',
%return,
@@
-1017,13
+1026,10
@@
sub validate_payment {
if $cust_main->paymask eq $payinfo;
my $achonfile = 0;
if $cust_main->paymask eq $payinfo;
my $achonfile = 0;
- foreach my $cust_payby ($cust_main->cust_payby('CHEK','DCHK')) {
- if ( $cust_payby->paymask eq $payinfo ) {
- $payinfo = $cust_payby->payinfo;
+ if ( $cust_main->paymask eq $payinfo ) {
+ $payinfo = $cust_main->payinfo;
$achonfile = 1;
$achonfile = 1;
- last;
}
}
- }
if ($conf->exists('selfservice-ACH_info_readonly') && !$achonfile) {
return { 'error' => "You are not allowed to change your payment information." };
if ($conf->exists('selfservice-ACH_info_readonly') && !$achonfile) {
return { 'error' => "You are not allowed to change your payment information." };
@@
-3883,4
+3889,3
@@
sub _custoragent_session_custnum {
}
1;
}
1;
-