diff options
author | ivan <ivan> | 2008-03-18 06:43:50 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-03-18 06:43:50 +0000 |
commit | 1d8a7190cc0f73835dd218573bfda35d2a3619c4 (patch) | |
tree | 0025fc3c73d54589bb46080dcddc9f4f8473e963 /fs_selfservice | |
parent | 90af1e8e0f2cdb22db05b882f651d2840916df51 (diff) |
pre-show checkpoint. duct tape!
Diffstat (limited to 'fs_selfservice')
-rw-r--r-- | fs_selfservice/fri/modules/billing.module | 75 | ||||
-rw-r--r-- | fs_selfservice/fri/modules/dashboard.module | 11 | ||||
-rw-r--r-- | fs_selfservice/fri/modules/myaccount.module | 14 |
3 files changed, 95 insertions, 5 deletions
diff --git a/fs_selfservice/fri/modules/billing.module b/fs_selfservice/fri/modules/billing.module index 82c6fdca4..6ef16e57d 100644 --- a/fs_selfservice/fri/modules/billing.module +++ b/fs_selfservice/fri/modules/billing.module @@ -71,6 +71,69 @@ class billing { $freeside = new FreesideSelfService(); + + $fs_info = $freeside->customer_info( array( + 'session_id' => $_SESSION['freeside_session_id'], + ) ); + $error = $fs_info['error']; + if ( $error ) { + //$_SESSION['ari_error'] = _("Incorrect Username or Password"); + $_SESSION['ari_error'] = $error; #// XXX report as ari_error???! + } + + //$ret .= $fs_info['small_custview']; + //$ret .= '<BR>'; + + $ret .= 'Balance: <b>$'. $fs_info['balance']. '</b><BR><BR>'; + + if ( $fs_info['balance'] > 0 ) { + + #$ret .= '<B><A HREF="'. $_SESSION['ARI_ROOT']. + # '?m=billing&f=make_payment">Make a payment</A></B><BR><BR>'; + $ret .= '<B><A HREF="/selfservice/selfservice.cgi?session='. + $_SESSION['freeside_session_id']. + ';action=make_payment">Make a payment</A></B><BR><BR>'; + + } + + // XXX count() ??? + if ( count($fs_info['open_invoices']) ) { + + $ret .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'. + '<TR><TH BGCOLOR="#ff6666" COLSPAN=5>Open Invoices</TH></TR>'; + $link = '<A HREF="'. $_SESSION['ARI_ROOT']. + '?m=billing&f=view_invoice&invnum='; + + $col1 = "eeeeee"; + $col2 = "cccccc"; + $col = $col1; + + while ( $i = each($fs_info['open_invoices']) ) { + + $invoice = $i[value]; + + $td = '<TD BGCOLOR="#'. $col. '">'; + $a = $link. $invoice['invnum']. '">'; + $ret .= + "<TR>$td$a". 'Invoice #'. $invoice['invnum']. "</A></TD>$td</TD>". + "$td$a". $invoice['date']. "</A></TD>$td</TD>". + '<TD BGCOLOR="#'. $col. '" ALIGN="right">'. $a. '$'. $invoice['owed']. + '</A></TD>'. + '</TR>'; + + if ( $col == $col1 ) { + $col = $col2; + } else { + $col = $col1; + } + + } + + $ret .= '</TABLE><BR>'; + } else { + $ret .= 'You have no outstanding invoices.<BR><BR>'; + } + #$fs_info = $freeside->customer_info( array( # 'session_id' => $_SESSION['freeside_session_id'], #) ); @@ -80,10 +143,20 @@ class billing { # $_SESSION['ari_error'] = $error; #// XXX report as ari_error???! #} - $ret .= 'Billing goes here'; + // $ret .= 'Billing goes here'; // XXX navigate to make payment, view invoice, // & myaccount change payment info + $ret .= '<B><A HREF="/selfservice/selfservice.cgi?session='. + $_SESSION['freeside_session_id']. + ';action=make_payment">Make a credit card payment</A></B><BR><BR>'; + $ret .= '<B><A HREF="/selfservice/selfservice.cgi?session='. + $_SESSION['freeside_session_id']. + ';action=make_payment">Make an electronic check payment</A></B><BR><BR>'; + $ret .= '<B><A HREF="/selfservice/selfservice.cgi?session='. + $_SESSION['freeside_session_id']. + ';action=make_payment">Use a prepaid card</A></B><BR><BR>'; + return $ret; } diff --git a/fs_selfservice/fri/modules/dashboard.module b/fs_selfservice/fri/modules/dashboard.module index 910c132e0..62d6de46a 100644 --- a/fs_selfservice/fri/modules/dashboard.module +++ b/fs_selfservice/fri/modules/dashboard.module @@ -84,8 +84,11 @@ class dashboard { if ( $fs_info['balance'] > 0 ) { - $ret .= '<B><A HREF="'. $_SESSION['ARI_ROOT']. - '?m=billing&f=make_payment">Make a payment</A></B><BR><BR>'; + #$ret .= '<B><A HREF="'. $_SESSION['ARI_ROOT']. + # '?m=billing&f=make_payment">Make a payment</A></B><BR><BR>'; + $ret .= '<B><A HREF="/selfservice/selfservice.cgi?session='. + $_SESSION['freeside_session_id']. + ';action=make_payment">Make a payment</A></B><BR><BR>'; } @@ -127,8 +130,8 @@ class dashboard { $ret .= 'You have no outstanding invoices.<BR><BR>'; } - $ret .= 'Received calls (10)<br><br>'; - $ret .= 'Placed calls (10)'; + #$ret .= 'Received calls (10)<br><br>'; + #$ret .= 'Placed calls (10)'; // if ( @tickets ) { // $OUT .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'. diff --git a/fs_selfservice/fri/modules/myaccount.module b/fs_selfservice/fri/modules/myaccount.module index f7d96d799..6b7cb839b 100644 --- a/fs_selfservice/fri/modules/myaccount.module +++ b/fs_selfservice/fri/modules/myaccount.module @@ -85,7 +85,21 @@ class myaccount { $ret .= '<BR>'; + $ret .= '<B><A HREF="/selfservice/selfservice.cgi?session='. + $_SESSION['freeside_session_id']. + ';action=change_bill">Change billing address</A></B>'; + $ret .= ' | '; + + $ret .= '<B><A HREF="/selfservice/selfservice.cgi?session='. + $_SESSION['freeside_session_id']. + ';action=change_ship">Change service address</A></B>'; + + $ret .= '<BR><BR>'; + + $ret .= '<B><A HREF="/selfservice/selfservice.cgi?session='. + $_SESSION['freeside_session_id']. + ';action=change_pay">Change payment information</A></B><BR><BR>'; return $ret; } |