Revert "RT# 39340 - fixed skin_info caching issue"
[freeside.git] / ng_selfservice / payment_paypal.php
1 <? $title ='PayPal Payment'; include('elements/header.php'); ?>
2 <? $current_menu = 'payment_paypal.php'; include('elements/menu.php'); ?>
3 <?
4 if ( isset($_POST['amount']) && $_POST['amount'] ) {
5
6   $payment_results = $freeside->start_thirdparty(array(
7     'session_id'  => $_COOKIE['session_id'],
8     'method'      => 'PAYPAL',
9     'amount'      => $_POST['amount'],
10   ));
11
12   include('elements/post_thirdparty.php');
13
14 } else {
15
16   $payment_info = $freeside->payment_info( array(
17     'session_id' => $_COOKIE['session_id'],
18   ) );
19
20   $tr_amount_fee = $freeside->mason_comp(array(
21     'session_id'  => $_COOKIE['session_id'],
22     'comp'        => '/elements/tr-amount_fee.html',
23     'args'        => [ 'amount', $payment_info['balance'] ],
24   ));
25   $tr_amount_fee = $tr_amount_fee['output'];
26
27   include('elements/error.php'); ?>
28 <FORM NAME="OneTrueForm" METHOD="POST" ACTION="payment_paypal.php">
29   <TABLE>
30   <TR>
31     <TD ALIGN="right">Amount&nbsp;Due</TD>
32     <TD>$<? echo sprintf('%.2f', $payment_info['balance']); ?></TD>
33   </TR>
34   <? echo $tr_amount_fee; ?>
35   </TABLE>
36   <BR>
37   <INPUT TYPE="submit" NAME="process" VALUE="Start payment">
38 </FORM>
39 <? } ?>
40 <? include('elements/menu_footer.php'); ?>
41 <? include('elements/footer.php'); ?>