[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.88, 1.89
Ivan,,,
ivan at wavetail.420.am
Thu Jul 30 02:19:23 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv6831/FS/FS/ClientAPI
Modified Files:
MyAccount.pm
Log Message:
pass a pkgnum from self-service if applicable, RT#4339
Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- MyAccount.pm 13 Jul 2009 09:19:02 -0000 1.88
+++ MyAccount.pm 30 Jul 2009 09:19:20 -0000 1.89
@@ -128,6 +128,8 @@
if ( $cust_pkg ) {
my $cust_main = $cust_pkg->cust_main;
$session->{'custnum'} = $cust_main->custnum;
+ $session->{'pkgnum'} = $cust_pkg->pkgnum
+ if $conf->exists('pkg-balances');
}
my $session_id;
@@ -518,6 +520,7 @@
'payname' => $payname,
'paybatch' => $paybatch, #this doesn't actually do anything
'paycvv' => $paycvv,
+ 'pkgnum' => $session->{'pkgnum'},
map { $_ => $p->{$_} } @{ $payby2fields{$payby} }
);
return { 'error' => $error } if $error;
@@ -560,9 +563,11 @@
my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
or return { 'error' => "unknown custnum $custnum" };
- my $error = $cust_main->realtime_collect( 'method' => $p->{'method'},
- 'session_id' => $p->{'session_id'},
- );
+ my $error = $cust_main->realtime_collect(
+ 'method' => $p->{'method'},
+ 'pkgnum' => $session->{'pkgnum'},
+ 'session_id' => $p->{'session_id'},
+ );
return { 'error' => $error } unless ref( $error );
return { 'error' => '', amount => $cust_main->balance, %$error };
More information about the freeside-commits
mailing list