Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Novalnet-Technic committed Jul 25, 2023
0 parents commit 7019064
Show file tree
Hide file tree
Showing 182 changed files with 15,838 additions and 0 deletions.
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# NOVALNET PAYMENT MODULE FOR GAMBIO
<a href="https://www.novalnet.de/">Novalnet</a> payment module for gambio simplifies your daily work by automating the entire payment process, from checkout till collection. This module is designed to help you increase your sales by offering various payment methods on a one-page checkout. The module which is perfectly adjusted to the gambio shop with top-quality range of services of the payment provider.

Novalnet payment module for gambio is available in <b>EN, DE</b>

Support is available in: <b> EN, DE, FR, ES, IT, BS, CR, RU, HI, TA</b>

Through the individuality and flexibility, you can choose which payment methods and services you need. Get now a seamless integration with the various types of payments and payment-related services integrated in the one unique platform.

## Important functions for gambio
* Easy configuration for all payment methods
* One platform for all relevant payment types and related services
* Complete automation of all payment processes
* More than 50 fraud prevention modules integrated to prevent risk in real-time
* Effortless configuration of risk management with fraud prevention
* Comprehensive affiliate system with automated split conversion of transaction on revenue sharing
* Multilevel claims management with integrated handover to collection and various export functions for the Accounting
* Automated e-mail notification function concerning payment status reports
* Automated bookkeeping report in XML, SOAP, CSV, MT940
* No PCI DSS certification required
* Secure SSL- encoded gateways
* Easy way of managing ‘on-hold’ transactions (cancel or capture) and refunds (partial, full)
* Credit/Debit Card iframe integration
* Credit/Debit Card with 3D Secure
* One-click shopping supported for Credit/Debit Cards, Direct Debit SEPA, Direct Debit SEPA with payment guarantee & Instalment by Direct Debit SEPA
* Custom CSS configuration for Credit/Debit Card iframe
* Easy way of confirmation and cancellation of on-hold transactions for Direct Debit SEPA, Direct Debit SEPA with payment guarantee, Instalment payment for Direct Debit SEPA, Credit/Debit Cards, Invoice, Invoice with payment guarantee, Instalment payment for Invoice, Prepayment, PayPal, Apple Pay & Google Pay
* Refund option for Credit/Debit Cards, Direct Debit SEPA, Direct Debit SEPA with payment guarantee, Instalment by Direct Debit SEPA, Invoice, Invoice with payment guarantee, Instalment by Invoice, Prepayment, Barzahlen/viacash, Sofort, iDEAL, eps, giropay, PayPal, Przelewy24, PostFinance Card, PostFinance E-Finance, Bancontact, Apple Pay, Google Pay, Online bank transfer, Alipay, WeChat pay & Trustly
* Responsive templates
* Find currently supported payment methods on https://www.novalnet.com/integration/gambio-gx2-payment-module/

## More information
Find more about gambio module on: https://www.novalnet.de/site_pdf/Installation_Guide-gambio_4.2.0.0-4.8.0.2_novalnet_12.0.4.pdf<br>
To test our demo shop, please visit: https://gambio.novalnet.de

## Contact
Novalnet AG<br>
Zahlungsinstitut (ZAG)<br>
Feringastr. 4 <br>
85774 Unterföhring <br>
Deutschland<br>
E-mail: sales@novalnet.de<br>
Tel: +49 89 9230683-20<br>
Web: www.novalnet.de

## License
See our License Agreement at: https://www.novalnet.com/payment-plugins/free/license

## About Novalnet AG
Novalnet AG is a leading financial services institution offering online gateways for processing of online payments. Operating in the market as a full payment service provider, Novalnet AG was founded in Ismaning near Munich, and provides online merchants user-friendly payment modules for all major shop systems as well as for self-programmed websites. The product and service portfolio is very comprehensive and includes all commonly used payment methods of online payment. These include a variety of intelligent fraud prevention modules, free technical support, an automated accounts receivable management system, a comprehensive subscription and membership management, as well as a very useful affiliate program. The experienced and international team of specialists at Novalnet is committed to support online merchants with in-depth knowledge and to work together with them hand in hand to increase their revenue and the quality of their online payments.
271 changes: 271 additions & 0 deletions admin/novalnet_extension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
<?php
/**
* Novalnet payment module
*
* This script is used for displaying the block of extension process
*
* @author Novalnet AG
* @copyright Copyright (c) Novalnet
* @license https://www.novalnet.de/payment-plugins/kostenlos/lizenz
* @link https://www.novalnet.de
*
* Script : novalnet_extension.php
*
*/
require_once(DIR_FS_CATALOG . 'ext/novalnet/NovalnetHelper.class.php');
/**
* To append Novalnet extension features in order details page
*
* @param integer $order_id
*/
function appendNovalnetOrderProcess($order_id) {
$request = $_REQUEST;
$transaction_details = NovalnetHelper::getNovalnetTransDetails($order_id);
if(empty($transaction_details)){
return false;
}
$order_total = xtc_db_fetch_array(xtc_db_query("SELECT value FROM " . TABLE_ORDERS_TOTAL . " where class = 'ot_total' AND orders_id = " . xtc_db_input($order_id)));
if ($transaction_details['amount'] == 0 && in_array($transaction_details['payment_type'],array('CREDITCARD', 'DIRECT_DEBIT_SEPA')) && $transaction_details['status'] == 'CONFIRMED') { // Zero amount booking transaction process
?>
<!-- Display zero amount booking block -->
<div class="content article-table grid">
<div class="span12 remove-padding">
<div class ="frame-wrapper">
<div class="frame-head">
<label class="title" ><?php echo MODULE_PAYMENT_NOVALNET_BOOK_TITLE; ?></label>
</div>
<?php echo xtc_draw_form('novalnet_book_amount', 'novalnet_extension_helper.php'); ?>
<label style="margin:0% 0% 0% 1%"><?php echo MODULE_PAYMENT_NOVALNET_TRANSACTION_ID . $transaction_details['tid']; ?></label>
<?php echo xtc_draw_hidden_field('oID', $request['oID']);?>
<table style="width=31%">
<tr>
<td>
<?php
$amount = $order_total['value']*100;
echo MODULE_PAYMENT_NOVALNET_BOOK_AMT_TITLE;
echo xtc_draw_input_field('book_amount', $amount, 'id="book_amount" autocomplete="off" style="margin:0% 0% 0% 2%"'); echo MODULE_PAYMENT_NOVALNET_AMOUNT_EX;
?>
</td>
</tr><br><span id="nn_zero_amount_error" style="color:red"></span>
<tr>
<td>
<?php
echo xtc_draw_input_field('nn_book_confirm', html_entity_decode(MODULE_PAYMENT_NOVALNET_CONFIRM_TEXT), 'onclick="return zero_amount_validation();" style="float:left"',false,'submit');
echo "<a class='button' style='float:left' href='" . xtc_href_link('orders.php') . "'>" . MODULE_PAYMENT_NOVALNET_BACK_TEXT . "</a>";
?>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<?php
}
if($transaction_details['status'] == 'ON_HOLD' || in_array($transaction_details['status'], NovalnetHelper::$statuses['ON_HOLD'])) { // Display authorization block
?>
<!-- Transaction management block -->
<div class="content article-table grid">
<div class="span12 remove-padding">
<div class ="frame-wrapper">
<div class="frame-head">
<label class="title"><?php echo MODULE_PAYMENT_NOVALNET_TRANS_CONFIRM_TITLE; ?></label>
</div>
<?php
echo xtc_draw_form('novalnet_status_change', 'novalnet_extension_helper.php', 'oID=' . $_GET['oID'] . '&action=edit');
?>
<br><label style='margin:0% 0% 0% 1%'> <?php echo MODULE_PAYMENT_NOVALNET_TRANSACTION_ID . $transaction_details['tid']; ?></label>
<?php
echo xtc_draw_hidden_field('oID', $request['oID']);
echo xtc_draw_hidden_field('nn_capture_update', MODULE_PAYMENT_NOVALNET_PAYMENT_CAPTURE_CONFIRM);
echo xtc_draw_hidden_field('nn_void_update', MODULE_PAYMENT_NOVALNET_PAYMENT_VOID_CONFIRM);
?>
<table style="width:33%">
<tr>
<td>
<?php
echo MODULE_PAYMENT_NOVALNET_SELECT_STATUS_TEXT;
?>
</td>
<td>
<?php
$options = array (
array('id'=>'', 'text' => MODULE_PAYMENT_NOVALNET_SELECT_STATUS_OPTION),
array('id'=>'CONFIRM', 'text' => MODULE_PAYMENT_NOVALNET_CONFIRM_TEXT),
array('id'=>'CANCEL', 'text' => MODULE_PAYMENT_NOVALNET_CANCEL_TEXT),
);
echo xtc_draw_pull_down_menu('trans_status', $options, '', 'onclick="return remove_void_capture_error_message()"');
?>
</td><br><span id="nn_void_capture_error" style="color:red"></span>
</tr>
<tr>
<td>
<?php
echo xtc_draw_input_field('nn_manage_confirm', html_entity_decode(MODULE_PAYMENT_NOVALNET_CONFIRM_TEXT), 'onclick="return void_capture_status();" style="float:left"', false, 'submit');
echo "<a class='button' style='float:left' href='" . xtc_href_link('orders.php') . "'>" . MODULE_PAYMENT_NOVALNET_BACK_TEXT . "</a>";
?>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<?php
}
if (($transaction_details['amount'] > 0)
&& (($transaction_details['status'] == 'CONFIRMED' || in_array($transaction_details['status'], NovalnetHelper::$statuses['CONFIRMED']))
|| ($transaction_details['status']=='PENDING' && in_array($transaction_details['payment_type'], array('INVOICE', 'PREPAYMENT', 'CASHPAYMENT'))))
&& !in_array($transaction_details['payment_type'], array('MULTIBANCO', 'INSTALMENT_INVOICE', 'INSTALMENT_DIRECT_DEBIT_SEPA', 'novalnet_instalment_invoice', 'novalnet_instalment_sepa'))
&& ($transaction_details['refund_amount'] < $transaction_details['amount'])) {
?>
<!-- Display refund block -->
<div class="content article-table grid">
<div class="span12 remove-padding">
<div class ="frame-wrapper">
<div class="frame-head">
<label class="title" ><?php echo MODULE_PAYMENT_NOVALNET_REFUND_TITLE; ?></label>
</div>
<?php echo xtc_draw_form('novalnet_trans_refund', 'novalnet_extension_helper.php', 'oID=' . $_GET['oID'] . '&action=refund'); ?>
<label style='margin:0% 0% 0% 1%'> <?php echo MODULE_PAYMENT_NOVALNET_TRANSACTION_ID . $transaction_details['tid']; ?></label>
<?php
echo xtc_draw_hidden_field('oID', $request['oID']);
echo xtc_draw_hidden_field('nn_refund_amount', MODULE_PAYMENT_NOVALNET_PAYMENT_REFUND_CONFIRM);
?>
<br><span id="nn_refund_error" style="color:red"></span>
<table>
<tr>
<td>
<?php echo MODULE_PAYMENT_NOVALNET_REFUND_AMT_TITLE;?>
<?php
$avail_refund = (!empty($transaction_details['callback_amount'])) ? (int)$transaction_details['callback_amount'] : (int)$transaction_details['amount'];
$refund_value = (!empty($transaction_details['refund_amount'])) ? ((int)$avail_refund - (int)$transaction_details['refund_amount']) : $avail_refund;
echo xtc_draw_input_field('refund_trans_amount', $refund_value, 'id="refund_trans_amount" style="width:100px;margin:0 0 0 2%" autocomplete="off"'); echo MODULE_PAYMENT_NOVALNET_AMOUNT_EX;?>
</td>
</tr>
<tr>
<td>
<?php echo MODULE_PAYMENT_NOVALNET_REFUND_REASON_TITLE;?>
<?php
echo xtc_draw_input_field('refund_reason', '', 'id="refund_reason" style="margin:0 0 0 2%;" autocomplete="off"');?>
</td>
</tr>
<tr>
<td>
<?php
echo xtc_draw_input_field('nn_refund_confirm', html_entity_decode(MODULE_PAYMENT_NOVALNET_CONFIRM_TEXT), 'onclick="return refund_amount_validation();" style="float:left"', false, 'submit');
echo "<a class='button' style='float:left' href='" . xtc_href_link('orders.php') . "'>" . MODULE_PAYMENT_NOVALNET_BACK_TEXT . "</a>";
?>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<?php
}
if (in_array($transaction_details['payment_type'], array('INSTALMENT_INVOICE', 'INSTALMENT_DIRECT_DEBIT_SEPA', 'novalnet_instalment_invoice', 'novalnet_instalment_sepa'))
) {
$instalment_details = (!empty($transaction_details['instalment_cycle_details'])) ? json_decode($transaction_details['instalment_cycle_details'], true) : unserialize($transaction_details['payment_details']);
if(!empty($instalment_details)) {
?>
<div class="content article-table grid">
<div class="span12 remove-padding">
<script>
function novalnetRefundbuttonsHandler(cycle) {
var refund_id = document.getElementById("instalment_refund_"+cycle);
if (refund_id.style.display === "none") {
refund_id.style.display = "block";
} else {
refund_id.style.display = "none";
}
}
</script>
<div class ="frame-wrapper">
<div class="frame-head">
<label class="title" ><?php echo MODULE_PAYMENT_NOVALNET_INSTALMENT_SUMMARY_BACKEND; ?></label>
</div>
<?php
$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) { ?>
<br><button id="nn_instalment_cancel" style="display: block;"> <?php echo MODULE_PAYMENT_NOVALNET_INSTALMENT_CANCEL_ADMIN_TEXT; ?> </button>
<?php }

?>
<div>
<?php
echo xtc_draw_form('nn_instalment_cancel', 'novalnet_extension_helper.php');
?><div id= "novalnet_instalment_cancel" style="display: none;"> <?php
echo xtc_draw_hidden_field('nn_insta_allcycles', MODULE_PAYMENT_NOVALNET_ALLCYCLES_ERROR_MESSAGE);
echo xtc_draw_hidden_field('nn_insta_remainingcycles', MODULE_PAYMENT_NOVALNET_REMAINING_CYCLES_ERROR_MESSAGE);
echo xtc_draw_hidden_field('oID', $request['oID']);
echo xtc_draw_input_field('nn_instacancel_remaincycles', html_entity_decode(MODULE_PAYMENT_NOVALNET_INSTALMENT_CANCEL_REMAINING_CYCLES), 'type="hidden" id="nn_instacancel_remaincycles" '. $nn_instacancel_remaining, false, 'submit') . "&nbsp;";
echo xtc_draw_input_field('nn_instacancel_allcycles', html_entity_decode(MODULE_PAYMENT_NOVALNET_INSTALMENT_CANCEL_ALLCYCLES), 'type="hidden" id="nn_instacancel_allcycles" ' . $nn_instacancel_allcycles, false, 'submit');
?>
</form>
</div>
<?php
echo "<table><tr><td>S.No</td><td>" . MODULE_PAYMENT_NOVALNET_INSTALMENT_AMOUNT_BACKEND . "</td><td>" . MODULE_PAYMENT_NOVALNET_INSTALMENT_NEXT_DATE_BACKEND . "</td><td>" . MODULE_PAYMENT_NOVALNET_INSTALMENT_PAID_DATE_BACKEND . "</td><td>" . MODULE_PAYMENT_NOVALNET_INSTALMENT_STATUS_BACKEND . "</td><td>" . MODULE_PAYMENT_NOVALNET_INSTALMENT_REFERENCE_BACKEND . "</td></tr>";
$sno = 1;
foreach ($instalment_details as $key => $instalment_details_data) {
$instalment_amount = (strpos((string)$instalment_details_data['instalment_cycle_amount'], '.')) ? $instalment_details_data['instalment_cycle_amount']*100 : $instalment_details_data['instalment_cycle_amount'];
if(!empty($instalment_details_data['status'])) {
$status = $instalment_details_data['status'];
} else {
$status = (empty($instalment_details_data['reference_tid'])) ? 'Pending' : (($instalment_amount > 0) ? 'Paid' : 'Refunded');
}
$status = constant('MODULE_PAYMENT_NOVALNET_INSTALMENT_STATUS_' . strtoupper($status));
$href = (isset($instalment_details_data['reference_tid']) && !empty($instalment_details_data['reference_tid']) != '' && $instalment_amount != '0' && $instalment_amount > 0 && $status != constant('MODULE_PAYMENT_NOVALNET_INSTALMENT_STATUS_REFUNDED')) ? "<button id='nn_refund1' onclick='novalnetRefundbuttonsHandler($key)'>" . MODULE_PAYMENT_NOVALNET_REFUND_TEXT . "</button>" : '';
$instalment_amount_formatted = !empty($instalment_amount) ? xtc_format_price_order($instalment_amount/100, 1, $transaction_details['currency']) : '-';
echo "<tr><td>".$sno++."</td><td>".$instalment_amount_formatted . ' ' . $href . "</td>
<td>" . (isset($instalment_details_data['next_instalment_date']) ? $instalment_details_data['next_instalment_date'] : '') . "</td><td>".(isset($instalment_details_data['paid_date']) ? $instalment_details_data['paid_date'] : '') . "</td><td>$status</td><td>".(isset($instalment_details_data['reference_tid']) ? $instalment_details_data['reference_tid'] : '') . "</td><td>".
xtc_draw_form('nn_refund_confirm', 'novalnet_extension_helper.php');
echo '<div id= instalment_refund_' . $key . ' style="display: none;">' ;
echo xtc_draw_hidden_field('oID', $request['oID']);
echo xtc_draw_hidden_field('refund_tid', (isset($instalment_details_data['reference_tid']) ? $instalment_details_data['reference_tid'] : ''));
echo xtc_draw_hidden_field('instalment_cycle', '' . $key . '');
echo xtc_draw_input_field('refund_trans_amount', $instalment_amount, 'id="refund_trans_amount" style="width:100px;margin:0 0 0 2%" autocomplete="off"');
echo xtc_draw_input_field('nn_refund_confirm', html_entity_decode(MODULE_PAYMENT_NOVALNET_CONFIRM_TEXT), 'onclick="return refund_amount_validation();" style="float:left"', false, 'submit');
echo "<a class='button' style='float:left' href='" . xtc_href_link('orders.php?oID='.$request['oID'].'&action=edit') . "'>" . MODULE_PAYMENT_NOVALNET_INSTALMENT_CANCEL_TEXT . "</a>"; ?>
</div></form></td></tr><?php
}
echo "</table>";
?>
</div>
</div>
</div>
<?php
}

}

echo '<script type="text/javascript" src="' . DIR_WS_CATALOG . 'ext/novalnet/js/novalnet_extension.js"></script>';
echo '<link rel="stylesheet" type="text/css" href="' . DIR_WS_CATALOG . 'ext/novalnet/css/novalnet.css">';
echo xtc_draw_hidden_field('nn_refund_amount_confirm', MODULE_PAYMENT_NOVALNET_PAYMENT_REFUND_CONFIRM);
echo xtc_draw_hidden_field('nn_select_status', MODULE_PAYMENT_NOVALNET_SELECT_STATUS_TEXT);
echo xtc_draw_hidden_field('nn_zero_amount_book_confirm', MODULE_PAYMENT_NOVALNET_PAYMENT_ZERO_AMOUNT_BOOK_CONFIRM);
echo xtc_draw_hidden_field('nn_amount_error', MODULE_PAYMENT_NOVALNET_AMOUNT_ERROR_MESSAGE);
echo xtc_draw_hidden_field('nn_insta_cycles', MODULE_PAYMENT_NOVALNET_CYCLES_ERROR_MESSAGE);
}
?>
Loading

0 comments on commit 7019064

Please sign in to comment.