From 72891d1753adf47e0318049c19a501c89c24f0cd Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 24 Jul 2013 12:56:21 -0700 Subject: NG selfservice webpay interface, #23579 --- ng_selfservice/elements/post_thirdparty.php | 29 ++++++++++++++++++++++ ng_selfservice/payment_finish.php | 34 ++++++++++++++++++++++++++ ng_selfservice/payment_paypal.php | 38 ++++++++++++++++++++++++++++- ng_selfservice/payment_webpay.php | 38 ++++++++++++++++++++++++++++- 4 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 ng_selfservice/elements/post_thirdparty.php create mode 100644 ng_selfservice/payment_finish.php (limited to 'ng_selfservice') diff --git a/ng_selfservice/elements/post_thirdparty.php b/ng_selfservice/elements/post_thirdparty.php new file mode 100644 index 000000000..a543be93a --- /dev/null +++ b/ng_selfservice/elements/post_thirdparty.php @@ -0,0 +1,29 @@ + +

Redirecting to payment processor...

+
+
+ $value) { + echo("\n"); + } +} ?> + +
+
+ + diff --git a/ng_selfservice/payment_finish.php b/ng_selfservice/payment_finish.php new file mode 100644 index 000000000..413f497a3 --- /dev/null +++ b/ng_selfservice/payment_finish.php @@ -0,0 +1,34 @@ + + +finish_thirdparty($params); + + if ( isset($payment_results['error']) ) { + $error = $payment_results['error']; + include('elements/error.php'); + } else { +?> + + + + + + + + + + + + + + + + + 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 @@ -PayPal payment +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'); ?> + +
Your payment details
Payment #
Payment amount + $ +
Processing # +
+ + + + + +
Amount Due$
+
+ + + diff --git a/ng_selfservice/payment_webpay.php b/ng_selfservice/payment_webpay.php index 638761d1a..ff82078b5 100644 --- a/ng_selfservice/payment_webpay.php +++ b/ng_selfservice/payment_webpay.php @@ -1,5 +1,41 @@ -Webpay +start_thirdparty(array( + 'session_id' => $_COOKIE['session_id'], + 'method' => 'CC', + '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'); ?> +
+ + + + + + +
Amount Due$
+
+ +
+ -- cgit v1.2.1