summaryrefslogtreecommitdiff
path: root/fs_selfservice/wordpress/view_invoice.php
blob: 6f854b0950ec0e2de099baac4c76e89af08bd046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php

require( dirname( __FILE__ ) . '/wp-blog-header.php' );

$freeside = new FreesideSelfService();

$invoice_info = $freeside->invoice( array(
  'session_id' => $_COOKIE['freeside_session_id'],
  'invnum'     => $_REQUEST['invnum'],
) );


if ( isset($invoice_info['error']) && $invoice_info['error'] ) {
  $error = $invoice_info['error'];
  wp_redirect('example_login.php?freeside_error='. urlencode($error));
  die();
}

extract($invoice_info);

//if we don't need multi-company logo support, this is probably easier than
// calling invoice_logo()
$invoice_html = preg_replace( '/cust_bill-logo\.cgi\?invnum=\d+;template=/',
                              'mylogo.png?',
                              $invoice_html
                            );

get_header();

?>

<h3>Invoice</h3>

<?php echo $invoice_html ?>

<?php get_footer(); ?>