diff options
author | Mark Wells <mark@freeside.biz> | 2013-07-24 12:56:21 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-07-24 12:56:21 -0700 |
commit | 72891d1753adf47e0318049c19a501c89c24f0cd (patch) | |
tree | 7a916e5f16fec822bf3bc53dbc1cfa664292e07f /ng_selfservice/payment_paypal.php | |
parent | 35f3cb28e5d3fee1bc1a892acb9cc2d90f55d365 (diff) |
NG selfservice webpay interface, #23579
Diffstat (limited to 'ng_selfservice/payment_paypal.php')
-rw-r--r-- | ng_selfservice/payment_paypal.php | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/ng_selfservice/payment_paypal.php b/ng_selfservice/payment_paypal.php index a2260890a..feb852dec 100644 --- a/ng_selfservice/payment_paypal.php +++ b/ng_selfservice/payment_paypal.php @@ -1,5 +1,41 @@ <? $title ='PayPal Payment'; include('elements/header.php'); ?> <? $current_menu = 'payment_paypal.php'; include('elements/menu.php'); ?> -PayPal payment +<? +if ( isset($_POST['amount']) && $_POST['amount'] ) { + + $payment_results = $freeside->start_thirdparty(array( + 'session_id' => $_COOKIE['session_id'], + 'method' => 'PAYPAL', + 'amount' => $_POST['amount'], + )); + + include('elements/post_thirdparty.php'); + +} else { + + $payment_info = $freeside->payment_info( array( + 'session_id' => $_COOKIE['session_id'], + ) ); + + $tr_amount_fee = $freeside->mason_comp(array( + 'session_id' => $_COOKIE['session_id'], + 'comp' => '/elements/tr-amount_fee.html', + 'args' => [ 'amount', $payment_info['balance'] ], + )); + $tr_amount_fee = $tr_amount_fee['output']; + + include('elements/error.php'); ?> +<FORM NAME="OneTrueForm" METHOD="POST" ACTION="payment_paypal.php"> + <TABLE> + <TR> + <TD ALIGN="right">Amount Due</TD> + <TD>$<? echo sprintf('%.2f', $payment_info['balance']); ?></TD> + </TR> + <? echo $tr_amount_fee; ?> + </TABLE> + <BR> + <INPUT TYPE="submit" NAME="process" VALUE="Start payment"> +</FORM> +<? } ?> <? include('elements/menu_footer.php'); ?> <? include('elements/footer.php'); ?> |