From a747d6d6d8cf19e7279a40ef0a397659bad05378 Mon Sep 17 00:00:00 2001 From: "release@novalnetsolutions.com" Date: Mon, 8 Jul 2024 13:01:40 +0530 Subject: [PATCH] first commit --- README.md | 66 + .../controller/extension/payment/novalnet.php | 801 +++++++++ .../payment/novalnet_cashpayment.php | 197 ++ .../extension/payment/novalnet_cc.php | 227 +++ .../extension/payment/novalnet_eps.php | 150 ++ .../extension/payment/novalnet_giropay.php | 151 ++ .../extension/payment/novalnet_ideal.php | 147 ++ .../novalnet_instant_bank_transfer.php | 146 ++ .../extension/payment/novalnet_invoice.php | 257 +++ .../payment/novalnet_online_bank_transfer.php | 146 ++ .../extension/payment/novalnet_paypal.php | 209 +++ .../extension/payment/novalnet_prepayment.php | 192 ++ .../extension/payment/novalnet_przelewy24.php | 156 ++ .../extension/payment/novalnet_sepa.php | 256 +++ admin/controller/novalnet/admin_portal.php | 40 + .../de-de/extension/payment/novalnet.php | 56 + .../payment/novalnet_cashpayment.php | 24 + .../de-de/extension/payment/novalnet_cc.php | 40 + .../extension/payment/novalnet_common.php | 134 ++ .../de-de/extension/payment/novalnet_eps.php | 23 + .../extension/payment/novalnet_giropay.php | 23 + .../extension/payment/novalnet_ideal.php | 23 + .../novalnet_instant_bank_transfer.php | 22 + .../extension/payment/novalnet_invoice.php | 32 + .../payment/novalnet_online_bank_transfer.php | 22 + .../extension/payment/novalnet_paypal.php | 32 + .../extension/payment/novalnet_prepayment.php | 26 + .../extension/payment/novalnet_przelewy24.php | 26 + .../de-de/extension/payment/novalnet_sepa.php | 32 + .../en-gb/extension/payment/novalnet.php | 54 + .../payment/novalnet_cashpayment.php | 25 + .../en-gb/extension/payment/novalnet_cc.php | 36 + .../extension/payment/novalnet_common.php | 134 ++ .../en-gb/extension/payment/novalnet_eps.php | 24 + .../extension/payment/novalnet_giropay.php | 24 + .../extension/payment/novalnet_ideal.php | 24 + .../novalnet_instant_bank_transfer.php | 24 + .../extension/payment/novalnet_invoice.php | 30 + .../payment/novalnet_online_bank_transfer.php | 24 + .../extension/payment/novalnet_paypal.php | 30 + .../extension/payment/novalnet_prepayment.php | 26 + .../extension/payment/novalnet_przelewy24.php | 26 + .../en-gb/extension/payment/novalnet_sepa.php | 31 + admin/model/extension/payment/novalnet.php | 519 ++++++ .../javascript/novalnet/novalnet_admin.js | 92 + .../javascript/novalnet/novalnet_extension.js | 187 ++ admin/view/stylesheet/novalnet.css | 6 + .../template/extension/payment/novalnet.twig | 204 +++ .../payment/novalnet_cashpayment.twig | 114 ++ .../extension/payment/novalnet_cc.twig | 198 +++ .../extension/payment/novalnet_eps.twig | 94 + .../extension/payment/novalnet_giropay.twig | 94 + .../extension/payment/novalnet_ideal.twig | 94 + .../novalnet_instant_bank_transfer.twig | 94 + .../extension/payment/novalnet_invoice.twig | 261 +++ .../novalnet_online_bank_transfer.twig | 94 + .../extension/payment/novalnet_order.twig | 157 ++ .../extension/payment/novalnet_paypal.twig | 179 ++ .../payment/novalnet_prepayment.twig | 126 ++ .../payment/novalnet_przelewy24.twig | 107 ++ .../extension/payment/novalnet_sepa.twig | 244 +++ .../template/sale/novalnet_recurring.twig | 51 + catalog/controller/callback/vendorScript.php | 1076 +++++++++++ .../controller/extension/module/novalnet.php | 35 + .../payment/novalnet_cashpayment.php | 108 ++ .../extension/payment/novalnet_cc.php | 305 ++++ .../extension/payment/novalnet_eps.php | 119 ++ .../extension/payment/novalnet_giropay.php | 120 ++ .../extension/payment/novalnet_ideal.php | 119 ++ .../novalnet_instant_bank_transfer.php | 119 ++ .../extension/payment/novalnet_invoice.php | 156 ++ .../payment/novalnet_online_bank_transfer.php | 118 ++ .../extension/payment/novalnet_paypal.php | 174 ++ .../extension/payment/novalnet_prepayment.php | 121 ++ .../extension/payment/novalnet_przelewy24.php | 119 ++ .../extension/payment/novalnet_sepa.php | 202 +++ .../extension/recurring/novalnet_cc.php | 59 + .../extension/recurring/novalnet_invoice.php | 58 + .../extension/recurring/novalnet_paypal.php | 60 + .../recurring/novalnet_prepayment.php | 60 + .../recurring/novalnet_recurring.php | 219 +++ .../extension/recurring/novalnet_sepa.php | 59 + .../language/de-de/callback/vendorScript.php | 49 + .../payment/novalnet_cashpayment.php | 22 + .../de-de/extension/payment/novalnet_cc.php | 39 + .../extension/payment/novalnet_common.php | 76 + .../de-de/extension/payment/novalnet_eps.php | 22 + .../extension/payment/novalnet_giropay.php | 22 + .../extension/payment/novalnet_ideal.php | 22 + .../novalnet_instant_bank_transfer.php | 22 + .../extension/payment/novalnet_invoice.php | 22 + .../payment/novalnet_online_bank_transfer.php | 22 + .../extension/payment/novalnet_paypal.php | 27 + .../extension/payment/novalnet_prepayment.php | 22 + .../extension/payment/novalnet_przelewy24.php | 22 + .../de-de/extension/payment/novalnet_sepa.php | 39 + .../language/en-gb/callback/vendorScript.php | 48 + .../payment/novalnet_cashpayment.php | 22 + .../en-gb/extension/payment/novalnet_cc.php | 41 + .../extension/payment/novalnet_common.php | 73 + .../en-gb/extension/payment/novalnet_eps.php | 22 + .../extension/payment/novalnet_giropay.php | 22 + .../extension/payment/novalnet_ideal.php | 22 + .../novalnet_instant_bank_transfer.php | 22 + .../extension/payment/novalnet_invoice.php | 22 + .../payment/novalnet_online_bank_transfer.php | 22 + .../extension/payment/novalnet_paypal.php | 28 + .../extension/payment/novalnet_prepayment.php | 22 + .../extension/payment/novalnet_przelewy24.php | 22 + .../en-gb/extension/payment/novalnet_sepa.php | 39 + catalog/model/extension/payment/novalnet.php | 1583 +++++++++++++++++ .../payment/novalnet_cashpayment.php | 39 + .../model/extension/payment/novalnet_cc.php | 52 + .../model/extension/payment/novalnet_eps.php | 40 + .../extension/payment/novalnet_giropay.php | 40 + .../extension/payment/novalnet_ideal.php | 40 + .../novalnet_instant_bank_transfer.php | 39 + .../extension/payment/novalnet_invoice.php | 59 + .../payment/novalnet_online_bank_transfer.php | 39 + .../extension/payment/novalnet_paypal.php | 50 + .../extension/payment/novalnet_prepayment.php | 50 + .../extension/payment/novalnet_przelewy24.php | 40 + .../model/extension/payment/novalnet_sepa.php | 60 + .../view/javascript/novalnet/novalnet_cc.js | 139 ++ .../view/javascript/novalnet/novalnet_sepa.js | 32 + .../theme/default/stylesheet/novalnet.css | 30 + .../payment/novalnet_cashpayment.twig | 56 + .../extension/payment/novalnet_cc.twig | 171 ++ .../extension/payment/novalnet_eps.twig | 51 + .../extension/payment/novalnet_giropay.twig | 53 + .../extension/payment/novalnet_ideal.twig | 52 + .../novalnet_instant_bank_transfer.twig | 52 + .../extension/payment/novalnet_invoice.twig | 100 ++ .../novalnet_online_bank_transfer.twig | 52 + .../extension/payment/novalnet_paypal.twig | 137 ++ .../payment/novalnet_prepayment.twig | 54 + .../payment/novalnet_przelewy24.twig | 52 + .../extension/payment/novalnet_sepa.twig | 282 +++ .../recurring/novalnet_recurring.twig | 54 + changelog.txt | 54 + image/payment/novalnet/nn_loader.gif | Bin 0 -> 7356 bytes image/payment/novalnet/novalnet.png | Bin 0 -> 5470 bytes image/payment/novalnet/novalnet_amex.png | Bin 0 -> 1221 bytes .../novalnet/novalnet_banktransfer.png | Bin 0 -> 952 bytes .../payment/novalnet/novalnet_cashpayment.png | Bin 0 -> 2071 bytes image/payment/novalnet/novalnet_cc.png | Bin 0 -> 2144 bytes .../novalnet/novalnet_cc_mastercard.png | Bin 0 -> 1300 bytes image/payment/novalnet/novalnet_eps.png | Bin 0 -> 1064 bytes image/payment/novalnet/novalnet_giropay.png | Bin 0 -> 1223 bytes image/payment/novalnet/novalnet_ideal.png | Bin 0 -> 1481 bytes image/payment/novalnet/novalnet_invoice.png | Bin 0 -> 636 bytes image/payment/novalnet/novalnet_maestro.png | Bin 0 -> 1204 bytes .../novalnet/novalnet_onlinebanktransfer.png | Bin 0 -> 2412 bytes image/payment/novalnet/novalnet_paypal.png | Bin 0 -> 1976 bytes .../payment/novalnet/novalnet_prepayment.png | Bin 0 -> 978 bytes .../payment/novalnet/novalnet_przelewy24.png | Bin 0 -> 2180 bytes image/payment/novalnet/novalnet_sepa.png | Bin 0 -> 1152 bytes 157 files changed, 14896 insertions(+) create mode 100644 README.md create mode 100644 admin/controller/extension/payment/novalnet.php create mode 100644 admin/controller/extension/payment/novalnet_cashpayment.php create mode 100644 admin/controller/extension/payment/novalnet_cc.php create mode 100644 admin/controller/extension/payment/novalnet_eps.php create mode 100644 admin/controller/extension/payment/novalnet_giropay.php create mode 100644 admin/controller/extension/payment/novalnet_ideal.php create mode 100644 admin/controller/extension/payment/novalnet_instant_bank_transfer.php create mode 100644 admin/controller/extension/payment/novalnet_invoice.php create mode 100644 admin/controller/extension/payment/novalnet_online_bank_transfer.php create mode 100644 admin/controller/extension/payment/novalnet_paypal.php create mode 100644 admin/controller/extension/payment/novalnet_prepayment.php create mode 100644 admin/controller/extension/payment/novalnet_przelewy24.php create mode 100644 admin/controller/extension/payment/novalnet_sepa.php create mode 100644 admin/controller/novalnet/admin_portal.php create mode 100644 admin/language/de-de/extension/payment/novalnet.php create mode 100644 admin/language/de-de/extension/payment/novalnet_cashpayment.php create mode 100644 admin/language/de-de/extension/payment/novalnet_cc.php create mode 100644 admin/language/de-de/extension/payment/novalnet_common.php create mode 100644 admin/language/de-de/extension/payment/novalnet_eps.php create mode 100644 admin/language/de-de/extension/payment/novalnet_giropay.php create mode 100644 admin/language/de-de/extension/payment/novalnet_ideal.php create mode 100644 admin/language/de-de/extension/payment/novalnet_instant_bank_transfer.php create mode 100644 admin/language/de-de/extension/payment/novalnet_invoice.php create mode 100644 admin/language/de-de/extension/payment/novalnet_online_bank_transfer.php create mode 100644 admin/language/de-de/extension/payment/novalnet_paypal.php create mode 100644 admin/language/de-de/extension/payment/novalnet_prepayment.php create mode 100644 admin/language/de-de/extension/payment/novalnet_przelewy24.php create mode 100644 admin/language/de-de/extension/payment/novalnet_sepa.php create mode 100644 admin/language/en-gb/extension/payment/novalnet.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_cashpayment.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_cc.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_common.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_eps.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_giropay.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_ideal.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_instant_bank_transfer.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_invoice.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_online_bank_transfer.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_paypal.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_prepayment.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_przelewy24.php create mode 100644 admin/language/en-gb/extension/payment/novalnet_sepa.php create mode 100644 admin/model/extension/payment/novalnet.php create mode 100644 admin/view/javascript/novalnet/novalnet_admin.js create mode 100644 admin/view/javascript/novalnet/novalnet_extension.js create mode 100644 admin/view/stylesheet/novalnet.css create mode 100644 admin/view/template/extension/payment/novalnet.twig create mode 100644 admin/view/template/extension/payment/novalnet_cashpayment.twig create mode 100644 admin/view/template/extension/payment/novalnet_cc.twig create mode 100644 admin/view/template/extension/payment/novalnet_eps.twig create mode 100644 admin/view/template/extension/payment/novalnet_giropay.twig create mode 100644 admin/view/template/extension/payment/novalnet_ideal.twig create mode 100644 admin/view/template/extension/payment/novalnet_instant_bank_transfer.twig create mode 100644 admin/view/template/extension/payment/novalnet_invoice.twig create mode 100644 admin/view/template/extension/payment/novalnet_online_bank_transfer.twig create mode 100644 admin/view/template/extension/payment/novalnet_order.twig create mode 100644 admin/view/template/extension/payment/novalnet_paypal.twig create mode 100644 admin/view/template/extension/payment/novalnet_prepayment.twig create mode 100644 admin/view/template/extension/payment/novalnet_przelewy24.twig create mode 100644 admin/view/template/extension/payment/novalnet_sepa.twig create mode 100644 admin/view/template/sale/novalnet_recurring.twig create mode 100644 catalog/controller/callback/vendorScript.php create mode 100644 catalog/controller/extension/module/novalnet.php create mode 100644 catalog/controller/extension/payment/novalnet_cashpayment.php create mode 100644 catalog/controller/extension/payment/novalnet_cc.php create mode 100644 catalog/controller/extension/payment/novalnet_eps.php create mode 100644 catalog/controller/extension/payment/novalnet_giropay.php create mode 100644 catalog/controller/extension/payment/novalnet_ideal.php create mode 100644 catalog/controller/extension/payment/novalnet_instant_bank_transfer.php create mode 100644 catalog/controller/extension/payment/novalnet_invoice.php create mode 100644 catalog/controller/extension/payment/novalnet_online_bank_transfer.php create mode 100644 catalog/controller/extension/payment/novalnet_paypal.php create mode 100644 catalog/controller/extension/payment/novalnet_prepayment.php create mode 100644 catalog/controller/extension/payment/novalnet_przelewy24.php create mode 100644 catalog/controller/extension/payment/novalnet_sepa.php create mode 100644 catalog/controller/extension/recurring/novalnet_cc.php create mode 100644 catalog/controller/extension/recurring/novalnet_invoice.php create mode 100644 catalog/controller/extension/recurring/novalnet_paypal.php create mode 100644 catalog/controller/extension/recurring/novalnet_prepayment.php create mode 100644 catalog/controller/extension/recurring/novalnet_recurring.php create mode 100644 catalog/controller/extension/recurring/novalnet_sepa.php create mode 100644 catalog/language/de-de/callback/vendorScript.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_cashpayment.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_cc.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_common.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_eps.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_giropay.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_ideal.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_instant_bank_transfer.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_invoice.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_online_bank_transfer.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_paypal.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_prepayment.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_przelewy24.php create mode 100644 catalog/language/de-de/extension/payment/novalnet_sepa.php create mode 100644 catalog/language/en-gb/callback/vendorScript.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_cashpayment.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_cc.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_common.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_eps.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_giropay.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_ideal.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_instant_bank_transfer.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_invoice.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_online_bank_transfer.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_paypal.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_prepayment.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_przelewy24.php create mode 100644 catalog/language/en-gb/extension/payment/novalnet_sepa.php create mode 100644 catalog/model/extension/payment/novalnet.php create mode 100644 catalog/model/extension/payment/novalnet_cashpayment.php create mode 100644 catalog/model/extension/payment/novalnet_cc.php create mode 100644 catalog/model/extension/payment/novalnet_eps.php create mode 100644 catalog/model/extension/payment/novalnet_giropay.php create mode 100644 catalog/model/extension/payment/novalnet_ideal.php create mode 100644 catalog/model/extension/payment/novalnet_instant_bank_transfer.php create mode 100644 catalog/model/extension/payment/novalnet_invoice.php create mode 100644 catalog/model/extension/payment/novalnet_online_bank_transfer.php create mode 100644 catalog/model/extension/payment/novalnet_paypal.php create mode 100644 catalog/model/extension/payment/novalnet_prepayment.php create mode 100644 catalog/model/extension/payment/novalnet_przelewy24.php create mode 100644 catalog/model/extension/payment/novalnet_sepa.php create mode 100644 catalog/view/javascript/novalnet/novalnet_cc.js create mode 100644 catalog/view/javascript/novalnet/novalnet_sepa.js create mode 100644 catalog/view/theme/default/stylesheet/novalnet.css create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_cashpayment.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_cc.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_eps.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_giropay.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_ideal.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_instant_bank_transfer.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_invoice.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_online_bank_transfer.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_paypal.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_prepayment.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_przelewy24.twig create mode 100644 catalog/view/theme/default/template/extension/payment/novalnet_sepa.twig create mode 100644 catalog/view/theme/default/template/extension/recurring/novalnet_recurring.twig create mode 100644 changelog.txt create mode 100644 image/payment/novalnet/nn_loader.gif create mode 100644 image/payment/novalnet/novalnet.png create mode 100644 image/payment/novalnet/novalnet_amex.png create mode 100644 image/payment/novalnet/novalnet_banktransfer.png create mode 100644 image/payment/novalnet/novalnet_cashpayment.png create mode 100644 image/payment/novalnet/novalnet_cc.png create mode 100644 image/payment/novalnet/novalnet_cc_mastercard.png create mode 100644 image/payment/novalnet/novalnet_eps.png create mode 100644 image/payment/novalnet/novalnet_giropay.png create mode 100644 image/payment/novalnet/novalnet_ideal.png create mode 100644 image/payment/novalnet/novalnet_invoice.png create mode 100644 image/payment/novalnet/novalnet_maestro.png create mode 100644 image/payment/novalnet/novalnet_onlinebanktransfer.png create mode 100644 image/payment/novalnet/novalnet_paypal.png create mode 100644 image/payment/novalnet/novalnet_prepayment.png create mode 100644 image/payment/novalnet/novalnet_przelewy24.png create mode 100644 image/payment/novalnet/novalnet_sepa.png diff --git a/README.md b/README.md new file mode 100644 index 0000000..1df548e --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +# NOVALNET PAYMENT INTEGRATION FOR OPENCART +Novalnet’s Payment Module for opencart ensures simple and secure integration of payments and payment services for opencart shops, allowing shop owners to automate the entire payment process from checkout till collection. + +## Requirements +Novalnet merchant account is required for using this Novalnet Payment Gateway for opencart. The module is available for the 3.0.0.0 - 3.0.3.9 versions in the following languages: EN & DE. + +## Advanced functions for payment processing +- Easy configuration of international and local payment methods +- One PCI DSS certified payment platform for all payment services +- Credit Card iframe integration with custom CSS configuration +- Comprehensive fraud management solution with more than 60 supported modules +- Secure SSL-encoded gateways +- Proxy server configuration +- Updating transaction amounts for Direct Debit SEPA, Invoice, Prepayment & Barzahlen/viacash +- Changing due dates for Prepayment & Invoice payment +- Automatic order creation when subscriptions are renewed +- One-click shopping supported +- Easy confirmation & cancellation of on-hold transactions +- Refund options for various payment types +- Setting a time limit for orders & automatic order cancellation when limit is exceeded +- Cancelling subscriptions in the shops’ frontend and admin side +- Responsive templates + +For detailed documentation and other technical inquiries, please send us an email to technic@novalnet.de. + +## Integrated payment methods +- Direct Debit SEPA +- Credit/Debit Cards +- Invoice +- Prepayment +- Barzahlen/viacash +- Sofort +- PayPal +- iDEAL +- eps +- giropay +- Przelewy24 +- Direct Debit SEPA with payment guarantee +- Invoice with payment guarantee + +## Installation +Easy installation of Novalnet Payment Module for opencart will be done through the following steps: +1. Get the payment module & detailed documentation by contacting us +2. Install the module to your OpenCart shop +3. Configure Product Activation Key in the shop admin panel +4. Activate & configure the preferred payment types in your shop admin panel + +## License +See our License Agreement at: https://www.novalnet.com/payment-plugins/free/license + +## Documentation & Support +For more information about the Opencart Novalnet Payment module and pricing for opencart, please get in touch with us: sales@novalnet.de or +49 89 9230683-20
+ +Novalnet AG
+Zahlungsinstitut (ZAG)
+Gutenbergstraße 7
+D-85748 Garching
+Deutschland
+E-mail: sales@novalnet.de
+Tel: +49 89 9230683-20
+Web: www.novalnet.de + +## Who is Novalnet AG? +

Novalnet AG is a leading financial services institution offering advanced payment gateways for processing online payments. Operating in the market as a full payment service provider, Novalnet AG was founded in Ismaning near Munich which provides online merchants user-friendly payment integration with all major shop systems as well as with self-programmed e-commerce sites.

+

Novalnet Payment Platform offers merchants an end-to-end solution for automated payment processing all the way from checkout to receivables. Our SaaS engine is PCI DSS certified and designed to enable real-time risk management, secured payments via escrow accounts, efficient receivables management, dynamic member and subscription management, customized payment solutions for various business models (e.g. marketplaces, affiliate programs etc.) and much more.

+

The experienced and international team of specialists at Novalnet is committed to support online merchants with in-depth knowledge to increase revenue and ensure secure online payments.

diff --git a/admin/controller/extension/payment/novalnet.php b/admin/controller/extension/payment/novalnet.php new file mode 100644 index 0000000..eb56114 --- /dev/null +++ b/admin/controller/extension/payment/novalnet.php @@ -0,0 +1,801 @@ + '', + 'error_warning_id' => '', + ); + + private $json = array(); + + public function index() { + + // Load language. + $this->load->language('extension/payment/novalnet'); + + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Store payment configuration. + if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet'); + } + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet'); + + // Assign title. + $data['novalnet_heading_title'] = $this->language->get('novalnet_heading_title'); + + // Assign default values. + $data['server_ip'] = $this->getIpAddress('SERVER_ADDR'); + $data['remote_ip'] = $this->getIpAddress('REMOTE_ADDR'); + $data['default_callback_url'] = (($this->request->server['HTTPS']) ? HTTPS_CATALOG : HTTP_CATALOG) . 'index.php?route=callback/vendorScript'; + $data['cron_job_url'] = (($this->request->server['HTTPS']) ? HTTPS_CATALOG : HTTP_CATALOG) . 'index.php?route=extension/recurring/novalnet_recurring/cronProcess'; + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuration content. + $this->getConfigurationContent($data); + + $this->model_extension_payment_novalnet->install(); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet', $data)); + } + + public function install() { + $this->load->model('extension/payment/novalnet'); + $this->load->model('setting/event'); + $this->model_setting_event->addEvent('novalnet_login', 'catalog/controller/account/logout/after', 'extension/module/novalnet/logout'); + } + + public function uninstall() { + $this->load->model('setting/event'); + $this->model_setting_event->deleteEvent('novalnet_login'); + } + + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'entry_merchant_id', + 'entry_authcode', + 'entry_project_id', + 'entry_tariff', + 'entry_tariff_desc', + 'heading_title', + 'entry_payment_access_key', + 'entry_onhold_limit', + 'entry_referrer_id', + 'entry_payment_logo', + 'entry_proxy_server', + 'entry_gateway_timeout', + 'entry_onhold_management', + 'entry_onhold_confirm_status', + 'entry_onhold_cancel_status', + 'entry_merchant_script_management', + 'entry_merchant_script_test_mode', + 'entry_merchant_script_test_mode_desc', + 'entry_merchant_script_mail_notification', + 'entry_merchant_script_mail_notification_desc', + 'entry_notification_url', + 'entry_email_to_addr', + 'entry_email_bcc_addr', + 'novalnet_payment_logo', + 'text_true', + 'text_false', + 'entry_status', + 'entry_enable_payment', + 'text_enabled', + 'text_disabled', + 'entry_product_activation_key', + 'entry_client_key', + 'entry_subscription_tariff_id', + 'entry_enable_subscription', + 'entry_product_activation_key_desc', + 'error_mandatory_fields', + 'text_novalnet', + 'entry_admin_portal_src', + 'entry_paypal_admin_portal_src', + 'entry_product_activation_key_desc', + 'entry_vendor_desc', + 'entry_authcode_desc', + 'entry_product_desc', + 'entry_payment_access_key_desc', + 'entry_onhold_limit_desc', + 'entry_referrer_id_desc', + 'entry_proxy_server_desc', + 'entry_gateway_timeout_desc', + 'entry_payment_logo_desc', + 'entry_subs_tariff_desc', + 'entry_subs_amount_desc', + 'entry_subs_period_desc', + 'entry_email_to_addr_desc', + 'entry_email_bcc_addr_desc', + 'entry_notification_url_desc', + 'entry_cron_job_url', + 'entry_cron_job_url_desc', + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_merchant_id', + 'payment_novalnet_authcode', + 'payment_novalnet_project_id', + 'payment_novalnet_tariff_id', + 'payment_novalnet_access_key', + 'payment_novalnet_manual_limit', + 'payment_novalnet_onhold_complete_status', + 'payment_novalnet_cancel_status', + 'payment_novalnet_callback_testmode', + 'payment_novalnet_callback_to_addr', + 'payment_novalnet_callback_mail', + 'payment_novalnet_notification_url', + 'payment_novalnet_payment_logo', + 'payment_novalnet_public_key', + 'payment_novalnet_client_key', + 'payment_novalnet_cron_job_url', + 'payment_novalnet_email_notification' + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + + } + + protected function validate() { + if (!function_exists('crc32') || !function_exists('bin2hex') || !function_exists('base64_encode') || !function_exists('base64_decode') || !function_exists('pack')) { + $this->error['error_warning'] = $this->language->get('package_error'); + return false; + } else if (empty($this->request->post['payment_novalnet_public_key'])) { + $this->error['error_warning'] = $this->language->get('error_mandatory_fields'); + $this->error['error_warning_id'] = 'payment_novalnet_public_key'; + return false; + } else if (empty($this->request->post['payment_novalnet_client_key'])) { + $this->error['error_warning'] = $this->language->get('error_mandatory_fields'); + $this->error['error_warning_id'] = 'payment_novalnet_client_key'; + return false; + } else if (empty($this->request->post['payment_novalnet_tariff_id'])) { + $this->error['error_warning'] = $this->language->get('error_mandatory_fields'); + $this->error['error_warning_id'] = 'novalnet_tariff_id'; + return false; + } + return true; + } + + /** + * For send the request parameters to the server and manage the Novalnet orders(capture / cancel) + * + * @param $order_details + * @return array + */ + public function novalnetApiProcess($order_details) { + $this->load->model('extension/payment/novalnet'); + $api_params = array( + 'vendor' => $order_details['payment_configurations']['vendor'], + 'auth_code' => $order_details['payment_configurations']['auth_code'], + 'product' => $order_details['payment_configurations']['product'], + 'tariff' => $order_details['payment_configurations']['tariff'], + 'key' => $order_details['payment_id'], + 'tid' => $order_details['tid'], + 'status' => '100', + 'remote_ip' => $this->getIpAddress('REMOTE_ADDR'), + ); + + switch ($this->request->post['novalnet_action']) { + case 'capture_void_process': + $api_params['edit_status'] = '1'; + + // Add requested status. + $api_params['status'] = $this->request->post['transaction_status']; + break; + case 'refund_process': + $api_params['refund_request'] = '1'; + + // Add refund amount in request. + $api_params['refund_param'] = trim($this->request->post['transaction_refund_amount']); + + // Add refund reference. + if(!empty($this->request->post['refund_ref'])) { + $api_params['refund_ref'] = trim($this->request->post['refund_ref']); + } + break; + case 'amount_booking_process': + unset($order_details['zero_amount_details']['create_payment_ref']); + $api_params = $order_details['zero_amount_details']; + + // Add booking amount in request. + $api_params['amount'] = trim($this->request->post['booking_amount']); + $api_params['payment_ref'] = $order_details['tid']; + $api_params['order_no'] = $this->request->post['order_no']; + break; + case 'amount_update_process': + $api_params['edit_status'] = '1'; + $api_params['update_inv_amount'] = '1'; + + // Add updated amount in request. + $api_params['amount'] = trim($this->request->post['novalnetAmountUpdate']); + + // Check for due date update. + if ($order_details['payment_id'] == '27' ) { + $api_params['due_date'] = trim($this->request->post['dueDateUpdate']); + } + elseif ($order_details['payment_id'] == '59' ) { + $api_params['due_date'] = trim($this->request->post['expiryDateUpdate']); + } + break; + } + + $response = $this->performCurlProcess('https://payport.novalnet.de/paygate.jsp', $api_params); + + parse_str($response, $api_response); + return $api_response; + } + + /** + * Perform CURL process + * + * @param $url + * @param $form + * @return string + */ + public function performCurlProcess($url, $form) { + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $form); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $data = curl_exec($ch); + curl_close($ch); + return $data; + } + + /** + * Get order status + * + * @param none + * @return integer + */ + public function getOrderStatus() { + $result = $this->model_extension_payment_novalnet->dbSelect('order', 'order_status_id', 'order_id =' . $this->request->post['order_no']); + return $result['order_status_id']; + } + + /** + * Confirm or Cancel process for the particular transactions. + * + * @param none + * @return boolean + */ + public function captureVoid() { + $this->load->language('extension/payment/novalnet_common'); + $this->load->model('extension/payment/novalnet'); + + // Validate status. + if (empty($this->request->post['transaction_status'])) { + $this->json['novalnet_field_error'] = $this->language->get('select_errors'); + $this->response->addHeader('Content-Type: application/json'); + $this->response->setOutput(json_encode($this->json)); + } else { + + $order_details = $this->model_extension_payment_novalnet->getNovalnetOrders($this->request->request['order_id']); + + // Perform Novalnet API process. + $response = $this->novalnetApiProcess($order_details); + // Check for valid response. + if ($this->checkResponseStatus($response)) { + $status = ''; + // Check for capture process. + if(isset($order_details['payment_id']) && in_array($order_details['payment_id'], array('27', '41','40','37','6','34'))) { + if($response['tid_status'] == 100 || ($response['tid_status'] == 90 && $order_details['payment_id'] == '34')) { + if(in_array($order_details['payment_id'], array('27', '41'))) + { + $this->json['success'] = $order_details['novalnet_comments'] = sprintf($this->language->get('text_invoice_transaction_confirm'), $order_details['tid'], ($response['due_date'])); + } + else{ + $this->json['success'] = $order_details['novalnet_comments'] = sprintf($this->language->get('text_transaction_confirm'), date('Y-m-d'), date('H:i:s')); + } + + $status = ($order_details['payment_id'] == '41') ? $this->config->get('payment_' . $order_details['payment_type'] . '_callback_order_status') : $this->config->get('payment_' . $order_details['payment_type'] . '_order_completion_status'); + $qry = $this->db->query('SELECT additional_details FROM ' . DB_PREFIX . 'novalnet_transactions WHERE tid = '.$order_details['tid']); + $bank_details = (array)json_decode($qry->row['additional_details']); + $bank_details['tid'] = $order_details['tid']; + $bank_details['invoice_account_holder'] = 'Novalnet AG'; + $invoice_details = array( + 'amount' => $order_details['transaction_details']['amount'] / 100, + 'currency' => $order_details['transaction_details']['currency'], + ); + $novalnet_invoice_comments = $this->prepareNovalnetComments($bank_details, $invoice_details, $order_details['payment_type'], $this->request->request['order_id'],$order_details['payment_id']); + $this->sendPaymentNotificationMail($this->request->request['order_id'], $novalnet_invoice_comments); + //Insert details into order_history table + $this->model_extension_payment_novalnet->updateTransactionComments($novalnet_invoice_comments, $this->request->post['transaction_status'], $status); + } + + } elseif ($this->checkResponseStatus($response, 'tid_status')) { + $this->json['success'] = $order_details['novalnet_comments'] = sprintf($this->language->get('text_transaction_confirm'), date('Y-m-d'), date('H:i:s')); + $status = $this->config->get('payment_' . $order_details['payment_type'] . '_order_completion_status'); + } + + // Check for void process. + if ($this->checkResponseStatus($response, 'tid_status', '103')) { + $status = $this->config->get('payment_novalnet_cancel_status'); + $this->json['success'] = $order_details['novalnet_comments'] = sprintf($this->language->get('text_transaction_cancel'), date('Y-m-d'), date('H:i:s')); + } + + // Check for PayPal transaction ID + if(!empty($response['paypal_transaction_id'])) { + $this->model_extension_payment_novalnet->dbUpdate('novalnet_transactions', array( + 'additional_details' => "'" . addslashes(json_encode(array( + 'paypal_transaction_id' => $response['paypal_transaction_id'], + 'tid' => $order_details['tid'], + ))) . "'" + ), 'tid=' . $order_details['tid']); + } + + // Update order details in tables. + $this->model_extension_payment_novalnet->orderDetailsUpdate($order_details, $this->request->post['transaction_status'], $status); + } else { + $this->json['error'] = $order_details['novalnet_comments'] = $this->getResponseText($response); + } + $this->response->addHeader('Content-Type: application/json'); + $this->response->setOutput(json_encode($this->json)); + } + } + + /** + * Get server response text + * + * @param $response + * @return string + */ + public function getResponseText($response) + { + return ((!empty($response['status_desc'])) ? $response['status_desc'] : ((!empty($response['status_message'])) ? ($response['status_message']) : ((!empty($response['status_text'])) ? $response['status_text'] : $this->language->get('error_payment_not_successful')))); + } + + /** + * Refund process for the particular transaction + * + * @param none + * @return boolean + */ + public function amountRefund() { + + // Load language content. + $this->load->language('extension/payment/novalnet_common'); + + // Load Novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Get refund amount. + $transaction_refund_amount = trim($this->request->post['transaction_refund_amount']); + + // Validate refund amount. + if (!$this->validateAmount($transaction_refund_amount)) { + $this->json['error'] = $this->language->get('error_amount_invalid'); + + } else { + + // Get order details. + $order_details = $this->model_extension_payment_novalnet->getNovalnetOrders($this->request->request['order_id']); + + // Perform Novalnet API process. + $response = $this->novalnetApiProcess($order_details); + + // Check for valid response. + if ($this->checkResponseStatus($response)) { + + // Form notification message. + $order_details['novalnet_comments'] = $this->language->get('refund_parent_tid_msg1') . $order_details['tid'] . sprintf($this->language->get('refund_parent_tid_msg2'), ($this->currency->format($transaction_refund_amount / 100, $order_details['transaction_details']['currency'], '1'))); + + // Calculate total refunded amount. + $order_details['transaction_details']['refund_amount'] = ($order_details['transaction_details']['refund_amount'] + $transaction_refund_amount); + + // Get Order status. + $order_status = ($response['tid_status'] != '100') ? $this->config->get('payment_novalnet_cancel_status') : $this->getOrderStatus(); + + // Add Additional note. + $order_details['novalnet_comments'] .= (!empty($response['tid'])) ? $this->language->get('refund_child_tid_msg') . $response['tid'] : ''; + + // Update order details in Novalnet tables and shop tables + $this->model_extension_payment_novalnet->orderDetailsUpdate($order_details, $response['tid_status'], $order_status); + + // Show success message. + $this->json['success'] = $order_details['novalnet_comments']; + } else { + // Show error message. + $this->json['error'] = $this->getResponseText($response); + } + } + $this->response->addHeader('Content-Type: application/json'); + $this->response->setOutput(json_encode($this->json)); + } + + /** + * Amount update process for the particular transaction + * + * @param none + * @return boolean + */ + public function amountUpdate() { + $this->load->language('extension/payment/novalnet_common'); + $this->load->model('extension/payment/novalnet'); + + $updated_amount = trim($this->request->post['novalnetAmountUpdate']); + + // Validate updated amount. + if (!$this->validateAmount($updated_amount)) { + $this->json['error'] = $this->language->get('error_amount_invalid'); + } else { + + // Get order details. + $order_details = $this->model_extension_payment_novalnet->getNovalnetOrders($this->request->request['order_id']); + + // Perform Novalnet API process. + $response = $this->novalnetApiProcess($order_details); + + // Check for valid response. + if ($this->checkResponseStatus($response)) { + $this->load->language('extension/payment/' . $order_details['payment_type']); + + $due_date = ''; + + if($order_details['payment_id'] == '27') { + $due_date = !empty($this->request->post['dueDateUpdate']) ? date($this->language->get('date_format_short'), strtotime($this->request->post['dueDateUpdate'])) : ''; + } + elseif ($order_details['payment_id'] == '59') { + $due_date = !empty($this->request->post['expiryDateUpdate']) ? date($this->language->get('date_format_short'), strtotime($this->request->post['expiryDateUpdate'])) : ''; + } + // Form comments. + if($order_details['payment_id'] != '37') { + if($order_details['payment_id'] == '59' || $order_details['payment_id'] == '27') { + $message = ($order_details['payment_id'] == '27') ? $order_details['novalnet_comments'] = $this->language->get('message_amount_update1') . sprintf("%.2f", $updated_amount / 100) . ' ' . $order_details['transaction_details']['currency'].' ' . sprintf($this->language->get('message_amount_update2'), $due_date) : $order_details['novalnet_comments'] = $this->language->get('message_amount_update1') . sprintf("%.2f", $updated_amount / 100) . ' ' . $order_details['transaction_details']['currency'].' ' . sprintf($this->language->get('message_amount_update3'), $due_date); + } + else { + $message = $order_details['novalnet_comments'] = $this->language->get('message_amount_update1') . sprintf("%.2f", $updated_amount / 100) . ' ' . $order_details['transaction_details']['currency']; + } + } + else { + $message = $order_details['novalnet_comments'] = $this->language->get('sepa_amount_update1') . sprintf("%.2f", $updated_amount / 100) . ' ' . $order_details['transaction_details']['currency'].' ' . sprintf($this->language->get('sepa_amount_update2'), date('Y-m-d'), date('H:i:s')); + } + + $order_details['transaction_details']['amount'] = $updated_amount; + $order_details['transaction_details']['total_amount'] = $updated_amount; + + $novalnet_transactions = array( + 'transaction_details' => "'" . json_encode($order_details['transaction_details']) . "'", + 'gateway_status' => $response['tid_status'], + ); + + if($order_details['payment_id'] == '27') { + $novalnet_response = $order_details['additional_details']; + $novalnet_response['tid'] = $order_details['tid']; + + $order_details['additional_details']['due_date'] = trim($this->request->post['dueDateUpdate']); + + $novalnet_transactions['additional_details'] = "'" . addslashes(json_encode($order_details['additional_details'])) . "'"; + $novalnet_response['amount'] = $updated_amount; + $novalnet_response['shop_tid'] = $novalnet_response['tid']; + $novalnet_response['currency'] = $order_details['transaction_details']['currency']; + $novalnet_response['due_date'] = $due_date; + $novalnet_response['order_no'] = $this->request->request['order_no']; + + $invoice_details = array( + 'amount' => $order_details['transaction_details']['amount'] / 100, + 'currency' => $order_details['transaction_details']['currency'], + ); + $order_details['novalnet_comments'] .= '

' . $this->prepareNovalnetComments($novalnet_response, $invoice_details, $order_details['payment_type'], $this->request->request['order_no']); + } + elseif($order_details['payment_id'] == '59') { + $novalnet_response = $order_details['additional_details']; + $novalnet_response['tid'] = $order_details['tid']; + + $order_details['additional_details']['cp_due_date'] = trim($this->request->post['expiryDateUpdate']); + + $novalnet_transactions['additional_details'] = "'" . addslashes(json_encode($order_details['additional_details'])) . "'"; + $novalnet_response['amount'] = $updated_amount; + $novalnet_response['shop_tid'] = $novalnet_response['tid']; + $novalnet_response['currency'] = $order_details['transaction_details']['currency']; + $novalnet_response['cp_due_date'] = $due_date; + $novalnet_response['order_no'] = $this->request->request['order_no']; + + $order_details['novalnet_comments'] .= '

' . $this->prepareBarzahlenComments($due_date, $this->request->request['order_no']); + } + + // Update amount and gateway status in transaction details. + $this->model_extension_payment_novalnet->dbUpdate('novalnet_transactions', $novalnet_transactions, 'order_no=' . $this->request->request['order_no']); + + // Update order details in Novalnet tables and shop tables + $this->model_extension_payment_novalnet->orderDetailsUpdate($order_details, $response['tid_status'], $this->getOrderStatus()); + + // Show success message. + $this->json['success'] = $message; + } else { + // Show error message. + $this->json['error'] = $this->getResponseText($response); + } + } + $this->response->addHeader('Content-Type: application/json'); + $this->response->setOutput(json_encode($this->json)); + } + + /** + * Prepare Novalnet transaction comments + * + * @param $response + * @param $order_info + * @param $payment_name + * @param $order_id + * @return string + */ + public function prepareNovalnetComments($response, $order_info, $payment_name, $order_id,$payment_id= '') + { + $response['invoice_account_holder'] = 'Novalnet AG'; + $novalnet_comments = ''; + if(!empty($payment_id) && in_array($payment_id ,array(40,41))) + { + $novalnet_comments .= $this->language->get('text_guarantee_payment') . '
' ; + } + $novalnet_comments .= $this->language->get('text_' . $payment_name . '_title') . '
'; + $novalnet_comments .= $this->language->get('text_novalnet_TID') . $response['tid'] . '
'; + $novalnet_comments .= ((!empty($response['test_mode']) && $response['test_mode'] == 1) || $this->config->get('payment_'.$payment_name . '_testmode') != 'no') ? $this->language->get('text_novalnet_test_order') : ''; + if (in_array($payment_name, array('novalnet_prepayment', 'novalnet_invoice'))) { + $novalnet_comments .= '

' . $this->language->get('text_novalnet_comments') . '
'; + $novalnet_comments .= $this->language->get('text_novalnet_due_date') . $response['due_date'] . '
'; + $novalnet_comments .= $this->language->get('text_novalnet_account_holder') . $response['invoice_account_holder'] . '
'; + $novalnet_comments .= $this->language->get('text_novalnet_iban') . $response['invoice_iban'] . '
'; + $novalnet_comments .= $this->language->get('text_novalnet_bic') . $response['invoice_bic'] . '
'; + $novalnet_comments .= $this->language->get('text_novalnet_bank') . $response['invoice_bankname'] . ' ' . $response['invoice_bankplace'] . '
'; + $novalnet_comments .= $this->language->get('text_novalnet_amount') . ($this->currency->format($order_info['amount'], $order_info['currency'], '1')) . '

'; + $novalnet_comments .= $this->language->get('text_novalnet_reference_any_one') . '
'; + $novalnet_comments .= $this->language->get('text_novalnet_reference') . ' 1: TID ' . $response['tid'] . '
'; + $novalnet_comments .= $this->language->get('text_novalnet_reference') . ' 2: BNR-' . trim($this->config->get('payment_novalnet_project_id')) . '-' . $order_id; + } + return $novalnet_comments; + } + + /** + * Prepare Barzahlen payment comments + * + * @param $due_date + * @param $order_no + * @return string + */ + + public function prepareBarzahlenComments($due_date, $order_no) { + $db_details = $this->db->query('SELECT comment FROM ' . DB_PREFIX . 'order_history WHERE order_id = '.$order_no.' order by `order_history_id` asc limit 1'); + $order_details = explode('
', $db_details->row['comment']); + $order_details['3'] = $this->language->get('text_slip_expiry_date') . ': '.$due_date; + $novalnet_comments = implode('
', $order_details); + return $novalnet_comments; + } + + /** + * Amount booking process for the particular transaction + * + */ + public function amountBooking() { + + // Load language content. + $this->load->language('extension/payment/novalnet_common'); + + // Load Novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Get order details. + $order_details = $this->model_extension_payment_novalnet->getNovalnetOrders($this->request->request['order_id']); + $order_details['transaction_details']['amount'] = $this->request->post['booking_amount']; + + // Validate amount. + if (!$this->validateAmount($order_details['transaction_details']['amount'])) { + $this->json['error'] = $this->language->get('empty_booking_amount'); + } else { + + // Perform Novalnet API process. + $response = $this->novalnetApiProcess($order_details); + + // Check for valid response. + if ($this->checkResponseStatus($response)) { + + $this->load->language('extension/payment/' . $order_details['payment_type']); + + // Prepare transaction comments. + $order_details['comments'] = $this->prepareNovalnetComments($response, $order_details['transaction_details'], $order_details['payment_type'], $this->request->request['order_no']); + + // Prepare notification message. + $notification_message = $this->language->get('confirm_booking1') . $this->currency->format($order_details['transaction_details']['amount'] / 100, $order_details['transaction_details']['currency'], '1') . ' ' . $this->language->get('confirm_booking2') . $response['tid']; + $order_details['comments'] .= '

' . $notification_message; + + $this->model_extension_payment_novalnet->updateBookingDetails($response, $order_details); + $this->json['success'] = $notification_message; + } else { + + // if the server response status is not 100, then display error message + $this->json['error'] = $this->getResponseText($response); + } + } + $this->response->addHeader('Content-Type: application/json'); + $this->response->setOutput(json_encode($this->json)); + } + + /** + * To validate amount + * + * @param $amount + * @return boolean + */ + public function validateAmount($amount) { + return !empty($amount) && ($amount > 0); + } + + /** + * To check status of the response + * + * @param $response + * @param $key + * @param $status + * @return boolean + */ + public function checkResponseStatus($response, $key = 'status' , $status = '100') { + return !empty($response[$key]) && $response[$key] == $status; + } + + /** + * To get the remote/server IP address + * + * @param string $type + * @return string + */ + + public function getIpAddress($type = 'REMOTE_ADDR') { + // Check to determine the IP address type + if ($type == 'SERVER_ADDR') { + if (empty($_SERVER['SERVER_ADDR'])) { + // Handled for IIS server + $ip_address = gethostbyname($_SERVER['SERVER_NAME']); + } else { + $ip_address =$this->request->server['SERVER_ADDR']; + } + } else { // For remote address + $ip_address = $this->getRemoteAddress(); + } + + return $ip_address; + } + + /** + * To get the remote IP address + * @return string + */ + + public function getRemoteAddress() + { + $ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'); + foreach ($ip_keys as $key) { + if (array_key_exists($key, $_SERVER) === true) { + foreach (explode(',', $_SERVER[$key]) as $ip) { + // trim for safety measures + return trim($ip); + } + } + } + } + + /** + * Recurring cancel process. + * + * @param none + * @return boolean + */ + public function recurringCancel() { + $json = array(); + $this->load->language('extension/payment/novalnet_common'); + + //Load Novalnet model. + $this->load->model('extension/payment/novalnet'); + + $this->model_extension_payment_novalnet->dbUpdate('novalnet_subscriptions', array( + 'next_subs_cycle' => "'0000-00-00'" + ), 'order_recurring_id=' . $this->request->request['order_recurring_id']); + + $this->model_extension_payment_novalnet->dbUpdate('order_recurring', array( + 'status' => "'3'" + ), 'order_recurring_id=' . $this->request->request['order_recurring_id']); + + $json['success'] = $this->language->get('text_recurring_cancel'); + + $this->response->addHeader('Content-Type: application/json'); + $this->response->setOutput(json_encode($json)); + } + + /** + * Send Guaranteed invoice payment confirmation mail to end customer + * + * @param $order_id + * @param $transaction_comments + * @return none + */ + + public function sendPaymentNotificationMail($order_id , $transaction_comments) + { + $get_customer_details = $this->model_extension_payment_novalnet->dbSelect('order', 'customer_id, firstname, lastname, email', 'order_id =' . $order_id); + if (!empty($get_customer_details['email'])) { + $shop_name = !empty($this->config->get('config_name')) ? $this->config->get('config_name') : ''; + $email_from = $this->config->get('config_email'); + $email_to = $get_customer_details['email']; + $email_subject = 'Order Confirmation - Your Order '.$order_id.' with '.$shop_name.' has been confirmed!'; + $email_content = ' +
+
+ + + Dear Mr./Ms./Mrs. '.$get_customer_details['firstname'].' '.$get_customer_details['lastname'].'

+ + We are pleased to inform you that your order has been confirmed.

+ + Subject: Order Confirmation - Your Order '.$order_id.' with '.$shop_name.' has been confirmed!

+ + Payment Information:

+ '.$transaction_comments.' +
+ +
+
+
+
+ '; + // Send Callback notification E-mail. + if (preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $email_to)) { + $mail = new Mail(); + $mail->setTo($email_to); + $mail->setFrom($email_from); + $mail->setSender($email_from); + $mail->setSubject($email_subject); + $mail->setHtml($email_content); + $mail->send(); + } + } else { + echo 'Mail not send'; + exit; + } + } +} diff --git a/admin/controller/extension/payment/novalnet_cashpayment.php b/admin/controller/extension/payment/novalnet_cashpayment.php new file mode 100644 index 0000000..6ec2fc1 --- /dev/null +++ b/admin/controller/extension/payment/novalnet_cashpayment.php @@ -0,0 +1,197 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + + // Load language. + $this->language->load('extension/payment/novalnet_cashpayment'); + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST') { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_cashpayment'); + } + + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_cashpayment'); + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuration content. + $this->getConfigurationContent($data); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet_cashpayment', $data)); + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + + foreach (array( + 'payment_novalnet_cashpayment_status', + 'payment_novalnet_cashpayment_testmode', + 'payment_novalnet_cashpayment_buyer_notification', + 'payment_novalnet_cashpayment_order_completion_status', + 'payment_novalnet_cashpayment_callback_order_status', + 'payment_novalnet_cashpayment_total', + 'payment_novalnet_cashpayment_geo_zone_id', + 'payment_novalnet_cashpayment_sort_order', + 'payment_novalnet_cashpayment_slip_expiry_date' + ) as $field) { + + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + + foreach (array( + 'novalnet_heading_title', + 'enable_test_mode', + 'slip_expiry_date', + 'slip_expiry_date_desc', + 'notification_buyer', + 'notification_buyer_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'text_enabled', + 'text_disabled', + 'text_novalnet_cashpayment', + 'logo_novalnet_cashpayment', + 'callback_order_status', + 'callback_order_status_desc', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_enable_payment', + 'entry_sort_order', + 'entry_sort_order_desc' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + + if ($this->config->get('payment_novalnet_cashpayment_status')) { + // Load language. + $this->load->language('extension/payment/novalnet_common'); + + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if(in_array($data['order_details']['gateway_status'], array('91', '100'))) { + $data['transaction_details'] = $data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show Manage transaction. + $data = $this->model_extension_payment_novalnet->showManageTransactionTab($data); + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + + // Show amount update / Expiry date update. + $data = $this->model_extension_payment_novalnet->showAmountExpiryDateUpdateTab($data); + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + } + } + + /** + * Fetching and displaying Novalnet recurring details + * + * @param none + * @return string + */ + public function recurringButtons() { + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + + // Load language. + $this->load->language('extension/payment/novalnet_common'); + foreach(array('text_novalnet_TID', 'text_novalnet_order_no', 'text_novalnet_amount', 'text_transaction_details', 'text_payment_method', 'text_next_charging_date', 'text_recurring_orders', 'button_subscription_cancel', 'text_loading') as $value){ + $data[$value] = $this->language->get($value); + } + + $data['subscription_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_subscriptions', 'next_subs_cycle', 'order_recurring_id =' . $this->request->get['order_recurring_id']); + + //Get order status id from order table + $data['recurring_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_recurring_transactions', 'order_no, tid, amount, payment_type, transaction_details, status', 'order_recurring_id =' . $this->request->get['order_recurring_id'], true); + + // Load language. + $this->load->language('extension/payment/novalnet_cashpayment'); + $data['payment_method'] = $this->language->get('heading_title'); + $data['next_subs_cycle'] = $data['subscription_details']['next_subs_cycle']; + $data['order_recurring_id'] = $this->request->get['order_recurring_id']; + $data['user_token'] = $this->session->data['user_token']; + return $this->load->view('sale/novalnet_recurring', $data); + } +} diff --git a/admin/controller/extension/payment/novalnet_cc.php b/admin/controller/extension/payment/novalnet_cc.php new file mode 100644 index 0000000..7e3e75c --- /dev/null +++ b/admin/controller/extension/payment/novalnet_cc.php @@ -0,0 +1,227 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + // Load language. + $this->language->load('extension/payment/novalnet_cc'); + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load Novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST') { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_cc'); + + } + + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_cc'); + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuaration content. + $this->getConfigurationContent($data); + + + // Add template. + + $this->response->setOutput($this->load->view('extension/payment/novalnet_cc', $data)); + +} + + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_cc_status', + 'payment_novalnet_cc_testmode', + 'payment_novalnet_cc_3d_enable', + 'payment_novalnet_cc_buyer_notification', + 'payment_novalnet_cc_order_completion_status', + 'payment_novalnet_cc_shopping_type', + 'payment_novalnet_cc_total', + 'payment_novalnet_cc_geo_zone_id', + 'payment_novalnet_cc_sort_order', + 'payment_novalnet_cc_image', + 'payment_novalnet_cc_iframe_standard_css_text', + 'payment_novalnet_cc_iframe_standard_input', + 'payment_novalnet_cc_iframe_standard_label', + 'payment_novalnet_cc_manual_limit', + 'payment_novalnet_cc_authenticate', + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'novalnet_heading_title', + 'entry_enable_3d', + 'entry_enable_3d_desc', + 'entry_display_amex_logo', + 'entry_display_amex_logo_desc', + 'entry_display_maestro_logo', + 'entry_display_maestro_logo_desc', + 'onhold_payment_action', + 'onhold_payment_action_desc', + 'shopping_type', + 'shopping_type_desc', + 'shopping_type_none', + 'one_click_shopping', + 'zero_amount_booking', + 'text_novalnet_cc', + 'logo_novalnet_cc', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_sort_order_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_sort_order', + 'notification_buyer', + 'order_completion_status', + 'order_completion_status_desc', + 'notification_buyer_desc', + 'text_true', + 'text_false', + 'entry_status', + 'entry_enable_payment', + 'text_enabled', + 'text_disabled', + 'enable_test_mode', + 'form_mode_desc', + 'text_iframe_configuration', + 'text_iframe_form_appearance', + 'text_iframe_css_text', + 'text_iframe_input', + 'authorize', + 'capture' + + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + + if ($this->config->get('payment_novalnet_cc_status')) { + $this->load->language('extension/payment/novalnet_common'); + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if(in_array($data['order_details']['gateway_status'], array('98', '100'))) { + + $data['transaction_details'] = $data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show zero amount booking. + $data = $this->model_extension_payment_novalnet->showAmountBookTab($data); + + if(!$data['show_amount_book']) { + + // Show Manage transaction. + $data = $this->model_extension_payment_novalnet->showManageTransactionTab($data); + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + } + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + } + + + } + + /** + * Fetching and displaying Novalnet recurring details + * + * @param none + * @return string + */ + public function recurringButtons() { + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + // Load language. + + $this->load->language('extension/payment/novalnet_common'); + foreach(array('text_novalnet_TID', 'text_novalnet_order_no', 'text_novalnet_amount', 'text_transaction_details', 'text_payment_method', 'text_next_charging_date', 'text_recurring_orders', 'button_subscription_cancel', 'text_loading') as $value){ + $data[$value] = $this->language->get($value); + } + + $data['subscription_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_subscriptions', 'next_subs_cycle', 'order_recurring_id =' . $this->request->get['order_recurring_id']); + + //Get order status id from order table + $data['recurring_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_recurring_transactions', 'order_no, tid, amount, payment_type, transaction_details, status', 'order_recurring_id =' . $this->request->get['order_recurring_id'], true); + // Load language. + $this->load->language('extension/payment/novalnet_cc'); + $data['payment_method'] = $this->language->get('heading_title'); + $data['next_subs_cycle'] = $data['subscription_details']['next_subs_cycle']; + $data['order_recurring_id'] = $this->request->get['order_recurring_id']; + $data['user_token'] = $this->session->data['user_token']; + return $this->load->view('sale/novalnet_recurring', $data); + } + + + +} diff --git a/admin/controller/extension/payment/novalnet_eps.php b/admin/controller/extension/payment/novalnet_eps.php new file mode 100644 index 0000000..1e8a0df --- /dev/null +++ b/admin/controller/extension/payment/novalnet_eps.php @@ -0,0 +1,150 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + // Load language. + $this->language->load('extension/payment/novalnet_eps'); + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load Novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST') { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_eps'); + } + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_eps'); + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuration content. + $this->getConfigurationContent($data); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet_eps', $data)); + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_eps_status', + 'payment_novalnet_eps_testmode', + 'payment_novalnet_eps_buyer_notification', + 'payment_novalnet_eps_order_completion_status', + 'payment_novalnet_eps_total', + 'payment_novalnet_eps_geo_zone_id', + 'payment_novalnet_eps_sort_order', + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'novalnet_heading_title', + 'enable_test_mode', + 'notification_buyer', + 'notification_buyer_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'text_enabled', + 'text_disabled', + 'text_novalnet_eps', + 'logo_novalnet_eps', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_enable_payment', + 'entry_sort_order', + 'entry_sort_order_desc' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + if ($this->config->get('payment_novalnet_eps_status')) { + + // Load language. + $this->load->language('extension/payment/novalnet_common'); + + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if($data['order_details']['gateway_status'] == '100') { + $data['transaction_details'] =$data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + } + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + } +} diff --git a/admin/controller/extension/payment/novalnet_giropay.php b/admin/controller/extension/payment/novalnet_giropay.php new file mode 100644 index 0000000..3280bce --- /dev/null +++ b/admin/controller/extension/payment/novalnet_giropay.php @@ -0,0 +1,151 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + // Load language. + $this->language->load('extension/payment/novalnet_giropay'); + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST') { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_giropay'); + } + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_giropay'); + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuration content. + $this->getConfigurationContent($data); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet_giropay', $data)); + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_giropay_status', + 'payment_novalnet_giropay_testmode', + 'payment_novalnet_giropay_buyer_notification', + 'payment_novalnet_giropay_order_completion_status', + 'payment_novalnet_giropay_total', + 'payment_novalnet_giropay_geo_zone_id', + 'payment_novalnet_giropay_sort_order', + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'novalnet_heading_title', + 'enable_test_mode', + 'notification_buyer', + 'notification_buyer_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'text_enabled', + 'text_disabled', + 'text_novalnet_giropay', + 'logo_novalnet_giropay', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_enable_payment', + 'entry_sort_order', + 'entry_sort_order_desc' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + if ($this->config->get('payment_novalnet_giropay_status')) { + + // Load language. + $this->load->language('extension/payment/novalnet_common'); + + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if($data['order_details']['gateway_status'] == '100') { + + $data['transaction_details'] = $data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + } + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + } +} diff --git a/admin/controller/extension/payment/novalnet_ideal.php b/admin/controller/extension/payment/novalnet_ideal.php new file mode 100644 index 0000000..69707b0 --- /dev/null +++ b/admin/controller/extension/payment/novalnet_ideal.php @@ -0,0 +1,147 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + // Load language. + $this->language->load('extension/payment/novalnet_ideal'); + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST') { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_ideal'); + } + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_ideal'); + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuaration content. + $this->getConfigurationContent($data); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet_ideal', $data)); + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_ideal_status', + 'payment_novalnet_ideal_testmode', + 'payment_novalnet_ideal_buyer_notification', + 'payment_novalnet_ideal_order_completion_status', + 'payment_novalnet_ideal_total', + 'payment_novalnet_ideal_geo_zone_id', + 'payment_novalnet_ideal_sort_order', + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'novalnet_heading_title', + 'enable_test_mode', + 'notification_buyer', + 'notification_buyer_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'text_enabled', + 'text_disabled', + 'text_novalnet_ideal', + 'logo_novalnet_ideal', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_enable_payment', + 'entry_sort_order', + 'entry_sort_order_desc' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + if ($this->config->get('payment_novalnet_ideal_status')) { + $this->load->language('extension/payment/novalnet_common'); + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if($data['order_details']['gateway_status'] == '100') { + + $data['transaction_details'] =$data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + } + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + } +} diff --git a/admin/controller/extension/payment/novalnet_instant_bank_transfer.php b/admin/controller/extension/payment/novalnet_instant_bank_transfer.php new file mode 100644 index 0000000..94bc679 --- /dev/null +++ b/admin/controller/extension/payment/novalnet_instant_bank_transfer.php @@ -0,0 +1,146 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + // Load language. + $this->language->load('extension/payment/novalnet_instant_bank_transfer'); + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST') { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_instant_bank_transfer'); + } + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_instant_bank_transfer'); + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuration content. + $this->getConfigurationContent($data); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet_instant_bank_transfer', $data)); + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_instant_bank_transfer_status', + 'payment_novalnet_instant_bank_transfer_testmode', + 'payment_novalnet_instant_bank_transfer_buyer_notification', + 'payment_novalnet_instant_bank_transfer_order_completion_status', + 'payment_novalnet_instant_bank_transfer_total', + 'payment_novalnet_instant_bank_transfer_geo_zone_id', + 'payment_novalnet_instant_bank_transfer_sort_order', + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'novalnet_heading_title', + 'enable_test_mode', + 'notification_buyer', + 'notification_buyer_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'text_enabled', + 'text_disabled', + 'text_novalnet_instant_bank_transfer', + 'logo_novalnet_instant_bank_transfer', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_enable_payment', + 'entry_sort_order', + 'entry_sort_order_desc' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + if ($this->config->get('payment_novalnet_instant_bank_transfer_status')) { + $this->load->language('extension/payment/novalnet_common'); + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if($data['order_details']['gateway_status'] == '100') { + $data['transaction_details'] =$data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + } + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + } +} diff --git a/admin/controller/extension/payment/novalnet_invoice.php b/admin/controller/extension/payment/novalnet_invoice.php new file mode 100644 index 0000000..3e5e0c2 --- /dev/null +++ b/admin/controller/extension/payment/novalnet_invoice.php @@ -0,0 +1,257 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + $data = array(); + + // Load language. + $this->language->load('extension/payment/novalnet_invoice'); + + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST' && $this->validate()) { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_invoice'); + } + + + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_invoice'); + + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuration content. + $this->getConfigurationContent($data); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet_invoice', $data)); + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_invoice_status', + 'payment_novalnet_invoice_due_date', + 'payment_novalnet_invoice_testmode', + 'payment_novalnet_invoice_buyer_notification', + 'payment_novalnet_invoice_order_completion_status', + 'payment_novalnet_invoice_callback_order_status', + 'payment_novalnet_invoice_total', + 'payment_novalnet_invoice_geo_zone_id', + 'payment_novalnet_invoice_sort_order', + 'payment_novalnet_invoice_guarantee_payment_enable', + 'payment_novalnet_invoice_guarantee_minimum_order_amount', + 'payment_novalnet_invoice_guarantee_payment_force', + 'payment_novalnet_invoice_manual_limit', + 'payment_novalnet_invoice_guarantee_pending_order_status', + 'payment_novalnet_invoice_authenticate' + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'novalnet_heading_title', + 'enable_test_mode', + 'enable_fraud_module', + 'enable_fraud_module_desc', + 'minimum_val_fraud_module', + 'minimum_val_fraud_module_desc', + 'notification_buyer', + 'notification_buyer_desc', + 'text_invoice_duedate_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'text_enabled', + 'text_disabled', + 'fraud_module_none', + 'fraud_module_callback', + 'fraud_module_sms', + 'text_novalnet_invoice', + 'logo_novalnet_invoice', + 'text_invoice_duedate', + 'onhold_payment_action', + 'onhold_payment_action_desc', + 'text_guarantee_payment_configuration', + 'text_guarantee_payment_requirements', + 'text_guarantee_payment_requirements_1', + 'text_guarantee_payment_requirements_2', + 'text_guarantee_payment_requirements_3', + 'text_guarantee_payment_requirements_4', + 'text_guarantee_payment_requirements_5', + 'text_guarantee_payment_enable', + 'text_guarantee_payment_minimum_order_amount', + 'text_guarantee_payment_minimum_order_amount_desc', + 'text_guarantee_payment_force_desc', + 'text_guarantee_payment_force', + 'error_guarantee_payment_minimum', + 'callback_order_status', + 'callback_order_status_desc', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_enable_payment', + 'entry_sort_order', + 'entry_sort_order_desc', + 'guarantee_payment_pending_status_desc', + 'authorize', + 'capture' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Validate the invoice duedate and guarantee payment configurations + * + * @param none + * @return boolean + */ + public function validate() { + + if (!empty($this->request->post['payment_novalnet_invoice_guarantee_payment_enable'])) { + + $minimum_amount = !empty($this->request->post['payment_novalnet_invoice_guarantee_minimum_order_amount']) ? trim($this->request->post['payment_novalnet_invoice_guarantee_minimum_order_amount']) : 999; + + // Validate for minimum amount. + if (!$this->model_extension_payment_novalnet->isNumeric($minimum_amount)) { + $this->error['error_warning'] = $this->language->get('text_guarantee_payment_minimum_error'); + $this->error['error_warning_id'] = 'novalnet_invoice_guarantee_minimum_order_amount'; + return false; + + } else if ($minimum_amount < 999) { + $this->error['error_warning'] = $this->language->get('text_guarantee_payment_minimum_error'); + $this->error['error_warning_id'] = 'novalnet_invoice_guarantee_minimum_order_amount'; + return false; + } + } + return true; + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + + if ($this->config->get('payment_novalnet_invoice_status')) { + + // Load language. + $this->load->language('extension/payment/novalnet_common'); + + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = $this->request->get['order_id']; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + if(in_array($data['order_details']['gateway_status'], array('91', '100'))) { + $data['transaction_details'] = $data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show Manage transaction. + $data = $this->model_extension_payment_novalnet->showManageTransactionTab($data); + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + + // Show amount update / Due date update. + if($data['order_details']['payment_id'] != "41") + $data = $this->model_extension_payment_novalnet->showAmountDueDateUpdateTab($data); + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + } + } + + /** + * Fetching and displaying Novalnet recurring details + * + * @param none + * @return string + */ + public function recurringButtons() { + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + + // Load language. + $this->load->language('extension/payment/novalnet_common'); + foreach(array('text_novalnet_TID', 'text_novalnet_order_no', 'text_novalnet_amount', 'text_transaction_details', 'text_payment_method', 'text_next_charging_date', 'text_recurring_orders', 'button_subscription_cancel', 'text_loading') as $value){ + $data[$value] = $this->language->get($value); + } + + $data['subscription_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_subscriptions', 'next_subs_cycle', 'order_recurring_id =' . $this->request->get['order_recurring_id']); + + //Get order status id from order table + $data['recurring_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_recurring_transactions', 'order_no, tid, amount, payment_type, transaction_details, status', 'order_recurring_id =' . $this->request->get['order_recurring_id'], true); + + // Load language. + $this->load->language('extension/payment/novalnet_invoice'); + $data['payment_method'] = $this->language->get('heading_title'); + $data['next_subs_cycle'] = $data['subscription_details']['next_subs_cycle']; + $data['order_recurring_id'] = $this->request->get['order_recurring_id']; + $data['user_token'] = $this->session->data['user_token']; + return $this->load->view('sale/novalnet_recurring', $data); + } +} diff --git a/admin/controller/extension/payment/novalnet_online_bank_transfer.php b/admin/controller/extension/payment/novalnet_online_bank_transfer.php new file mode 100644 index 0000000..5c5e0ef --- /dev/null +++ b/admin/controller/extension/payment/novalnet_online_bank_transfer.php @@ -0,0 +1,146 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + // Load language. + $this->language->load('extension/payment/novalnet_online_bank_transfer'); + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST') { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_online_bank_transfer'); + } + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_online_bank_transfer'); + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuration content. + $this->getConfigurationContent($data); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet_online_bank_transfer', $data)); + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_online_bank_transfer_status', + 'payment_novalnet_online_bank_transfer_testmode', + 'payment_novalnet_online_bank_transfer_buyer_notification', + 'payment_novalnet_online_bank_transfer_order_completion_status', + 'payment_novalnet_online_bank_transfer_total', + 'payment_novalnet_online_bank_transfer_geo_zone_id', + 'payment_novalnet_online_bank_transfer_sort_order', + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'novalnet_heading_title', + 'enable_test_mode', + 'notification_buyer', + 'notification_buyer_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'text_enabled', + 'text_disabled', + 'text_novalnet_online_bank_transfer', + 'logo_novalnet_online_bank_transfer', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_enable_payment', + 'entry_sort_order', + 'entry_sort_order_desc' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + if ($this->config->get('payment_novalnet_online_bank_transfer_status')) { + $this->load->language('extension/payment/novalnet_common'); + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if($data['order_details']['gateway_status'] == '100') { + $data['transaction_details'] =$data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + } + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + } +} diff --git a/admin/controller/extension/payment/novalnet_paypal.php b/admin/controller/extension/payment/novalnet_paypal.php new file mode 100644 index 0000000..328c7df --- /dev/null +++ b/admin/controller/extension/payment/novalnet_paypal.php @@ -0,0 +1,209 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + // Load language. + $this->language->load('extension/payment/novalnet_paypal'); + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST') { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_paypal'); + } + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_paypal'); + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuration content. + $this->getConfigurationContent($data); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet_paypal', $data)); + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_paypal_status', + 'payment_novalnet_paypal_testmode', + 'payment_novalnet_paypal_buyer_notification', + 'payment_novalnet_paypal_pending_order_status', + 'payment_novalnet_paypal_order_completion_status', + 'payment_novalnet_paypal_shopping_type', + 'payment_novalnet_paypal_total', + 'payment_novalnet_paypal_geo_zone_id', + 'payment_novalnet_paypal_sort_order', + 'payment_novalnet_paypal_manual_limit', + 'payment_novalnet_paypal_authenticate' + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'novalnet_heading_title', + 'enable_test_mode', + 'notification_buyer', + 'notification_buyer_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'paypal_pending_status', + 'paypal_pending_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'entry_enable_payment', + 'text_enabled', + 'text_disabled', + 'shopping_type', + 'shopping_type_desc', + 'onhold_payment_action', + 'onhold_payment_action_desc', + 'one_click_shopping', + 'zero_amount_booking', + 'text_novalnet_paypal', + 'logo_novalnet_paypal', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_sort_order_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_sort_order', + 'paypal_one_click_info', + 'shopping_type_none', + 'authorize', + 'capture' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + if ($this->config->get('payment_novalnet_paypal_status')) { + + // Load language. + $this->load->language('extension/payment/novalnet_common'); + + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if(in_array($data['order_details']['gateway_status'], array('85', '100'))) { + $data['transaction_details'] = $data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show zero amount booking. + $data = $this->model_extension_payment_novalnet->showAmountBookTab($data); + + if(!$data['show_amount_book']) { + + // Show Manage transaction. + $data = $this->model_extension_payment_novalnet->showManageTransactionTab($data); + + // Show zero amount booking. + $data = $this->model_extension_payment_novalnet->showManageTransactionTab($data); + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + } + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + + } + } + + /** + * Fetching and displaying Novalnet recurring details + * + * @param none + * @return string + */ + public function recurringButtons() { + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + + // Load language. + $this->load->language('extension/payment/novalnet_common'); + foreach(array('text_novalnet_TID', 'text_novalnet_order_no', 'text_novalnet_amount', 'text_transaction_details', 'text_payment_method', 'text_next_charging_date', 'text_recurring_orders', 'button_subscription_cancel', 'text_loading') as $value){ + $data[$value] = $this->language->get($value); + } + + $data['subscription_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_subscriptions', 'next_subs_cycle', 'order_recurring_id =' . $this->request->get['order_recurring_id']); + + //Get order status id from order table + $data['recurring_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_recurring_transactions', 'order_no, tid, amount, payment_type, transaction_details, status', 'order_recurring_id =' . $this->request->get['order_recurring_id'], true); + + // Load language. + $this->load->language('extension/payment/novalnet_paypal'); + $data['payment_method'] = $this->language->get('heading_title'); + $data['next_subs_cycle'] = $data['subscription_details']['next_subs_cycle']; + $data['order_recurring_id'] = $this->request->get['order_recurring_id']; + $data['user_token'] = $this->session->data['user_token']; + return $this->load->view('sale/novalnet_recurring', $data); + } +} diff --git a/admin/controller/extension/payment/novalnet_prepayment.php b/admin/controller/extension/payment/novalnet_prepayment.php new file mode 100644 index 0000000..a0cd659 --- /dev/null +++ b/admin/controller/extension/payment/novalnet_prepayment.php @@ -0,0 +1,192 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + // Load language. + $this->language->load('extension/payment/novalnet_prepayment'); + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST') { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_prepayment'); + } + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_prepayment'); + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuration content. + $this->getConfigurationContent($data); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet_prepayment', $data)); + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_prepayment_status', + 'payment_novalnet_prepayment_testmode', + 'payment_novalnet_prepayment_due_date', + 'payment_novalnet_prepayment_buyer_notification', + 'payment_novalnet_prepayment_order_completion_status', + 'payment_novalnet_prepayment_callback_order_status', + 'payment_novalnet_prepayment_total', + 'payment_novalnet_prepayment_geo_zone_id', + 'payment_novalnet_prepayment_sort_order', + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'novalnet_heading_title', + 'enable_test_mode', + 'notification_buyer', + 'notification_buyer_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'text_enabled', + 'text_disabled', + 'text_prepayment_duedate', + 'text_prepayment_duedate_desc', + 'text_novalnet_prepayment', + 'logo_novalnet_prepayment', + 'callback_order_status', + 'callback_order_status_desc', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_enable_payment', + 'entry_sort_order', + 'entry_sort_order_desc' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + if ($this->config->get('payment_novalnet_prepayment_status')) { + + // Load language. + $this->load->language('extension/payment/novalnet_common'); + + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if(in_array($data['order_details']['gateway_status'], array('91', '100'))) { + $data['transaction_details'] = $data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show Manage transaction. + $data = $this->model_extension_payment_novalnet->showManageTransactionTab($data); + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + + // Show amount update / Due date update. + $data = $this->model_extension_payment_novalnet->showAmountDueDateUpdateTab($data); + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + } + } + + /** + * Fetching and displaying Novalnet recurring details + * + * @param none + * @return string + */ + public function recurringButtons() { + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + + // Load language. + $this->load->language('extension/payment/novalnet_common'); + foreach(array('text_novalnet_TID', 'text_novalnet_order_no', 'text_novalnet_amount', 'text_transaction_details', 'text_payment_method', 'text_next_charging_date', 'text_recurring_orders', 'button_subscription_cancel', 'text_loading') as $value){ + $data[$value] = $this->language->get($value); + } + + $data['subscription_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_subscriptions', 'next_subs_cycle', 'order_recurring_id =' . $this->request->get['order_recurring_id']); + + //Get order status id from order table + $data['recurring_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_recurring_transactions', 'order_no, tid, amount, payment_type, transaction_details, status', 'order_recurring_id =' . $this->request->get['order_recurring_id'], true); + + // Load language. + $this->load->language('extension/payment/novalnet_prepayment'); + $data['payment_method'] = $this->language->get('heading_title'); + $data['next_subs_cycle'] = $data['subscription_details']['next_subs_cycle']; + $data['order_recurring_id'] = $this->request->get['order_recurring_id']; + $data['user_token'] = $this->session->data['user_token']; + return $this->load->view('sale/novalnet_recurring', $data); + } +} diff --git a/admin/controller/extension/payment/novalnet_przelewy24.php b/admin/controller/extension/payment/novalnet_przelewy24.php new file mode 100644 index 0000000..106c813 --- /dev/null +++ b/admin/controller/extension/payment/novalnet_przelewy24.php @@ -0,0 +1,156 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + + // Load language. + $this->language->load('extension/payment/novalnet_przelewy24'); + $this->document->setTitle($this->language->get('novalnet_heading_title')); + + // Load novalnet model. + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST') { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_przelewy24'); + } + + // Get template details. + $data = $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_przelewy24'); + + // Assign error. + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Add language content. + $this->getLanguageContent($data); + + // Add configuration content. + $this->getConfigurationContent($data); + + // Add template. + $this->response->setOutput($this->load->view('extension/payment/novalnet_przelewy24', $data)); + } + + /** + * Get configuration content. + * + * @param $data + * @return none + */ + public function getConfigurationContent(&$data) { + foreach (array( + 'payment_novalnet_przelewy24_status', + 'payment_novalnet_przelewy24_testmode', + 'payment_novalnet_przelewy24_buyer_notification', + 'payment_novalnet_przelewy24_pending_order_status', + 'payment_novalnet_przelewy24_order_completion_status', + 'payment_novalnet_przelewy24_shopping_type', + 'payment_novalnet_przelewy24_total', + 'payment_novalnet_przelewy24_geo_zone_id', + 'payment_novalnet_przelewy24_sort_order', + ) as $field) { + $data[$field] = (isset($this->request->post[$field])) ? $this->request->post[$field] : $this->config->get($field); + } + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'novalnet_heading_title', + 'enable_test_mode', + 'notification_buyer', + 'notification_buyer_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'przelewy24_pending_status', + 'przelewy24_pending_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'entry_enable_payment', + 'text_enabled', + 'text_disabled', + 'shopping_type', + 'shopping_type_desc', + 'one_click_shopping', + 'zero_amount_booking', + 'text_novalnet_przelewy24', + 'logo_novalnet_przelewy24', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_sort_order_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'text_all_zones', + 'entry_sort_order', + 'shopping_type_none' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + if ($this->config->get('payment_novalnet_przelewy24_status')) { + $this->load->language('extension/payment/novalnet_common'); + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if($data['order_details']['gateway_status'] == '100') { + + $data['transaction_details'] =$data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + + // Load Template. + return $this->load->view('extension/payment/novalnet_order', $data); + } + } + } +} diff --git a/admin/controller/extension/payment/novalnet_sepa.php b/admin/controller/extension/payment/novalnet_sepa.php new file mode 100644 index 0000000..5279be9 --- /dev/null +++ b/admin/controller/extension/payment/novalnet_sepa.php @@ -0,0 +1,256 @@ + '', + 'error_warning_id' => '', + ); + + /** + * Initiate the payment configurations + * + * @param none + * @return none + */ + public function index() { + $data = array(); + + // Load language. + $this->language->load('extension/payment/novalnet_sepa'); + $this->document->setTitle($this->language->get('heading_title')); + + // Load novalnet model. + $this->load->model('setting/setting'); + $this->load->model('extension/payment/novalnet'); + + // Validate and store payment configuration. + if ($this->request->server['REQUEST_METHOD'] == 'POST' && $this->validate()) { + $this->model_extension_payment_novalnet->storeConfigurations('payment_novalnet_sepa'); + } + $data['heading_title'] = $this->language->get('heading_title'); + $data = array_merge($data, $this->model_extension_payment_novalnet->getTemplateDetails('novalnet_sepa')); + + // Assign error. + + $data['error_warning'] = $this->error['error_warning']; + $data['error_warning_id'] = $this->error['error_warning_id']; + + // Get language content. + $this->getLanguageContent($data); + foreach (array( + 'payment_novalnet_sepa_status', + 'payment_novalnet_sepa_testmode', + 'payment_novalnet_sepa_buyer_notification', + 'payment_novalnet_sepa_order_completion_status', + 'payment_novalnet_sepa_shopping_type', + 'payment_novalnet_sepa_total', + 'payment_novalnet_sepa_geo_zone_id', + 'payment_novalnet_sepa_sort_order', + 'payment_novalnet_sepa_due_date', + 'payment_novalnet_sepa_guarantee_payment_enable', + 'payment_novalnet_sepa_guarantee_minimum_order_amount', + 'payment_novalnet_sepa_guarantee_payment_force', + 'payment_novalnet_sepa_manual_limit', + 'payment_novalnet_sepa_authenticate', + 'payment_novalnet_sepa_guarantee_pending_order_status' + ) as $fields) { + $data[$fields] = (isset($this->request->post[$fields])) ? $this->request->post[$fields] : $this->config->get($fields); + } + + $this->response->setOutput($this->load->view('extension/payment/novalnet_sepa', $data)); + } + + /** + * Get language content from language file. + * + * @param $data + * @return none + */ + public function getLanguageContent(&$data) { + foreach (array( + 'enable_test_mode', + 'enable_fraud_module', + 'enable_fraud_module_desc', + 'minimum_val_fraud_module', + 'minimum_val_fraud_module_desc', + 'notification_buyer', + 'notification_buyer_desc', + 'order_completion_status', + 'order_completion_status_desc', + 'text_true', + 'text_false', + 'entry_status', + 'entry_enable_payment', + 'text_enabled', + 'text_disabled', + 'shopping_type', + 'shopping_type_desc', + 'one_click_shopping', + 'zero_amount_booking', + 'fraud_module_none', + 'fraud_module_callback', + 'fraud_module_sms', + 'text_novalnet_sepa', + 'logo_novalnet_sepa', + 'button_save', + 'button_saveclose', + 'button_cancel', + 'entry_minimum_goods', + 'entry_minimum_goods_desc', + 'entry_sort_order_desc', + 'entry_geo_zone', + 'entry_geo_zone_desc', + 'onhold_payment_action', + 'onhold_payment_action_desc', + 'text_all_zones', + 'entry_sort_order', + 'text_sepa_due_date', + 'text_sepa_due_date_desc', + 'text_guarantee_payment_configuration', + 'text_guarantee_payment_requirements', + 'text_guarantee_payment_requirements_1', + 'text_guarantee_payment_requirements_2', + 'text_guarantee_payment_requirements_3', + 'text_guarantee_payment_requirements_4', + 'text_guarantee_payment_requirements_5', + 'text_guarantee_payment_enable', + 'text_guarantee_payment_minimum_order_amount', + 'text_guarantee_payment_minimum_order_amount_desc', + 'text_guarantee_payment_force_desc', + 'text_guarantee_payment_force', + 'guarantee_payment_pending_status_desc', + 'error_guarantee_payment_minimum', + 'shopping_type_none', + 'authorize', + 'capture' + ) as $value) { + $data[$value] = $this->language->get($value); + } + } + + /** + * Validate the sepa duedate and guarantee payment configurations + * + * @param none + * @return boolean + */ + public function validate() { + if (!empty($this->request->post['payment_novalnet_sepa_guarantee_payment_enable'])) { + + $minimum_amount = !empty($this->request->post['payment_novalnet_sepa_guarantee_minimum_order_amount']) ? trim($this->request->post['payment_novalnet_sepa_guarantee_minimum_order_amount']) : 999; + + // Validate for minimum amount. + if (!$this->model_extension_payment_novalnet->isNumeric($minimum_amount)) { + $this->error['error_warning'] = $this->language->get('text_guarantee_payment_minimum_error'); + $this->error['error_warning_id'] = 'novalnet_sepa_guarantee_minimum_order_amount'; + return false; + + } else if ($minimum_amount < 999) { + $this->error['error_warning'] = $this->language->get('text_guarantee_payment_minimum_error'); + $this->error['error_warning_id'] = 'novalnet_sepa_guarantee_minimum_order_amount'; + return false; + } + } + $this->load->model('extension/payment/novalnet'); + $sepa_due_date = trim($this->request->post['payment_novalnet_sepa_due_date']); + + if ((!empty($sepa_due_date) && $sepa_due_date < 2 || $sepa_due_date > 14) || $sepa_due_date == '0') { + $this->error['error_warning'] = $this->language->get('error_duration_date'); + return false; + } else { + return true; + } + } + + /** + * Fetching and displaying Novalnet extension features + * + * @param none + * @return string + */ + public function order() { + + if ($this->config->get('payment_novalnet_sepa_status')) { + $this->load->language('extension/payment/novalnet_common'); + $this->load->model('extension/payment/novalnet'); + $data['text_loading'] = $this->language->get('text_loading'); + $data['order_id'] = (!empty($this->request->get['order_id'])) ? $this->request->get['order_id'] : 0; + + // Get order details. + $data['order_details'] = $this->model_extension_payment_novalnet->getNovalnetOrders($data['order_id']); + + if(!empty($data['order_details']['gateway_status']) && in_array($data['order_details']['gateway_status'], array('99', '100'))) { + + $data['transaction_details'] =$data['order_details']['transaction_details']; + $data['user_token'] = $this->session->data['user_token']; + + // Show zero amount booking. + $data = $this->model_extension_payment_novalnet->showAmountBookTab($data); + + if(!$data['show_amount_book']) { + + // Show Manage transaction. + $data = $this->model_extension_payment_novalnet->showManageTransactionTab($data); + + // Show refund. + $data = $this->model_extension_payment_novalnet->showRefundTab($data); + + // Show amount update. + if($data['order_details']['payment_id'] != "40") + $data = $this->model_extension_payment_novalnet->showAmountUpdateTab($data); + + // Load Template. + } + return $this->load->view('extension/payment/novalnet_order', $data); + } + } + } + + /** + * Fetching and displaying Novalnet recurring details + * + * @param none + * @return string + */ + public function recurringButtons() { + // Load Novalnet Model. + $this->load->model('extension/payment/novalnet'); + + // Load language. + $this->load->language('extension/payment/novalnet_common'); + foreach(array('text_novalnet_TID', 'text_novalnet_order_no', 'text_novalnet_amount', 'text_transaction_details', 'text_payment_method', 'text_next_charging_date', 'text_recurring_orders', 'button_subscription_cancel', 'text_loading') as $value){ + $data[$value] = $this->language->get($value); + } + + $data['subscription_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_subscriptions', 'next_subs_cycle', 'order_recurring_id =' . $this->request->get['order_recurring_id']); + + //Get order status id from order table + $data['recurring_details'] = $this->model_extension_payment_novalnet->dbSelect('novalnet_recurring_transactions', 'order_no, tid, amount, payment_type, transaction_details, status', 'order_recurring_id =' . $this->request->get['order_recurring_id'], true); + + // Load language. + $this->load->language('extension/payment/novalnet_sepa'); + $data['payment_method'] = $this->language->get('heading_title'); + $data['next_subs_cycle'] = (!empty($data['subscription_details']['next_subs_cycle'])) ? $data['subscription_details']['next_subs_cycle'] : ''; + $data['order_recurring_id'] = $this->request->get['order_recurring_id']; + $data['user_token'] = $this->session->data['user_token']; + return $this->load->view('sale/novalnet_recurring', $data); + } +} diff --git a/admin/controller/novalnet/admin_portal.php b/admin/controller/novalnet/admin_portal.php new file mode 100644 index 0000000..ac8d3d1 --- /dev/null +++ b/admin/controller/novalnet/admin_portal.php @@ -0,0 +1,40 @@ +load->language('extension/payment/novalnet_common'); + $data['login_msg'] = $this->language->get('login_msg'); + $data['header'] = $this->load->controller('common/header'); + $data['column_left'] = $this->load->controller('common/column_left'); + $data['footer'] = $this->load->controller('common/footer'); + $this->response->setOutput($this->load->view('novalnet/admin_portal', $data)); + } +} diff --git a/admin/language/de-de/extension/payment/novalnet.php b/admin/language/de-de/extension/payment/novalnet.php new file mode 100644 index 0000000..e92c379 --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet.php @@ -0,0 +1,56 @@ + Wählen Sie Ihr Projekt > API-Anmeldeinformationen > API-Signatur (Produktaktivierungsschlüssel).'; +$_['entry_client_key'] = 'Schlüsselkunde'; +$_['error_mandatory_fields'] = 'Bitte füllen Sie die erforderlichen Felder aus'; +$_['error_email'] = 'Your E-mail address is invalid'; +$_['entry_merchant_id'] = 'Händler-ID'; +$_['entry_authcode'] = 'Authentifizierungscode'; +$_['entry_project_id'] = 'Projekt-ID'; +$_['entry_tariff'] = 'Auswahl der Tarif-ID'; +$_['entry_tariff_desc'] = 'Wählen Sie eine Tarif-ID, die dem bevorzugten Tarifplan entspricht, den Sie im Novalnet-Händleradminportal +für dieses Projekt erstellt haben'; +$_['entry_payment_access_key'] = 'Zahlungs-Zugriffsschlüssel'; +$_['entry_onhold_limit'] = 'Limit für onhold-Buchungen setzen (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)'; +$_['entry_onhold_limit_desc'] = 'Falls der Bestellbetrag das angegebene Limit übersteigt, wird die Transaktion ausgesetzt, bis Sie diese selbst bestätigen.'; +$_['entry_payment_logo'] = 'Zahlungslogo anzeigen'; +$_['entry_payment_logo_desc'] = 'Das Logo der Zahlungsart wird auf der Checkout-Seite angezeigt.'; +$_['entry_onhold_management'] = 'Verwaltung des Bestellstatus für ausgesetzte Zahlungen'; +$_['entry_onhold_confirm_status'] = 'On-hold-Bestellstatus'; +$_['entry_onhold_cancel_status'] = 'Bestellstatus für Stornierung'; +$_['entry_merchant_script_management'] = 'Verwaltung des Händlerskripts'; +$_['entry_merchant_script_test_mode'] = 'Manuelles Testen der Benachrichtigungs- / Webhook-URL erlauben'; +$_['entry_merchant_script_test_mode_desc'] = 'Aktivieren Sie diese Option, um die Novalnet-Benachrichtigungs-/Webhook-URL manuell zu testen. Deaktivieren Sie die Option, bevor Sie Ihren Shop liveschalten, um unautorisierte Zugriffe von Dritten zu blockieren'; +$_['entry_merchant_script_mail_notification'] = 'E-Mail-Benachrichtigungen einschalten'; +$_['entry_merchant_script_mail_notification_desc'] = 'Aktivieren Sie diese Option, um die angegebene E-Mail-Adresse zu benachrichtigen, wenn die Benachrichtigungs- / Webhook-URL erfolgreich ausgeführt wurde '; +$_['entry_notification_url'] = 'Benachrichtigungs- / Webhook-URL'; +$_['entry_notification_url_desc'] = 'Eine Benachrichtigungs- / Webhook-URL ist erforderlich, um die Datenbank / das System des Händlers mit dem Novalnet-Account synchronisiert zu halten (z.B. Lieferstatus). Weitere Informationen finden Sie in der Installationsanleitung'; +$_['entry_email_to_addr'] = 'E-Mails senden an'; +$_['entry_email_to_addr_desc'] = 'E-Mail-Benachrichtigungen werden an diese E-Mail-Adresse gesendet'; +$_['text_novalnet'] = 'Novalnet AG'; +$_['entry_admin_portal_src'] = 'Bevor Sie beginnen, lesen Sie bitte die Installationsanleitung und melden Sie sich mit Ihrem Händlerkonto im Novalnet Admin-Portal an. Um ein Händlerkonto zu erhalten, senden Sie bitte eine E-Mail an sales@novalnet.de oder rufen Sie uns unter +49 89 923068320 an'; +$_['entry_paypal_admin_portal_src'] = 'Um PayPal-Transaktionen zu akzeptieren, konfigurieren Sie Ihre PayPal-API-Informationen im Novalnet Admin-Portal > PROJEKT > Wählen Sie Ihr Projekt > Zahlungsmethoden > Paypal > Konfigurieren'; +$_['package_error'] = 'Erwähnt PHP-Paket (e) in diesem Server nicht verfügbar ist. Bitte aktivieren Sie sie.'; diff --git a/admin/language/de-de/extension/payment/novalnet_cashpayment.php b/admin/language/de-de/extension/payment/novalnet_cashpayment.php new file mode 100644 index 0000000..500c87c --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_cashpayment.php @@ -0,0 +1,24 @@ +'; +$_['logo_novalnet_cashpayment'] = 'Novalnet Barzahlen/viacash'; diff --git a/admin/language/de-de/extension/payment/novalnet_cc.php b/admin/language/de-de/extension/payment/novalnet_cc.php new file mode 100644 index 0000000..70cd94d --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_cc.php @@ -0,0 +1,40 @@ +Novalnet AG'; +$_['logo_novalnet_cc'] = 'Novalnet Kreditkarte Novalnet Kreditkarte'; +$_['text_iframe_configuration'] = 'CSS-Einstellungen für den iFrameformular'; +$_['text_iframe_form_appearance'] = 'Darstellung des Formulars'; +$_['text_iframe_css_text'] = 'Text für das CSS'; +$_['text_iframe_input'] = 'Eingabe'; +$_['text_iframe_label'] = 'Beschriftung'; +$_['authorize'] = 'Zahlung autorisieren'; +$_['capture'] = 'Zahlung einziehen'; +$_['entry_onhold_limit'] = 'Limit für onhold-Buchungen setzen (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)'; +$_['entry_onhold_limit_desc'] = 'Falls der Bestellbetrag das angegebene Limit übersteigt, wird die Transaktion ausgesetzt, bis Sie diese selbst bestätigen.'; diff --git a/admin/language/de-de/extension/payment/novalnet_common.php b/admin/language/de-de/extension/payment/novalnet_common.php new file mode 100644 index 0000000..575f250 --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_common.php @@ -0,0 +1,134 @@ +support@novalnet.de, um Zahlungsarten zu aktivieren.'; +$_['text_manage_transaction'] = 'Transaktion verwalten'; +$_['text_manage_transaction_process'] = 'Ablauf der Buchung steuern'; +$_['text_transaction_amount'] = 'Transaktionsbetrag'; +$_['text_refund'] = 'Rückerstattung für Transaktion'; +$_['text_refund_process'] = 'Ablauf der Rückerstattung'; +$_['text_refund_amount'] = 'Geben Sie bitte den erstatteten Betrag ein'; +$_['text_refund_reference'] = 'Referenz für die Rückerstattung: '; +$_['text_refund_amount_duedate_change'] = 'Betrag / Fälligkeitsdatum ändern'; +$_['text_amount_update'] = 'Betrag ändern'; +$_['text_amount_expiry_date_update'] = 'Betrag/Verfallsdatum des Zahlscheins ändern'; +$_['text_slip_expiry_date'] = 'Verfallsdatum des Zahlscheins'; +$_['text_amount_update_transaction_duedate'] = 'Fälligkeitsdatum der Transaktion'; +$_['text_amount_update_with_duedate_message'] = 'Sind Sie sicher, dass Sie den Bestellbetrag / das Fälligkeitsdatum ändern möchten?'; +$_['text_amount_update_message'] = 'Sind Sie sich sicher, dass Sie den Bestellbetrag ändern wollen?'; +$_['text_refund_message'] = 'Sind Sie sicher, dass Sie den Betrag zurückerstatten möchten?'; +$_['text_capture_message'] = 'Sind Sie sicher, dass Sie die Zahlung einziehen möchten?'; +$_['text_cancel_message'] = 'Sind Sie sicher, dass Sie die Zahlung stornieren wollen?'; +$_['text_book_message'] = 'Sind Sie sich sicher, dass Sie den Bestellbetrag buchen wollen?'; +$_['text_status_select'] = 'Wählen Sie bitte einen Status aus'; +$_['text_select'] = '--Auswählen--'; +$_['text_confirm'] = 'Zahlung einziehen'; +$_['text_cancel'] = 'Zahlung autorisieren'; +$_['text_update'] = 'Aktualisieren'; +$_['text_book'] = 'Buchen'; +$_['text_cents'] = ' (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR) '; +$_['text_booking_transaction'] = 'Transaktion durchführen'; +$_['text_booking_transaction_amount'] = 'Buchungsbetrag der Transaktion'; +$_['error_amount_update_duedate_future'] = 'Das Datum sollte in der Zukunft liegen.'; +$_['error_amount_update_duedate_invalid'] = 'Ungültiges Fälligkeitsdatum'; +$_['error_amount_invalid'] = 'Ungültiger Betrag'; +$_['select_errors'] = 'Wählen Sie bitte einen Status aus'; +$_['refund_parent_tid_msg1'] = 'Die Rückerstattung für die TID: '; +$_['refund_parent_tid_msg2'] = ' mit dem Betrag %s durchgeführt.'; +$_['refund_child_tid_msg'] = ' Ihre neue TID für den erstatteten Betrag: '; +$_['partial_refund_msg'] = 'Ablauf der Rückerstattung'; +$_['text_novalnet_TID'] = 'Novalnet Transaktions-ID: '; +$_['text_novalnet_test_order'] = 'Testbestellung'; +$_['empty_booking_amount'] = 'Ungültiger Betrag'; +$_['confirm_booking1'] = 'Ihre Bestellung wurde mit einem Betrag von '; +$_['confirm_booking2'] = 'gebucht. Ihre neue TID für den gebuchten Betrag: '; +$_['message_amount_update1'] = 'Die Transaktion wurde mit dem Betrag '; +$_['message_amount_update2'] = 'und dem Fälligkeitsdatum %s aktualisiert.'; +$_['message_amount_update3'] = 'neues Fälligkeitsdatum des Zahlscheins: %s.'; +$_['sepa_amount_update1'] = 'Transaktionsbetrag '; +$_['sepa_amount_update2'] = 'wurde am %s um %s Uhr erfolgreich geändert'; +$_['text_transaction_confirm'] = 'Die Buchung wurde am %s um %s Uhr bestätigt.'; +$_['text_amount_update_with_exipry_message'] = 'Sind Sie sicher, dass sie den Bestellbetrag / das Ablaufdatum des Zahlscheins ändern wollen?'; +$_['text_transaction_cancel'] = 'Die Transaktion wurde am %s um %s Uhr storniert'; +$_['text_transaction_details'] = 'Novalnet-Transaktionsdetails'; +$_['text_guarantee_payment_configuration'] = 'Einstellungen für die Zahlungsgarantie'; +$_['text_guarantee_payment_requirements'] = 'Grundanforderungen für die Zahlungsgarantie'; +$_['text_guarantee_payment_requirements_1'] = 'Zugelassene Staaten: AT, DE, CH'; +$_['text_guarantee_payment_requirements_2'] = 'Zugelassene Währung: EUR'; +$_['text_guarantee_payment_requirements_3'] = 'Mindestbetrag der Bestellung: 9,99 EUR'; +$_['text_guarantee_payment_requirements_4'] = 'Mindestalter: 18 Jahre'; +$_['text_guarantee_payment_requirements_5'] = 'Rechnungsadresse und Lieferadresse müssen übereinstimmen'; +$_['text_guarantee_payment_enable'] = 'Zahlungsgarantie aktivieren'; +$_['text_guarantee_payment_minimum_order_amount'] = 'Mindestbestellbetrag für Zahlungsgarantie (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)'; +$_['text_guarantee_payment_minimum_order_amount_desc'] = 'Geben Sie den Mindestbetrag (in Cent) für die zu bearbeitende Transaktion mit Zahlungsgarantie ein. Geben Sie z.B. 100 ein, was 1,00 entspricht. Der Standbetrag ist 9,99 EUR.'; +$_['text_guarantee_payment_force'] = 'Zahlung ohne Zahlungsgarantie erzwingen'; +$_['text_guarantee_payment_force_desc'] = 'Falls die Zahlungsgarantie zwar aktiviert ist, jedoch die Voraussetzungen für Zahlungsgarantie nicht erfüllt sind, wird die Zahlung ohne Zahlungsgarantie verarbeitet. '; +$_['text_guarantee_payment_minimum_error'] = 'Diese Einstellung überschreibt die Standardeinstellung für den Mindest-Bestellbetrag. Anmerkung: der Mindest-Bestellbetrag sollte größer oder gleich 9,99 EUR sein.'; +$_['text_novalnet_comments'] = 'Bitte überweisen Sie den Betrag auf das unten stehende Konto.'; +$_['text_novalnet_account_holder'] = 'Kontoinhaber: '; +$_['text_novalnet_due_date'] = 'Fälligkeitsdatum: '; +$_['text_novalnet_bank'] = 'Bank: '; +$_['text_novalnet_iban'] = 'IBAN: '; +$_['text_novalnet_bic'] = 'BIC: '; +$_['text_novalnet_amount'] = 'Betrag: '; +$_['text_novalnet_order_no'] = 'Bestellnummer '; +$_['text_novalnet_reference'] = 'Verwendungszweck'; +$_['text_novalnet_reference_any_one'] = 'Bitte verwenden Sie einen der unten angegebenen Verwendungszwecke für die Überweisung. Nur so kann Ihr Geldeingang Ihrer Bestellung zugeordnet werden: '; +$_['shopping_type'] = 'Einkaufstyp'; +$_['shopping_type_desc'] = 'Einkaufstyp auswählen'; +$_['shopping_type_none'] = 'Keiner'; +$_['one_click_shopping'] = 'Kauf mit einem Klick'; +$_['zero_amount_booking'] = 'Transaktionen mit Betrag 0'; +$_['callback_order_status'] = 'Callback-Bestellstatus'; +$_['callback_order_status_desc'] = 'Status, der zu verwendet wird, wenn das Callback-Skript für eine bei Novalnet eingegangene Zahlung ausgeführt wird '; +$_['text_recurring_cancel'] = 'Recurring order cancelled.'; +$_['text_next_charging_date'] = 'Nächstes Belastungsdatum: '; +$_['button_subscription_cancel'] = 'Abonnement kündigen'; +$_['text_recurring_orders'] = 'Novalnet-Bestellungen'; +$_['text_payment'] = 'Zahlarten'; +$_['text_extension'] = 'Erweiterungen'; +$_['text_novalnet_paypal_title'] = 'PayPal'; +$_['guarantee_payment_pending_status'] = 'Status für Bestellungen mit ausstehender Zahlung'; +$_['guarantee_payment_pending_status_desc'] ='Wählen Sie, welcher Status für Bestellungen mit ausstehender Zahlung verwendet wird'; +$_['entry_onhold_limit'] = 'Mindesttransaktionsbetrag für die Autorisierung (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)'; +$_['entry_onhold_limit_desc'] = 'Übersteigt der Bestellbetrag das genannte Limit, wird die Transaktion, bis zu ihrer Bestätigung durch Sie, auf on hold gesetzt. Sie können das Feld leer lassen, wenn Sie möchten, dass alle Transaktionen als on hold behandelt werden.'; +$_['text_invoice_transaction_confirm'] = 'Die Transaktion mit der TID: %s wurde erfolgreich bestätigt und das Fälligkeitsdatum auf %s gesetzt.'; +$_['text_novalnet_invoice_title'] = 'Kauf auf Rechnung'; +$_['text_novalnet_sepa_title'] = 'SEPA-Lastschrift'; +$_['text_novalnet_cc_title'] = 'Kredit- / Debitkarte'; +$_['text_novalnet_paypal_title'] = ' PayPal'; +$_['text_guarantee_payment'] = 'Diese Transaktion wird mit Zahlungsgarantie verarbeitet'; diff --git a/admin/language/de-de/extension/payment/novalnet_eps.php b/admin/language/de-de/extension/payment/novalnet_eps.php new file mode 100644 index 0000000..5d9db1e --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_eps.php @@ -0,0 +1,23 @@ +Novalnet AG'; +$_['logo_novalnet_eps'] = 'Novalnet eps'; diff --git a/admin/language/de-de/extension/payment/novalnet_giropay.php b/admin/language/de-de/extension/payment/novalnet_giropay.php new file mode 100644 index 0000000..9ac53a3 --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_giropay.php @@ -0,0 +1,23 @@ +Novalnet AG'; +$_['logo_novalnet_giropay'] = 'Novalnet giropay'; diff --git a/admin/language/de-de/extension/payment/novalnet_ideal.php b/admin/language/de-de/extension/payment/novalnet_ideal.php new file mode 100644 index 0000000..8918068 --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_ideal.php @@ -0,0 +1,23 @@ +Novalnet AG'; +$_['logo_novalnet_ideal'] = 'Novalnet iDEAL'; diff --git a/admin/language/de-de/extension/payment/novalnet_instant_bank_transfer.php b/admin/language/de-de/extension/payment/novalnet_instant_bank_transfer.php new file mode 100644 index 0000000..8b5ff58 --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_instant_bank_transfer.php @@ -0,0 +1,22 @@ +Novalnet AG'; +$_['logo_novalnet_instant_bank_transfer'] = 'Novalnet Sofortüberweisung'; diff --git a/admin/language/de-de/extension/payment/novalnet_invoice.php b/admin/language/de-de/extension/payment/novalnet_invoice.php new file mode 100644 index 0000000..58b46dc --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_invoice.php @@ -0,0 +1,32 @@ +Novalnet AG'; +$_['logo_novalnet_invoice'] = 'Novalnet Kauf auf Rechnung'; +$_['onhold_payment_action'] = 'Bearbeitungsmaßnahme'; +$_['onhold_payment_action_desc'] = ' Wählen Sie, ob die Zahlung sofort belastet werden soll oder nicht. Zahlung einziehen: Betrag sofort belasten. Zahlung autorisieren: Die Zahlung wird überprüft und autorisiert, aber erst zu einem späteren Zeitpunkt belastet. So haben Sie Zeit, über die Bestellung zu entscheiden'; +$_['authorize'] = 'Zahlung autorisieren'; +$_['capture'] = 'Zahlung einziehen'; +$_['entry_onhold_limit'] = 'Limit für onhold-Buchungen setzen (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)'; +$_['entry_onhold_limit_desc'] = 'Falls der Bestellbetrag das angegebene Limit übersteigt, wird die Transaktion ausgesetzt, bis Sie diese selbst bestätigen.'; diff --git a/admin/language/de-de/extension/payment/novalnet_online_bank_transfer.php b/admin/language/de-de/extension/payment/novalnet_online_bank_transfer.php new file mode 100644 index 0000000..887780b --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_online_bank_transfer.php @@ -0,0 +1,22 @@ +Novalnet AG'; +$_['logo_novalnet_online_bank_transfer'] = 'Novalnet Onlineüberweisung'; diff --git a/admin/language/de-de/extension/payment/novalnet_paypal.php b/admin/language/de-de/extension/payment/novalnet_paypal.php new file mode 100644 index 0000000..54e9169 --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_paypal.php @@ -0,0 +1,32 @@ +Novalnet AG'; +$_['logo_novalnet_paypal'] = 'Novalnet PayPal'; +$_['paypal_one_click_info'] = 'Um diese Option zu verwenden, müssen Sie die Option Billing Agreement (Zahlungsvereinbarung) in Ihrem PayPal-Konto aktiviert haben. Kontaktieren Sie dazu bitte Ihren Kundenbetreuer bei PayPal.'; +$_['onhold_payment_action'] = 'Bearbeitungsmaßnahme'; +$_['onhold_payment_action_desc'] = ' Wählen Sie, ob die Zahlung sofort belastet werden soll oder nicht. Zahlung einziehen: Betrag sofort belasten. Zahlung autorisieren: Die Zahlung wird überprüft und autorisiert, aber erst zu einem späteren Zeitpunkt belastet. So haben Sie Zeit, über die Bestellung zu entscheiden'; +$_['authorize'] = 'Zahlung autorisieren'; +$_['capture'] = 'Zahlung einziehen'; +$_['entry_onhold_limit'] = 'Limit für onhold-Buchungen setzen (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)'; +$_['entry_onhold_limit_desc'] = 'Falls der Bestellbetrag das angegebene Limit übersteigt, wird die Transaktion ausgesetzt, bis Sie diese selbst bestätigen.'; diff --git a/admin/language/de-de/extension/payment/novalnet_prepayment.php b/admin/language/de-de/extension/payment/novalnet_prepayment.php new file mode 100644 index 0000000..3ea3994 --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_prepayment.php @@ -0,0 +1,26 @@ +'; +$_['logo_novalnet_prepayment'] = 'Novalnet Vorauskasse'; diff --git a/admin/language/de-de/extension/payment/novalnet_przelewy24.php b/admin/language/de-de/extension/payment/novalnet_przelewy24.php new file mode 100644 index 0000000..6c4a045 --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_przelewy24.php @@ -0,0 +1,26 @@ +Novalnet AG'; +$_['logo_novalnet_przelewy24'] = 'Novalnet Przelewy24'; diff --git a/admin/language/de-de/extension/payment/novalnet_sepa.php b/admin/language/de-de/extension/payment/novalnet_sepa.php new file mode 100644 index 0000000..27bca8c --- /dev/null +++ b/admin/language/de-de/extension/payment/novalnet_sepa.php @@ -0,0 +1,32 @@ +Novalnet AG'; +$_['logo_novalnet_sepa'] = 'Novalnet Lastschrift SEPA'; +$_['onhold_payment_action'] = 'Bearbeitungsmaßnahme'; +$_['onhold_payment_action_desc'] = ' Wählen Sie, ob die Zahlung sofort belastet werden soll oder nicht. Zahlung einziehen: Betrag sofort belasten. Zahlung autorisieren: Die Zahlung wird überprüft und autorisiert, aber erst zu einem späteren Zeitpunkt belastet. So haben Sie Zeit, über die Bestellung zu entscheiden'; +$_['authorize'] = 'Zahlung autorisieren'; +$_['capture'] = 'Zahlung einziehen'; +$_['entry_onhold_limit'] = 'Limit für onhold-Buchungen setzen (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)'; +$_['entry_onhold_limit_desc'] = 'Falls der Bestellbetrag das angegebene Limit übersteigt, wird die Transaktion ausgesetzt, bis Sie diese selbst bestätigen.'; diff --git a/admin/language/en-gb/extension/payment/novalnet.php b/admin/language/en-gb/extension/payment/novalnet.php new file mode 100644 index 0000000..117210c --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet.php @@ -0,0 +1,54 @@ + Choose your project > API credentials > API Signature (Product activation key)'; +$_['entry_client_key'] = 'Client Key'; +$_['error_mandatory_fields'] = 'Please fill in the required fields'; +$_['error_email'] = 'Your E-mail address is invalid'; +$_['entry_merchant_id'] = 'Merchant ID'; +$_['entry_authcode'] = 'Authentication code'; +$_['entry_project_id'] = 'Project ID'; +$_['entry_tariff'] = 'Select Tariff ID'; +$_['entry_tariff_desc'] = 'Select a Tariff ID to match the preferred tariff plan you created at the Novalnet Admin Portal for this project'; +$_['entry_payment_access_key'] = 'Payment access key'; +$_['entry_payment_logo'] = 'Display payment logo'; +$_['entry_payment_logo_desc'] = 'The payment method logo(s) will be displayed on the checkout page.'; +$_['entry_onhold_management'] = 'Order status management for on-hold transaction'; +$_['entry_onhold_confirm_status'] = 'On-hold order status'; +$_['entry_onhold_cancel_status'] = 'Canceled order status'; +$_['entry_merchant_script_management'] = 'Notification / Webhook URL Setup '; +$_['entry_merchant_script_test_mode'] = 'Allow manual testing of the Notification / Webhook URL'; +$_['entry_merchant_script_test_mode_desc'] = 'Enable this to test the Novalnet Notification / Webhook URL manually. Disable this before setting your shop live to block unauthorized calls from external parties'; +$_['entry_merchant_script_mail_notification'] = 'Enable e-mail notification'; +$_['entry_merchant_script_mail_notification_desc'] = 'Enable this option to notify the given e-mail address when the Notification / Webhook URL is executed successfully.'; +$_['entry_notification_url'] = 'Notification / Webhook URL'; +$_['entry_notification_url_desc'] = 'Notification / Webhook URL is required to keep the merchant’s database/system synchronized with the Novalnet account (e.g. delivery status). Refer the Installation Guide for more information'; +$_['entry_email_to_addr'] = 'Send e-mail to'; +$_['entry_email_to_addr_desc'] = 'Notification / Webhook URL execution messages will be sent to this e-mail'; +$_['text_novalnet'] = 'Novalnet AG'; +$_['entry_admin_portal_src'] = 'Please read the Installation Guide before you start and login to the Novalnet Admin Portal using your merchant account. To get a merchant account, mail to sales@novalnet.de or call +49 (089) 923068320'; +$_['entry_paypal_admin_portal_src'] = 'To use the PayPal payment method please enter your PayPal API details in Novalnet Merchant Administration portal'; +$_['package_error'] = 'Mentioned PHP Package(s) not available in this Server. Please enable it.'; diff --git a/admin/language/en-gb/extension/payment/novalnet_cashpayment.php b/admin/language/en-gb/extension/payment/novalnet_cashpayment.php new file mode 100644 index 0000000..cde44ea --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_cashpayment.php @@ -0,0 +1,25 @@ +Novalnet AG'; +$_['logo_novalnet_cashpayment'] = 'Novalnet Barzahlen/viacash'; +$_['entry_image'] = 'Payment Logo Upload'; diff --git a/admin/language/en-gb/extension/payment/novalnet_cc.php b/admin/language/en-gb/extension/payment/novalnet_cc.php new file mode 100644 index 0000000..4bcd3fa --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_cc.php @@ -0,0 +1,36 @@ +Novalnet AG'; +$_['logo_novalnet_cc'] = 'Novalnet Credit Card Novalnet Credit Card'; +$_['text_iframe_configuration'] = 'CSS settings for iframe form'; +$_['text_iframe_form_appearance'] = 'Form appearance'; +$_['text_iframe_label'] = 'Label'; +$_['text_iframe_css_text'] = 'CSS Text'; +$_['text_iframe_input'] = 'Input'; +$_['authorize'] = 'Authorize'; +$_['capture'] = 'Capture'; + diff --git a/admin/language/en-gb/extension/payment/novalnet_common.php b/admin/language/en-gb/extension/payment/novalnet_common.php new file mode 100644 index 0000000..fd5d6fc --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_common.php @@ -0,0 +1,134 @@ +support@novalnet.de for activating payment methods!'; +$_['text_manage_transaction'] = 'Manage transaction'; +$_['text_manage_transaction_process'] = 'Manage transaction process'; +$_['text_transaction_amount'] = 'Transaction amount'; +$_['text_refund'] = 'Transaction refund'; +$_['text_refund_process'] = 'Refund process'; +$_['text_refund_amount'] = 'Please enter the refund amount:'; +$_['text_refund_reference'] = 'Refund reference: '; +$_['text_refund_amount_duedate_change'] = 'Change the amount / due date'; +$_['text_amount_update'] = 'Amount update'; +$_['text_amount_expiry_date_update'] = 'Change the amount/slip expiry date'; +$_['text_slip_expiry_date'] = 'Slip expiry date'; +$_['text_amount_update_transaction_duedate'] = 'Transaction due date'; +$_['text_amount_update_with_duedate_message'] = 'Are you sure you want to change the order amount / due date?'; +$_['text_amount_update_message'] = 'Are you sure you want to change the order amount?'; +$_['text_refund_message'] = 'Are you sure you want to refund the amount?'; +$_['text_capture_message'] = 'Are you sure you want to capture the payment?'; +$_['text_cancel_message'] = 'Are you sure you want to cancel the payment?'; +$_['text_book_message'] = 'Are you sure you want to book the order amount?'; +$_['text_status_select'] = 'Please select status'; +$_['text_select'] = 'Select'; +$_['text_confirm'] = 'confirm'; +$_['text_cancel'] = 'cancel'; +$_['text_update'] = 'Update'; +$_['text_book'] = 'Book'; +$_['text_cents'] = ' (in minimum unit of currency. E.g. enter 100 which is equal to 1.00) '; +$_['text_booking_transaction'] = 'Book transaction'; +$_['text_booking_transaction_amount'] = 'Transaction booking amount'; +$_['error_amount_update_duedate_future'] = 'The date should be in future'; +$_['error_amount_update_duedate_invalid'] = 'Invalid due date'; +$_['error_amount_invalid'] = 'The amount is invalid'; +$_['select_errors'] = 'Please select status'; +$_['refund_parent_tid_msg1'] = 'Refund has been initiated for the TID: '; +$_['refund_parent_tid_msg2'] = ' with the amount %s.'; +$_['refund_child_tid_msg'] = ' Your new TID for the refund amount:'; +$_['partial_refund_msg'] = 'Refund Process'; +$_['text_novalnet_TID'] = 'Novalnet transaction ID: '; +$_['text_novalnet_test_order'] = 'Test order'; +$_['empty_booking_amount'] = 'The amount is invalid'; +$_['confirm_booking1'] = 'Your order has been booked with the amount of '; +$_['confirm_booking2'] = '. Your new TID for the booked amount '; +$_['message_amount_update1'] = 'The transaction has been updated with amount '; +$_['message_amount_update2'] = 'and due date %s'; +$_['message_amount_update3'] = 'and slip expiry date %s'; +$_['text_amount_update_with_exipry_message'] = 'Are you sure you want to change the order amount / slip expiry date?'; +$_['sepa_amount_update1'] = 'Transaction amount '; +$_['sepa_amount_update2'] = 'has been updated successfully on %s %s'; +$_['text_transaction_confirm'] = 'The transaction has been confirmed on %s %s'; +$_['text_transaction_cancel'] = 'The transaction has been canceled on %s %s'; +$_['text_transaction_details'] = 'Novalnet transaction details'; +$_['text_guarantee_payment_configuration'] = 'Payment guarantee configuration'; +$_['text_guarantee_payment_requirements'] = 'Basic requirements for payment guarantee'; +$_['text_guarantee_payment_requirements_1'] = 'Allowed countries: AT, DE, CH'; +$_['text_guarantee_payment_requirements_2'] = 'Allowed currency: EUR'; +$_['text_guarantee_payment_requirements_3'] = 'Minimum order amount: 9,99 EUR or more'; +$_['text_guarantee_payment_requirements_4'] = 'Age limit: 18 years or more'; +$_['text_guarantee_payment_requirements_5'] = 'The billing address must be the same as the shipping address'; +$_['text_guarantee_payment_enable'] = 'Enable payment guarantee'; +$_['text_guarantee_payment_minimum_order_amount'] = 'Minimum order amount for payment guarantee (in minimum unit of currency. E.g. enter 100 which is equal to 1.00)'; +$_['text_guarantee_payment_minimum_order_amount_desc'] = 'Enter the minimum amount (in cents) for the transaction to be processed with payment guarantee. For example, enter 100 which is equal to 1,00. By default, the amount will be 9,99 EUR.'; +$_['text_guarantee_payment_force'] = 'Force Non-Guarantee payment'; +$_['text_guarantee_payment_force_desc'] = 'Even if payment guarantee is enabled, payments will still be processed as non-guarantee payments if the payment guarantee requirements are not met.'; +$_['text_guarantee_payment_minimum_error'] = 'This setting will override the default setting made in the minimum order amount. Note: Minimum amount should be greater than or equal to 9,99 EUR'; +$_['text_novalnet_comments'] = 'Please transfer the amount to the below mentioned account.'; +$_['text_novalnet_account_holder'] = 'Account holder: '; +$_['text_novalnet_due_date'] = 'Due date: '; +$_['text_novalnet_bank'] = 'Bank: '; +$_['text_novalnet_iban'] = 'IBAN: '; +$_['text_novalnet_bic'] = 'BIC: '; +$_['text_novalnet_amount'] = 'Amount: '; +$_['text_novalnet_order_no'] = 'Order number '; +$_['text_novalnet_reference'] = 'Payment Reference'; +$_['text_novalnet_reference_any_one'] = 'Please use any of the following payment references when transferring the amount. This is necessary to match it with your corresponding order:'; +$_['shopping_type'] = 'Shopping type'; +$_['shopping_type_desc'] = 'Select shopping type'; +$_['shopping_type_none'] = 'None'; +$_['one_click_shopping'] = 'One-click shopping'; +$_['zero_amount_booking'] = 'Zero amount booking'; +$_['callback_order_status'] = 'Callback order status'; +$_['callback_order_status_desc'] = 'Status to be used when callback script is executed for payment received by Novalnet'; +$_['text_recurring_cancel'] = 'Recurring order cancelled.'; +$_['text_next_charging_date'] = 'Next charging date: '; +$_['button_subscription_cancel'] = 'Cancel Subscription'; +$_['text_recurring_orders'] = 'Novalnet Orders'; +$_['text_payment'] = 'Payment'; +$_['text_extension'] = 'Extensions'; +$_['text_novalnet_paypal_title'] = 'PayPal'; +$_['guarantee_payment_pending_status'] = 'Payment pending order status'; +$_['guarantee_payment_pending_status_desc'] = 'Status to be used for pending transactions. '; +$_['entry_onhold_limit'] = 'Minimum transaction amount for authorization (in minimum unit of currency. E.g. enter 100 which is equal to 1.00)'; +$_['entry_onhold_limit_desc'] = 'In case the order amount exceeds the mentioned limit, the transaction will be set on-hold till your confirmation of the transaction. You can leave the field empty if you wish to process all the transactions as on-hold.'; +$_['text_invoice_transaction_confirm'] = 'The transaction has been confirmed successfully for the TID: %s and the due date updated as %s'; +$_['text_novalnet_invoice_title'] = 'Invoice'; +$_['text_novalnet_sepa_title'] = 'Direct Debit SEPA'; +$_['text_novalnet_cc_title'] = 'Credit/Debit Cards'; +$_['text_novalnet_paypal_title'] = ' PayPal'; +$_['text_guarantee_payment'] = 'This is processed as a guarantee payment'; diff --git a/admin/language/en-gb/extension/payment/novalnet_eps.php b/admin/language/en-gb/extension/payment/novalnet_eps.php new file mode 100644 index 0000000..db7088d --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_eps.php @@ -0,0 +1,24 @@ +Novalnet AG'; +$_['logo_novalnet_eps'] = 'Novalnet eps'; +$_['entry_image'] = 'Payment Logo Upload'; diff --git a/admin/language/en-gb/extension/payment/novalnet_giropay.php b/admin/language/en-gb/extension/payment/novalnet_giropay.php new file mode 100644 index 0000000..c6a4940 --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_giropay.php @@ -0,0 +1,24 @@ +Novalnet AG'; +$_['logo_novalnet_giropay'] = 'Novalnet giropay'; +$_['entry_image'] = 'Payment Logo Upload'; diff --git a/admin/language/en-gb/extension/payment/novalnet_ideal.php b/admin/language/en-gb/extension/payment/novalnet_ideal.php new file mode 100644 index 0000000..23b7f4c --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_ideal.php @@ -0,0 +1,24 @@ +Novalnet AG'; +$_['logo_novalnet_ideal'] = 'Novalnet iDEAL'; +$_['entry_image'] = 'Payment Logo Upload'; diff --git a/admin/language/en-gb/extension/payment/novalnet_instant_bank_transfer.php b/admin/language/en-gb/extension/payment/novalnet_instant_bank_transfer.php new file mode 100644 index 0000000..6fefb8a --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_instant_bank_transfer.php @@ -0,0 +1,24 @@ +Novalnet AG'; +$_['logo_novalnet_instant_bank_transfer'] = 'Novalnet Instant Bank Transfer'; +$_['entry_image'] = 'Payment Logo Upload'; diff --git a/admin/language/en-gb/extension/payment/novalnet_invoice.php b/admin/language/en-gb/extension/payment/novalnet_invoice.php new file mode 100644 index 0000000..f98a9b6 --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_invoice.php @@ -0,0 +1,30 @@ +Novalnet AG'; +$_['logo_novalnet_invoice'] = 'Novalnet Invoice'; +$_['onhold_payment_action'] = 'Payment action'; +$_['onhold_payment_action_desc'] = 'Choose whether or not the payment should be charged immediately. Capture completes the transaction by transferring the funds from buyer account to merchant account. Authorize verifies payment details and reserves funds to capture it later, giving time for the merchant to decide on the order'; +$_['authorize'] = 'Authorize'; +$_['capture'] = 'Capture'; diff --git a/admin/language/en-gb/extension/payment/novalnet_online_bank_transfer.php b/admin/language/en-gb/extension/payment/novalnet_online_bank_transfer.php new file mode 100644 index 0000000..910740e --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_online_bank_transfer.php @@ -0,0 +1,24 @@ +Novalnet AG'; +$_['logo_novalnet_online_bank_transfer'] = 'Novalnet Online Bank Transfer'; +$_['entry_image'] = 'Payment Logo Upload'; diff --git a/admin/language/en-gb/extension/payment/novalnet_paypal.php b/admin/language/en-gb/extension/payment/novalnet_paypal.php new file mode 100644 index 0000000..8ee96e6 --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_paypal.php @@ -0,0 +1,30 @@ +Novalnet AG'; +$_['logo_novalnet_paypal'] = 'Novalnet PayPal'; +$_['paypal_one_click_info'] = 'In order to use this option you must have billing agreement option enabled in your PayPal account. Please contact your account manager at PayPal.'; +$_['onhold_payment_action'] = 'Payment action'; +$_['onhold_payment_action_desc'] = 'Choose whether or not the payment should be charged immediately. Capture completes the transaction by transferring the funds from buyer account to merchant account. Authorize verifies payment details and reserves funds to capture it later, giving time for the merchant to decide on the order'; +$_['authorize'] = 'Authorize'; +$_['capture'] = 'Capture'; diff --git a/admin/language/en-gb/extension/payment/novalnet_prepayment.php b/admin/language/en-gb/extension/payment/novalnet_prepayment.php new file mode 100644 index 0000000..52ab025 --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_prepayment.php @@ -0,0 +1,26 @@ +Novalnet AG'; +$_['logo_novalnet_prepayment'] = 'Novalnet Prepayment'; +$_['entry_image'] = 'Payment Logo Upload'; diff --git a/admin/language/en-gb/extension/payment/novalnet_przelewy24.php b/admin/language/en-gb/extension/payment/novalnet_przelewy24.php new file mode 100644 index 0000000..acc4e4c --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_przelewy24.php @@ -0,0 +1,26 @@ +Novalnet AG'; +$_['logo_novalnet_przelewy24'] = 'Novalnet Przelewy24'; +$_['entry_image'] = 'Payment Logo Upload'; diff --git a/admin/language/en-gb/extension/payment/novalnet_sepa.php b/admin/language/en-gb/extension/payment/novalnet_sepa.php new file mode 100644 index 0000000..24ad0d9 --- /dev/null +++ b/admin/language/en-gb/extension/payment/novalnet_sepa.php @@ -0,0 +1,31 @@ +Novalnet AG'; +$_['logo_novalnet_sepa'] = 'Novalnet Direct Debit SEPA'; +$_['onhold_payment_action'] = 'Payment action'; +$_['onhold_payment_action_desc'] = 'Choose whether or not the payment should be charged immediately. Capture completes the transaction by transferring the funds from buyer account to merchant account. Authorize verifies payment details and reserves funds to capture it later, giving time for the merchant to decide on the order'; +$_['authorize'] = 'Authorize'; +$_['capture'] = 'Capture'; diff --git a/admin/model/extension/payment/novalnet.php b/admin/model/extension/payment/novalnet.php new file mode 100644 index 0000000..0c18b81 --- /dev/null +++ b/admin/model/extension/payment/novalnet.php @@ -0,0 +1,519 @@ +db->query("CREATE TABLE IF NOT EXISTS " . DB_PREFIX . "novalnet_transactions ( + id int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID', + order_no int(11) unsigned NOT NULL COMMENT 'Order ID from shop', + tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + gateway_status varchar(9) NOT NULL COMMENT 'Novalnet transaction status', + payment_type varchar(100) NOT NULL COMMENT 'Novalnet payment type', + payment_id int(11) unsigned NOT NULL COMMENT 'Payment ID', + customer_id int(11) unsigned DEFAULT NULL COMMENT 'Customer ID from shop', + create_payment_ref ENUM('0', '1') COMMENT 'Create payment reference', + payment_configurations text COMMENT 'Store payment configuration details', + transaction_details text COMMENT 'Store transaction details', + one_click_details text COMMENT 'Stroe one click details', + zero_amount_details text COMMENT 'Store zero amount details', + additional_details text COMMENT 'Store additional details', + `date` datetime NOT NULL COMMENT 'Transaction Date for reference', + PRIMARY KEY (id), + KEY tid (tid), + KEY order_no (order_no) + ) COMMENT='Novalnet Transaction History'"); + $this->db->query("CREATE TABLE IF NOT EXISTS " . DB_PREFIX . "novalnet_recurring_transactions ( + id int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID', + order_no int(11) unsigned NOT NULL COMMENT 'Order ID from shop', + order_recurring_id int(11) unsigned NOT NULL COMMENT 'Order recurring id', + tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Recurring Transaction Reference ID', + amount varchar(50) DEFAULT NULL COMMENT 'Recurring amounts', + payment_type varchar(100) NOT NULL COMMENT 'Novalnet payment type', + transaction_details text COMMENT 'Store recurring transaction details', + status varchar(10) DEFAULT NULL COMMENT 'Recurring order status', + date_added datetime NOT NULL COMMENT 'Transaction Date for reference', + PRIMARY KEY (id), + KEY tid (tid), + KEY order_no (order_no), + KEY order_recurring_id (order_recurring_id) + ) COMMENT='Novalnet Recurring Transaction Details'"); + $this->db->query("CREATE TABLE IF NOT EXISTS " . DB_PREFIX . "novalnet_subscriptions ( + id int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto increment ID', + order_no int(11) unsigned NOT NULL COMMENT 'Order ID from shop', + order_recurring_id int(11) unsigned NOT NULL COMMENT 'Order recurring id', + tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + next_subs_cycle date COMMENT 'Next Recurring date', + trial_details text COMMENT 'Store subscription trial details', + recurring_details text COMMENT 'Store subscription recurring details', + additional_details text COMMENT 'Store subscription additional details', + recurring_date_added date COMMENT 'Recurring date added', + PRIMARY KEY (id), + KEY order_no (order_no), + KEY order_recurring_id (order_recurring_id) + ) COMMENT='Novalnet Subscription Transaction Details'"); + $this->db->query("CREATE TABLE IF NOT EXISTS " . DB_PREFIX . "novalnet_merchant_script ( + id int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID', + order_no int(11) unsigned NOT NULL COMMENT 'Order ID from shop', + original_tid bigint(20) unsigned DEFAULT NULL COMMENT 'Original Transaction ID', + callback_tid bigint(20) unsigned NOT NULL COMMENT 'Callback Reference ID', + payment_type varchar(100) NOT NULL COMMENT 'Callback Payment Type', + amount int(11) DEFAULT NULL COMMENT 'Amount in cents', + `date` datetime NOT NULL COMMENT 'Callback DATE TIME', + PRIMARY KEY (id), + KEY order_no (order_no) + ) COMMENT='Novalnet Callback Details'"); + } + + + /** + * Return template details + * + * @param $payment_name + * @return array + */ + public function getTemplateDetails($payment_name) { + + $this->load->model('localisation/order_status'); + $this->load->model('localisation/geo_zone'); + return array( + 'breadcrumbs' => array(), + 'breadcrumbs' => array( + array( + 'text' => $this->language->get('text_home'), + 'href' => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'], true) + ), + array( + 'text' => $this->language->get('text_extension'), + 'href' => $this->url->link('extension/extension', 'user_token=' . $this->session->data['user_token'] . '&type=payment', true) + ), + array( + 'text' => $this->language->get('heading_title'), + 'href' => $this->url->link('extension/payment/' . $payment_name, 'user_token=' . $this->session->data['user_token'], true) + ), + ), + 'order_statuses' => $this->model_localisation_order_status->getOrderStatuses(), + 'geo_zones' => $this->model_localisation_geo_zone->getGeoZones(), + 'action' => $this->url->link('extension/payment/' . $payment_name, 'user_token=' . $this->session->data['user_token'], true), + 'cancel' => $this->url->link('marketplace/extension', 'user_token=' . $this->session->data['user_token'] . '&type=payment', true), + 'button_save' => $this->language->get('button_save'), + 'button_cancel' => $this->language->get('button_cancel'), + 'language' => $this->language->get('code'), + 'header' => $this->load->controller('common/header'), + 'column_left' => $this->load->controller('common/column_left'), + 'footer' => $this->load->controller('common/footer'), + ); + } + + /** + * Store payment configuration details + * + * @param $payment_name + * @return none + */ + public function storeConfigurations($payment_name) { + $this->load->model('setting/setting'); + + $this->model_setting_setting->editSetting($payment_name, $this->request->post); + $this->session->data['success'] = $this->language->get('text_success'); + $this->response->redirect($this->url->link('marketplace/extension', 'user_token=' . $this->session->data['user_token'] . '&type=payment', true)); + + + } + + /** + * Check whether the value is numeric or not + * + * @param $input + * @return boolean + */ + public function isNumeric($input) { + return preg_match("/^[0-9]+$/", trim($input)); + } + + /** + * Get Novalnet order details + * + * @param $order_no + * @return $transaction_details + */ + public function getNovalnetOrders($order_no) { + $db_details = $this->db->query('SELECT tid, gateway_status, payment_type, payment_id, customer_id, payment_configurations, transaction_details, additional_details, zero_amount_details, date FROM ' . DB_PREFIX . 'novalnet_transactions WHERE order_no = ' . $order_no ); + $transaction_details = $db_details->row; + + // Decode the encoded datas. + $transaction_details['transaction_details'] = !empty($db_details->row['transaction_details']) ? json_decode($db_details->row['transaction_details'], true) : ''; + $transaction_details['additional_details'] = !empty($db_details->row['additional_details']) ? json_decode($db_details->row['additional_details'], true) : ''; + $transaction_details['payment_configurations'] = !empty($db_details->row['payment_configurations']) ? json_decode($db_details->row['payment_configurations'], true) : ''; + $transaction_details['zero_amount_details'] = !empty($db_details->row['zero_amount_details']) ? json_decode($db_details->row['zero_amount_details'], true) : ''; + + return $transaction_details; + } + + /** + * Update the values into the database + * + * @param $table_name + * @param $fields + * @param $conditions + * @return none + */ + public function dbUpdate($table_name, $fields, $conditions) { + $get_fields = ''; + if (is_array($fields)) { + foreach ($fields as $key => $value) { + $get_fields .= $key . '=' . $value . ','; + } + $get_fields = substr($get_fields, 0, -1); + } else { + $get_fields = $fields; + } + $this->db->query("UPDATE " . DB_PREFIX . $table_name . " SET " . $get_fields . " WHERE " . $conditions); + } + + /** + * Insert values into the database + * + * @param $table_name + * @param $insert_columns + * @param $insert_values + * @return none + */ + public function dbInsert($table_name, $insert_columns, $insert_values) { + $get_columns = implode(',', $insert_columns); + $get_values = implode(',', $insert_values); + $this->db->query("INSERT INTO " . DB_PREFIX . $table_name . "(" . $get_columns . ") values (" . $get_values . ")"); + } + + /** + * Select the database row values + * + * @param $table_name + * @param $fields + * @param $conditions + * @param $check + * @return array + */ + public function dbSelect($table_name, $fields, $conditions, $check=false) + { + $select_query = 'SELECT ' . $fields . ' FROM ' . DB_PREFIX . $table_name . ' WHERE ' . $conditions; + $result = $this->db->query($select_query); + return ($check) ? $result->rows : $result->row; + } + + /** + * Update order details Novalnet tables + * + * @param $order_details + * @param $order_manage_status + * @param $status + * @return none + */ + public function orderDetailsUpdate($order_details, $order_manage_status, $status) { + //Update status in order table + $this->dbUpdate('order', array( + 'order_status_id' => $status + ), 'order_id=' . $this->request->post['order_no']); + + //Insert details into order_history table + $this->dbInsert('order_history', array( + 'order_id', + 'order_status_id', + 'notify', + 'comment', + 'date_added' + ), array( + $this->request->post['order_no'], + $status, + 1, + '"' . $order_details['novalnet_comments'] . '"', + '"' . date('Y-m-d H:i:s') . '"' + )); + + //Update gateway_status and refund_amount in novalnet_transactions table + $this->dbUpdate('novalnet_transactions', array( + 'gateway_status' => $order_manage_status + ), 'order_no=' . $this->request->post['order_no']); + } + + /** + * Update booking details in Novalnet tables + * + * @param $response + * @param $order_details + * @return none + */ + public function updateBookingDetails($response, $order_details) { + + //Update booking details in novalnet_transaction_detail table + $this->dbUpdate('novalnet_transactions', array( + 'tid' => $response['tid'], + 'transaction_details' => "'" . json_encode($order_details['transaction_details']) . "'", + 'gateway_status' => $response['tid_status'], + 'zero_amount_details' => 0 + ), 'order_no = ' . $response['order_no']); + + //Get order status id from order table + $details = $this->dbSelect('order', 'order_status_id', 'order_id =' . $response['order_no']); + + //Insert details into order_history table + $this->dbInsert('order_history', array( + 'order_id', + 'order_status_id', + 'notify', + 'comment', + 'date_added' + ), array( + $response['order_no'], + $details['order_status_id'], + 1, + '"' . $order_details['comments'] . '"', + '"' . date('Y-m-d H:i:s') . '"' + )); + + //Insert details into novalnet_callback_history table + $this->dbInsert('novalnet_merchant_script', array( + 'order_no', + 'original_tid', + 'callback_tid', + 'payment_type', + 'amount', + 'date' + ), array( + $response['order_no'], + $response['tid'], + $response['tid'], + '"' . $order_details['payment_type'] . '"', + $order_details['transaction_details']['amount'], + '"' . date('Y-m-d H:i:s') . '"' + )); + } + + /** + * Show refund tab + * + * @param $data + * @return array + */ + public function showRefundTab($data) { + $data['show_refund'] = (!empty($data['order_details']['gateway_status']) && $data['order_details']['gateway_status'] == '100'); + + if($data['show_refund']) { + + $this->load->model('sale/order'); + $order_info = $this->model_sale_order->getOrder($data['order_id']); + + $data['customer_name'] = $order_info['customer']; + + $data['show_refund_reference'] = date('Y-m-d') != date('Y-m-d', strtotime($data['order_details']['date'])); + + foreach(array( + 'text_refund_process', + 'text_refund', + 'text_refund_amount', + 'text_cents', + 'text_refund_reference', + 'text_update', + 'text_refund_message', + 'error_amount_invalid' + ) as $v){ + $data[$v] = $this->language->get($v); + } + } + + return $data; + } + + /** + * Show manage transaction tab + * + * @param $data + * @return array + */ + public function showManageTransactionTab($data) { + $data['show_manage_transaction'] = (!empty($data['order_details']['gateway_status']) && in_array($data['order_details']['gateway_status'], array('85', '91', '98', '99'))); + + if ($data['show_manage_transaction']) { + foreach(array( + 'text_manage_transaction_process', + 'text_status_select', + 'text_select', + 'text_confirm', + 'text_cancel_message', + 'text_capture_message', + 'text_cancel', + 'text_update', + ) as $v){ + $data[$v] = $this->language->get($v); + } + } + return $data; + } + + /** + * Show amount/ due date update tab + * + * @param $data + * @return array + */ + public function showAmountDueDateUpdateTab($data) { + + //Get order status id from order table + $details = $this->dbSelect('novalnet_merchant_script', 'SUM(amount) as order_amount', 'order_no =' . $data['order_id']); + + $data['show_amount_update'] = $data['show_due_date_update'] = (!empty($data['order_details']['gateway_status']) && $data['order_details']['gateway_status'] == '100' && $details['order_amount'] < $data['order_details']['transaction_details']['amount']); + + if ($data['show_amount_update']) { + foreach(array( + 'text_transaction_amount', + 'text_amount_update', + 'text_amount_update_message', + 'text_cents', + 'text_amount_update_transaction_duedate', + 'text_amount_update_with_duedate_message', + 'text_update', + 'error_amount_update_duedate_future', + 'error_amount_update_duedate_invalid', + 'error_amount_invalid' + ) as $v) { + $data[$v] = $this->language->get($v); + } + } + + + return $data; + } + + /** + * Show amount update and change expiry date tab for Cashpayment + * + * @param $data + * @return array + */ + public function showAmountExpiryDateUpdateTab($data) { + //Get order status id from order table + $details = $this->dbSelect('novalnet_merchant_script', 'SUM(amount) as order_amount', 'order_no =' . $data['order_id']); + + $data['show_amount_update'] = $data['show_amount_expiry_date_update'] = (!empty($data['order_details']['gateway_status']) && $data['order_details']['gateway_status'] == '100' && $details['order_amount'] < $data['order_details']['transaction_details']['amount']); + + if ($data['show_amount_update']) { + foreach(array( + 'text_transaction_amount', + 'text_amount_expiry_date_update', + 'text_amount_update_with_exipry_message', + 'text_cents', + 'text_slip_expiry_date', + 'text_update', + 'error_amount_update_duedate_future', + 'error_amount_update_duedate_invalid', + 'error_amount_invalid' + ) as $v) { + $data[$v] = $this->language->get($v); + } + } + + return $data; + } + + /** + * Show amount update tab + * + * @param $data + * @return array + */ + public function showAmountUpdateTab($data) { + $data['show_amount_update'] = (!empty($data['order_details']['gateway_status']) && $data['order_details']['gateway_status'] == '99'); + + if ($data['show_amount_update']) { + foreach(array( + 'text_transaction_amount', + 'text_amount_update', + 'text_amount_update_message', + 'text_refund_amount_duedate_change', + 'text_cents', + 'text_update', + 'error_amount_invalid' + ) as $v){ + $data[$v] = $this->language->get($v); + } + } + + return $data; + } + + /** + * Show amount book tab + * + * @param $data + * @return array + */ + public function showAmountBookTab($data) { + $data['show_amount_book'] = !empty($data['order_details']['zero_amount_details']) && $data['transaction_details']['amount'] == '0'; + + if ($data['show_amount_book']) { + foreach(array( + 'text_booking_transaction_amount', + 'text_booking_transaction', + 'text_book', + 'text_cents', + 'text_book_message', + 'error_amount_invalid' + ) as $v){ + $data[$v] = $this->language->get($v); + } + } + + return $data; + } + + /** + * Update invoice order details Novalnet tables + * + * @param $order_comment + * @param $order_manage_status + * @param $status + * @return none + */ + + public function updateTransactionComments($order_comment, $order_manage_status, $status) { + //Insert details into order_history table + $this->dbInsert('order_history', array( + 'order_id', + 'order_status_id', + 'notify', + 'comment', + 'date_added' + ), array( + $this->request->post['order_no'], + $status, + 1, + '"' . $order_comment . '"', + '"' . date('Y-m-d H:i:s') . '"' + )); + } + +} diff --git a/admin/view/javascript/novalnet/novalnet_admin.js b/admin/view/javascript/novalnet/novalnet_admin.js new file mode 100644 index 0000000..22802f9 --- /dev/null +++ b/admin/view/javascript/novalnet/novalnet_admin.js @@ -0,0 +1,92 @@ +/** + * Novalnet global configuration script + * By Novalnet AG (https://www.novalnet.de) + * Copyright (c) Novalnet AG + */ +jQuery(document).ready(function() { + fill_novalnet_details(); + jQuery("#input-payment-novalnet-public-key").on("blur", function() { + fill_novalnet_details(); + if ("" === jQuery("#input-payment-novalnet-public-key").val()) + null_basic_params(); + }); +}); + +function null_basic_params() { + jQuery("#input-novalnet-merchant-id, #input-novalnet-authcode, #input-novalnet-project-id, #input-novalnet-access-key, #input-payment-novalnet-public-key").val(""); + jQuery("#input-payment-novalnet-tariff-id").find("option").remove(); + jQuery("#input-payment-novalnet-tariff-id").append(jQuery("