RT# 82949 - changes section name from fees to pricing, better opiton
[freeside.git] / fs_selfservice / wordpress / view_invoice.php
1 <?php
2
3 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
4
5 $freeside = new FreesideSelfService();
6
7 $invoice_info = $freeside->invoice( array(
8   'session_id' => $_COOKIE['freeside_session_id'],
9   'invnum'     => $_REQUEST['invnum'],
10 ) );
11
12
13 if ( isset($invoice_info['error']) && $invoice_info['error'] ) {
14   $error = $invoice_info['error'];
15   wp_redirect('example_login.php?freeside_error='. urlencode($error));
16   die();
17 }
18
19 extract($invoice_info);
20
21 //if we don't need multi-company logo support, this is probably easier than
22 // calling invoice_logo()
23 $invoice_html = preg_replace( '/cust_bill-logo\.cgi\?invnum=\d+;template=/',
24                               'mylogo.png?',
25                               $invoice_html
26                             );
27
28 get_header();
29
30 ?>
31
32 <h3>Invoice</h3>
33
34 <?php echo $invoice_html ?>
35
36 <?php get_footer(); ?>
37