wordpress plugin, RT#75279
[freeside.git] / fs_selfservice / wordpress / example_selfservice.php
1 <?php
2
3 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
4
5 $freeside = new FreesideSelfService();
6
7 error_log( "COOKIE: ". $_COOKIE['freeside_session_id'] );
8 error_log( "COOKIE: ". $GLOBALS['FREESIDE_SESSION_ID'] );
9
10 $customer_info = $freeside->customer_info_short( array(
11   'session_id' => $_COOKIE['freeside_session_id'],
12 ) );
13
14
15 if ( isset($customer_info['error']) && $customer_info['error'] ) {
16   $error = $customer_info['error'];
17   wp_redirect('example_login.php?freeside_error='. urlencode($error));
18   die();
19 }
20
21 extract($customer_info);
22
23 get_header();
24
25 error_log( "COOKIE: ". $_COOKIE['freeside_session_id'] );
26
27 ?>
28
29 <h3>Billing</h3>
30
31 <p><big><strong>Name</strong></big></p>
32 <p><?php echo htmlspecialchars($name); ?></p>
33
34 <?php if ( $signupdate_pretty ) { ?>
35   <p><big><strong>Signup Date</strong></big></p>
36   <p><?php echo htmlspecialchars($signupdate_pretty); ?></p>
37 <?php } ?>
38
39 <p><big><strong>Username</strong></big></p>
40 <p>me@gmail.com</p>
41
42 <p><big><strong>Account Number</strong></big></p>
43 <p><?php echo $display_custnum ?></p>
44
45 <p><big><strong>Address</strong></big></p>
46 <address>
47 Box 564, Disneyland<br>
48 USA
49 </address>
50
51 <p><big><strong>Email Address</strong></big></p>
52 <p>me@gmail.com</p>
53
54 <br>
55 <br>
56 <br>
57 <p><big><strong>Total Balance</strong></big></p>
58 <h4><?php echo $balance_pretty ?></h4>
59
60 <br>
61 <br>
62 <br>
63 <p><big><strong> <font color="  #4682B4">View my Bill</strong></big></font></p>
64 <p><big><strong> <font color="#4682B4">Change Bill Deliver Options</strong></big></font></p>
65
66
67
68 <h3>Services</h3>
69
70 <h4><font color="#4682B4"> <i class="fa fa-laptop"> </i> </font> Internet </h4>
71 <h4><font color="#4682B4"> <i class="fa fa-volume-control-phone"> </i> </font>   Voice </h4>
72
73
74 <?php echo $announcement ?>
75
76 <!--
77 your open invoices if you have any & payment link if you have one.  more insistant if you're late?
78 <BR><BR>
79
80 your tickets.  some notification if there's new responses since your last login 
81 <BR><BR>
82
83 anything else?
84 -->
85
86
87 <?php get_footer(); ?>