X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=ng_selfservice%2Fpayment_paypal.php;h=feb852dec95f3e414316098dcb90e9f24545803b;hb=313a3715952e448b9efda129597e83df514be4ec;hp=a2260890a0269d3fa8a014f292f862abe3426db3;hpb=3564f619654c5cbf22fc2acbe7eff0c08308e859;p=freeside.git 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'); ?> +
+ } ?> include('elements/menu_footer.php'); ?> include('elements/footer.php'); ?>