diff --git a/includes/modules/payment/novalnet/novalnet_extension.php b/includes/modules/payment/novalnet/novalnet_extension.php deleted file mode 100644 index 0c0d79b..0000000 --- a/includes/modules/payment/novalnet/novalnet_extension.php +++ /dev/null @@ -1,195 +0,0 @@ -'; - -// Prepare output based on suitable content components -if (defined('MODULE_PAYMENT_NOVALNET_STATUS') && MODULE_PAYMENT_NOVALNET_STATUS == 'True') { - $request = $_REQUEST; - $output = ''; - $output .= ''; - // Zero amount booking process - $order_total = $db->Execute("SELECT value FROM " . TABLE_ORDERS_TOTAL . " where class = 'ot_total' AND orders_id = " . zen_db_input($request['oID'])); - if ($transaction_details->fields['amount'] == 0 && - isset($payment_details['zero_amount_booking']) && - $transaction_details->fields['status'] == 'CONFIRMED' - ) { - $amount = round($order_total->fields['value'], 2) * 100; - $output .= '
'."\n"; - $output .= zen_draw_form('novalnet_book_amount', 'novalnet_extension_helper.php'); - $output .= $nn_html. ' | '; - $output .= ' | '; - $output .= ' |
'.MODULE_PAYMENT_NOVALNET_BOOK_AMT_TITLE . ' | '; - $output .= zen_draw_hidden_field('oID', $request['oID']); - $output .= zen_draw_hidden_field('nn_zero_amount_book_confirm', MODULE_PAYMENT_NOVALNET_PAYMENT_ZERO_AMOUNT_BOOK_CONFIRM); - $output .= zen_draw_hidden_field('nn_amount_error', MODULE_PAYMENT_NOVALNET_AMOUNT_ERROR_MESSAGE); - $output .= ''; - $output .= zen_draw_input_field('book_amount', $amount, 'id="book_amount" autocomplete="off" style="margin:0% 0% 0% 2%"') . MODULE_PAYMENT_NOVALNET_AMOUNT_EX . ' |
'.zen_draw_input_field('nn_book_confirm', html_entity_decode(MODULE_PAYMENT_NOVALNET_CONFIRM_TEXT), 'class="btn btn-primary" onclick="return refund_amount_validation();" style="float:left"', false, 'submit').' |
'."\n"; - $output .= ' | ||||||
';
- $instalment_status = [];
-
- foreach ($instalment_details as $key => $instalment_details_data) {
- array_push($instalment_status, $instalment_details_data['status']);
- }
-
- $nn_instalment_canceled = false;
- $nn_instacancel_remaining = 'style="display:block"';
- $nn_instacancel_allcycles = 'style="display:block"';
-
- if (in_array('Canceled', $instalment_status)) {
- $nn_instalment_canceled = true;
- } elseif (in_array('Refunded', $instalment_status)) {
- $nn_instacancel_remaining = 'style="display:block"';
- $nn_instacancel_allcycles = 'style="display:none"';
- } elseif (in_array('Paid', $instalment_status) && !empty($instalment_details_data['reference_tid'])) {
- $nn_instacancel_remaining = 'style="display:none"';
- $nn_instacancel_allcycles = 'style="display:block"';
- }
- if (in_array('Refunded', $instalment_status) && !empty($instalment_details_data['reference_tid'])) {
- $nn_instalment_canceled = true;
- }
-
- if ($nn_instalment_canceled == false) {
- $output .= '';
- }
-
- $foundConfirm = true;
- if (in_array('Refunded', $instalment_status)) {
- foreach ($instalment_status as $status) {
- if ($status === 'Paid') {
- $foundConfirm = true;
- }
- }
- if($foundConfirm == true){
- $nn_instacancel_allcycles = 'style="display:block"';
- }
- }
-
- if ($nn_instalment_canceled == true) {
- foreach ($instalment_status as $status) {
- if ($status === 'Paid') {
- $foundConfirm = true;
- }
- }
- if($foundConfirm == true){
- $output .= '';
- $nn_instacancel_remaining = 'style="display:none"';
- }
- }
-
- $output .= zen_draw_form('nn_instalment_cancel', 'novalnet_extension_helper.php');
- $output .= ' ' ;
- $output .= zen_draw_hidden_field('nn_insta_allcycles', MODULE_PAYMENT_NOVALNET_ALLCYCLES_ERROR_MESSAGE);
- $output .= zen_draw_hidden_field('nn_insta_remainingcycles', MODULE_PAYMENT_NOVALNET_REMAINING_CYCLES_ERROR_MESSAGE);
- $output .= zen_draw_hidden_field('oID', $request['oID']);
- $output .= zen_draw_input_field('nn_instacancel_remaincycles', html_entity_decode(MODULE_PAYMENT_NOVALNET_INSTALMENT_CANCEL_REMAINING_CYCLES), 'id="nn_instacancel_remaincycles" class="btn btn-primary" '.$nn_instacancel_remaining, false, 'submit')." ";
- $output .= zen_draw_input_field('nn_instacancel_allcycles', html_entity_decode(MODULE_PAYMENT_NOVALNET_INSTALMENT_CANCEL_ALLCYCLES), 'id="nn_instacancel_allcycles" class="btn btn-primary" '.$nn_instacancel_allcycles, false, 'submit');
- $output .= ' | ||||||
S.No | -'.MODULE_PAYMENT_NOVALNET_INSTALMENT_REFERENCE_BACKEND.' | -'.MODULE_PAYMENT_NOVALNET_INSTALMENT_AMOUNT_BACKEND.' | -'.MODULE_PAYMENT_NOVALNET_INSTALMENT_NEXT_DATE_BACKEND.' | -'.MODULE_PAYMENT_NOVALNET_INSTALMENT_STATUS_BACKEND.' | -'.MODULE_PAYMENT_NOVALNET_INSTALMENT_REFUND_BACKEND.' | - - -|
".$sno++." | -".(isset($instalment_details_data['reference_tid']) ? $instalment_details_data['reference_tid'] : '')." | -".$instalment_original_amount." | -".(isset($instalment_details_data['next_instalment_date']) && !empty(trim($instalment_details_data['next_instalment_date'])) && trim($instalment_details_data['next_instalment_date']) != "-" ? NovalnetHelper::format_date( $instalment_details_data['next_instalment_date']) : ''). - " | $status | -".$href." | "; - $nn_instalment_table .= ''.zen_draw_form('nn_refund_confirm', 'novalnet_extension_helper.php');
- $nn_instalment_table .= ' ' ;
- $nn_instalment_table .= zen_draw_hidden_field('oID', $request['oID']);
- $nn_instalment_table .= zen_draw_hidden_field('refund_tid', (isset($instalment_details_data['reference_tid']) ? $instalment_details_data['reference_tid'] : ''));
- $nn_instalment_table .= zen_draw_hidden_field('instalment_cycle', ''.$key.'');
- $nn_instalment_table .= zen_draw_hidden_field('nn_amount_error', MODULE_PAYMENT_NOVALNET_AMOUNT_ERROR_MESSAGE);
- $nn_instalment_table .= zen_draw_hidden_field('nn_refund_amount_confirm', MODULE_PAYMENT_NOVALNET_PAYMENT_REFUND_CONFIRM);
- $nn_instalment_table .= zen_draw_input_field('refund_trans_amount', $instalment_amount, 'id="refund_trans_amount" style="width:100px;margin:0 0 0 2%" autocomplete="off"')." ";
- $nn_instalment_table .= zen_draw_input_field('nn_refund_confirm', html_entity_decode(MODULE_PAYMENT_NOVALNET_CONFIRM_TEXT), 'class="btn btn-primary" onclick="return refund_amount_validation();" ', false, 'submit')." " ;
- $nn_instalment_table .= "" . MODULE_PAYMENT_NOVALNET_INSTALMENT_CANCEL_TEXT . "";
- $nn_instalment_table .= ' |