" + number_text + " | " + split_amount + " € | " );
+ } else {
+ jQuery( "#novalnet_instalment_table_sepa tbody" ).append( "" + number_text + " | " + last_instalment_due + " € |
" );
+ }
+ }
+ });
+
+jQuery('#novalnet_sepa_bank_iban, #novalnet_guarantee_sepa_bank_iban, #novalnet_instalment_sepa_bank_iban').keyup(function(event) {
+ var iban = jQuery('#'+this.id).val().toUpperCase();
+ jQuery('#'+this.id).val(iban);
+ this.value = this.value.toUpperCase();
+ var field = this.value;
+ var value = "";
+ for(var i = 0; i < field.length;i++){
+ if(i <= 1){
+ if(field.charAt(i).match(/^[A-Za-z]/)){
+ value += field.charAt(i);
+ }
+ }
+ if(i > 1){
+ if(field.charAt(i).match(/^[0-9]/)){
+ value += field.charAt(i);
+ }
+ }
+ }
+ field = this.value = value;
+ });
+}
+
+// Validate the IBAN field
+allowAlphaNumeric = function(e) {
+ var keycode = ( 'which' in e ) ? e.which : e.keyCode,
+ reg = /^(?:[0-9a-z]+$)/gi;
+ return ( reg.test( String.fromCharCode( keycode ) ) || 0 === keycode || 8 === keycode );
+};
+// Validate the Account Holder field
+allowName = function (e) {
+var keycode = ( 'which' in e ) ? e.which : e.keyCode,
+ reg = /[^0-9\[\]\/\\#,+@!^()$~%'"=:;<>{}\_\|*?`]/g;
+ return ( reg.test( String.fromCharCode( keycode ) ) || 0 === keycode || 8 === keycode );
+};
+
+
+
+
diff --git a/includes/ext/novalnet/novalnet_admin.php b/includes/ext/novalnet/novalnet_admin.php
new file mode 100644
index 0000000..3d456f7
--- /dev/null
+++ b/includes/ext/novalnet/novalnet_admin.php
@@ -0,0 +1,49 @@
+Execute("select id, tid, language, instalment_details from novalnet_transaction_detail where order_no = '".zen_db_input($oID)."'");
+ $instalment_details = unserialize($novalnet_details->fields['instalment_details']);
+ if (!empty($instalment_details)) {
+ include_once( DIR_FS_CATALOG . DIR_WS_INCLUDES .'languages/' . $instalment_details->fields['language'] . '/modules/payment/novalnet.php');
+ ?>
+
+
+
|
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+
+ $value) {
+ echo '' . $key . ' | ' . "\n";
+ echo '' . $value['amount'] .' ' . $order->info['currency']. ' | ' . "\n";
+ echo '' . zen_date_long($value['paidDate']) . ' | ' . "\n";
+ echo '' . zen_date_long($value['nextCycle']) . ' | ' . "\n";
+ echo '' . $value['status'] . ' | ' . "\n";
+ echo '' . $value['reference'] .' | ' . "\n";
+ }
+ }
+?>
+ |
diff --git a/includes/languages/english/modules/payment/novalnet.php b/includes/languages/english/modules/payment/novalnet.php
new file mode 100644
index 0000000..9b48a3b
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet.php
@@ -0,0 +1,136 @@
+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.');
+
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE', 'Minimum transaction amount for authorization (in minimum unit of currency. E.g. enter 100 which is equal to 1.00)
');
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC','Transactions above this amount will be "authorized only" until you capture. Leave the field blank to authorize all transactions.
');
+
+define('MODULE_PAYMENT_NOVALNET_TRANSACTION_DETAILS', 'Novalnet transaction details');
+define('MODULE_PAYMENT_NOVALNET_TRANSACTION_ID', 'Novalnet transaction ID: ');
+define('MODULE_PAYMENT_NOVALNET_TEST_ORDER_MESSAGE', 'Test order');
+define('MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG', 'The payment will be processed in the test mode therefore amount for this transaction will not be charged
');
+define('MODULE_PAYMENT_NOVALNET_INVOICE_COMMENTS_PARAGRAPH', 'Please transfer the amount to the below mentioned account details of our payment processor Novalnet');
+define('MODULE_PAYMENT_NOVALNET_ACCOUNT_HOLDER', 'Account holder');
+define('MODULE_PAYMENT_NOVALNET_IBAN', 'IBAN');
+define('MODULE_PAYMENT_NOVALNET_DUE_DATE', 'Due date');
+define('MODULE_PAYMENT_NOVALNET_BANK', 'Bank');
+define('MODULE_PAYMENT_NOVALNET_AMOUNT', 'Amount');
+define('MODULE_PAYMENT_NOVALNET_SWIFT_BIC', 'BIC');
+define('MODULE_PAYMENT_NOVALNET_INVPRE_REF1', 'Payment Reference 1');
+define('MODULE_PAYMENT_NOVALNET_INVPRE_REF2', 'Payment Reference 2');
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_MULTI_TEXT', 'Please use any one of the following references as the payment reference, as only through this way your payment is matched and assigned to the order:');
+define('MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR', 'While redirecting some data has been changed. The hash check failed');
+
+define('MODULE_PAYMENT_NOVALNET_VALID_ACCOUNT_CREDENTIALS_ERROR', 'Your account details are invalid');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_PLAN','Choose your instalment plan');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_PLAN_TEXT','Choose the financing option that best fits your needs and you will be charged based on that chosen plan');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_AMOUNT_TEXT','Net loan amount : ');
+
+define('MODULE_PAYMENT_NOVALNET_ENDCUSTOMER_BIRTH_DATE', 'Your date of birth');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_DOB_ERROR_MSG', 'Please enter valid birthdate');
+define('MODULE_PAYMENT_NOVALNET_AGE_ERROR', 'You need to be at least 18 years old');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_TEXT', 'Instalment');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_NUMBER', 'Instalment number');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_MONTHLY_AMOUNT', 'Monthly instalment amount');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INFO', 'Instalment Information: ');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_PROCESSED', 'Processed instalments: ');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_DUE', 'Due instalments: ');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_NXT_AMOUNT', 'Instalment Cycle Amount: ');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_CHOOSE_PLAN', 'Choose any one of the available instalment plan');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_DEBIT_TEXT', 'The instalment amount for this cycle %s will be debited from your account in one - three business days.');
+define('MODULE_PAYMENT_NOVALNET_FORCE_GUARANTEE_ERROR_MESSAGE_COUNTRY', 'The payment cannot be processed, because the basic requirements for the payment guarantee are not met (Only Germany, Austria or Switzerland are allowed)');
+define('MODULE_PAYMENT_NOVALNET_FORCE_GUARANTEE_ERROR_MESSAGE_CURRENCY', 'The payment cannot be processed, because the basic requirements for the payment guarantee are not met (Only EUR currency allowed)');
+define('MODULE_PAYMENT_NOVALNET_FORCE_GUARANTEE_ERROR_MESSAGE_ADDRESS','The payment cannot be processed, because the basic requirements for the payment guarantee are not met (The shipping address must be the same as the billing address)');
+define('MODULE_PAYMENT_NOVALNET_FORCE_GUARANTEE_ERROR_MESSAGE_AMOUNT','The payment cannot be processed, because the basic requirements for the payment guarantee are not met (Minimum order amount must be %s)');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_CANCEL', 'The transaction has been canceled on %s');
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY_CANCEL', 'The transaction has been canceled due to: %s');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_HOLD_TO_PENDING','The transaction status has been changed from on hold to pending for the TID: %s on %s.');
+
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_PENDING_TO_HOLD','The transaction status has been changed from pending to on-hold for the TID: %s on %s.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_CREDIT', 'Novalnet callback script executed successfully for TID: %s with the amount %s on %s. Please refer to paid transactions in Novalnet Admin Portal with the TID: %s');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_EXECUTE', 'Novalnet Callback Script executed successfully for the TID: %s with amount %s on %s.');
+define('MODULE_PAYMENT_GUARANTEE_PAYMENT_MAIL_MESSAGE','We are pleased to inform you that your order has been confirmed.');
+define('MODULE_PAYMENT_GUARANTEE_PAYMENT_MAIL_SUBJECT','Order Confirmation - Your Order %s with %s has been confirmed!');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_CONFIRM','The transaction has been confirmed on %s');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_CHARGEBACK', 'Chargeback executed successfully for the TID: %s amount: %s on %s. The subsequent TID: %s.');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_BOOKBACK', 'Refund/Bookback executed successfully for the TID: %s amount: %s on %s. The subsequent TID: %s.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_NEXT_CYCLE_TEXT', 'The next instalment cycle have arrived for the instalment order %s placed at the store %s, kindly refer further details below.');
+define('MODULE_PAYMENT_NOVALNET_REFERENCE', 'Payment Reference: ');
+
+define('MODULE_PAYMENT_SEPA_DUE_DATE_VALIDATION', 'SEPA Due date is not valid');
+define('MODULE_PAYMENT_NOVALNET_INVOICE_DUE_DATE_ERROR', 'Please enter valid due date');
+define('MODULE_PAYMENT_GUARNTEE_REQUIREMENT', 'Basic requirements for payment guarantee
+ - Allowed countries: AT, DE, CH
+ - Allowed currency: EUR
+ - Minimum order amount: 9,99 EUR or more
+ - Age limit: 18 years or more
+ - The billing address must be the same as the shipping address
+
');
+
+define('MODULE_PAYMENT_INSTALMENT_REQUIREMENT','Basic requirements for instalment payment
+- Allowed countries: AT, DE, CH
+- Allowed currency: EUR
+- Minimum order amount: 19,98 EUR or more
+- Please note that the instalment cycle amount has to be a minimum of 9.99 EUR and the installment cycles which do not meet this criteria will not be displayed in the installment plan.
+- Age limit: 18 years or more
+- The billing address must be the same as the shipping address
+
');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_MESSAGE', 'Your order is being verified. Once confirmed, we will send you our bank details to which the order amount should be transferred. Please note that this may take up to 24 hours.');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEED_SEPA_MESSAGE', 'Your order is under verification and we will soon update you with the order status. Please note that this may take upto 24 hours.');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_DOB_FORMAT', 'YYYY-MM-DD');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_DOB_FORMAT_ERROR', 'The date format is invalid');
+define('MODULE_PAYMENT_NOVALNET_VALID_MERCHANT_CREDENTIALS_ERROR', 'Please fill in all the mandatory fields');
+define('MODULE_PAYMENT_NOVALNET_VALID_EMAIL_ERROR', 'Email fields are not valid ');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SUMMARY', 'Instalment Summary');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_PAID_DATE', 'Paid date');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_DATE', 'Next Instalment Date');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_REFERENCE', 'Reference');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_STATUS', 'Status');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_INFO', 'The instalment amount for this cycle %s %s will be debited from your account in one - three business days.');
+define('MODULE_PAYMENT_NOVALNET_CYCLES','%s Cycles');
+define('MODULE_PAYMENT_NOVALNET_PER_MONTH',' per %s month');
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_PayPal.php b/includes/languages/english/modules/payment/novalnet_PayPal.php
new file mode 100644
index 0000000..4501bf3
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_PayPal.php
@@ -0,0 +1,51 @@
+You will be redirected to PayPal. Please don't close or refresh the browser until the payment is completed
');
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_PUBLIC_TITLE', 'PayPal ');
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_PayPal.png', 'PayPal') : '');
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_PENDING_ORDER_STATUS_ID_TITLE','Payment pending order status');
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_PENDING_ORDER_STATUS_ID_DESC','Status to be used for pending transactions.');
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_banktransfer.php b/includes/languages/english/modules/payment/novalnet_banktransfer.php
new file mode 100644
index 0000000..71db366
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_banktransfer.php
@@ -0,0 +1,41 @@
+You will be redirected to Sofort. Please don't close or refresh the browser until the payment is completed
');
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_PUBLIC_TITLE', 'Sofort ');
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_instantbank.png', 'Sofort') : '');
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_cashpayment.php b/includes/languages/english/modules/payment/novalnet_cashpayment.php
new file mode 100644
index 0000000..b688d8e
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_cashpayment.php
@@ -0,0 +1,50 @@
+On successful checkout, you will receive a payment slip/SMS to pay your online purchase at one of our retail partners (e.g. supermarket)
');
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_PUBLIC_TITLE', 'Barzahlen');
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_EXPIRY_DATE_TEXT', 'Slip expiry date: ');
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_NEAREST_STORE_DETAILS_TEXT', 'Store(s) near to you');
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_cashpayment.png', 'Barzahlen') : '');
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS_TITLE',MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS_DESC',MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEST_MODE_TITLE',MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEST_MODE_DESC',MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_EXPIRY_DATE_TITLE','Slip expiry date (in days)');
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_EXPIRY_DATE_DESC','Number of days given to the buyer to pay at a store. If this field is left blank, 14 days will be set as slip expiry date by default.');
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CUSTOMER_INFO_TITLE',MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CUSTOMER_INFO_DESC',MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SORT_ORDER_TITLE',MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SORT_ORDER_DESC',MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ORDER_STATUS_ID_TITLE',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CALLBACK_STATUS_ID_TITLE',MODULE_PAYMENT_NOVALNET_CALLBACK_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CALLBACK_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_CALLBACK_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ZONE_TITLE',MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ZONE_DESC',MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_DATE_ERROR', 'Please enter valid slip expiry date');
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_cc.php b/includes/languages/english/modules/payment/novalnet_cc.php
new file mode 100644
index 0000000..cc0270f
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_cc.php
@@ -0,0 +1,65 @@
+The amount will be debited from your credit/debit card
');
+define('MODULE_PAYMENT_NOVALNET_VALID_CC_DETAILS', 'Your credit card details are invalid');
+
+define('MODULE_PAYMENT_NOVALNET_CC_LOGO', ((defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_cc_visa.png', 'Credit/Debit Cards') . zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_cc_master.png', 'Credit/Debit Cards') : '') . ((!defined('MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO') || MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO == 'True' && (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True')) ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_cc_amex.png', 'Credit/Debit Cards') : '') . ((!defined('MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO') || MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO == 'True' && (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True')) ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_cc_maestro.png', 'Credit/Debit Cards') : ''));
+
+
+define('MODULE_PAYMENT_NOVALNET_CC_STATUS_TITLE',MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_STATUS_DESC',MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO_TITLE', 'Display AMEX logo');
+define('MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO_DESC','Display AMEX logo at the checkout page');
+
+define('MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO_TITLE', 'Display Maestro logo');
+define('MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO_DESC','Display Maestro logo at the checkout page');
+
+define('MODULE_PAYMENT_NOVALNET_CC_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_LABEL_STYLE_TITLE', 'CSS settings for Credit Card iframe
Label');
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_LABEL_STYLE_DESC','');
+
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_INPUT_STYLE_TITLE', 'Input');
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_INPUT_STYLE_DESC','');
+
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_CSS_STYLE_TITLE', 'CSS Text');
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_CSS_STYLE_DESC','');
+
+define('MODULE_PAYMENT_NOVALNET_CC_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_config.php b/includes/languages/english/modules/payment/novalnet_config.php
new file mode 100644
index 0000000..50890f8
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_config.php
@@ -0,0 +1,57 @@
+ Get your Product activation key from the Novalnet Admin Portal: PROJECT > Choose your project >Â Shop Parameters > API Signature (Product activation key)');
+
+define('MODULE_PAYMENT_NOVALNET_VENDOR_ID_TITLE', 'Merchant ID');
+define('MODULE_PAYMENT_NOVALNET_VENDOR_ID_DESC', '');
+
+define('MODULE_PAYMENT_NOVALNET_AUTH_CODE_TITLE', 'Authentication code');
+define('MODULE_PAYMENT_NOVALNET_AUTH_CODE_DESC', '');
+
+define('MODULE_PAYMENT_NOVALNET_PRODUCT_ID_TITLE', 'Project ID');
+define('MODULE_PAYMENT_NOVALNET_PRODUCT_ID_DESC', '');
+
+define('MODULE_PAYMENT_NOVALNET_TARIFF_ID_TITLE', 'Select Tariff ID');
+define('MODULE_PAYMENT_NOVALNET_TARIFF_ID_DESC', 'Select a Tariff ID to match the preferred tariff plan you created at the Novalnet Admin Portal for this project.');
+
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_ACCESS_KEY_TITLE', 'Payment access key');
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_ACCESS_KEY_DESC', '');
+
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY_TITLE', 'Display payment logo');
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY_DESC', 'The payment method logo(s) will be displayed on the checkout page.');
+
+define('MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID_TITLE', 'Order Status Management
On-hold order status');
+define('MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID_DESC', 'Status to be used for on-hold orders until the transaction is confirmed or canceled.');
+
+define('MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_CANCELLED_STATUS_ID_TITLE', 'Canceled order status');
+define('MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_CANCELLED_STATUS_ID_DESC', 'Status to be used when order is canceled or fully refunded.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_TEST_MODE_TITLE', 'Notification / Webhook URL Setup
Allow manual testing of the Notification / Webhook URL');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_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.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_SEND_TITLE', 'Enable e-mail notification');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_SEND_DESC', 'Enable this option to notify the given e-mail address when the Notification / Webhook URL is executed successfully.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_TO_TITLE', 'Send e-mail to');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_TO_DESC', 'Notification / Webhook URL execution messages will be sent to this e-mail.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_NOTIFY_URL_TITLE', 'Notification / Webhook URL');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_NOTIFY_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.');
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_eps.php b/includes/languages/english/modules/payment/novalnet_eps.php
new file mode 100644
index 0000000..0dfba66
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_eps.php
@@ -0,0 +1,42 @@
+You will be redirected to eps. Please don't close or refresh the browser until the payment is completed
');
+define('MODULE_PAYMENT_NOVALNET_EPS_PUBLIC_TITLE', 'eps ');
+
+define('MODULE_PAYMENT_NOVALNET_EPS_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_eps.png', 'eps') : '');
+
+define('MODULE_PAYMENT_NOVALNET_EPS_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_EPS_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_EPS_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_EPS_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_EPS_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_EPS_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_giropay.php b/includes/languages/english/modules/payment/novalnet_giropay.php
new file mode 100644
index 0000000..147cc95
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_giropay.php
@@ -0,0 +1,42 @@
+You will be redirected to giropay. Please don't close or refresh the browser until the payment is completed
');
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_PUBLIC_TITLE', 'giropay ');
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_giropay.png', 'giropay') : '');
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_guarantee_invoice.php b/includes/languages/english/modules/payment/novalnet_guarantee_invoice.php
new file mode 100644
index 0000000..3a659a9
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_guarantee_invoice.php
@@ -0,0 +1,53 @@
+You will receive an e-mail with the Novalnet account details to complete the payment
');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PUBLIC_TITLE', 'Invoice with payment guarantee ');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_invoice.png', 'Invoice with payment guarantee ') : '');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS_TITLE', MODULE_PAYMENT_GUARNTEE_REQUIREMENT.MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_MIN_AMOUNT_LIMIT_TITLE', 'Minimum order amount for payment guarantee');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_MIN_AMOUNT_LIMIT_DESC', 'This setting will override the default setting for the minimum order amount. Note that amount should be in the range of 9,99 EUR - 5.000,00 EUR');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PENDING_ORDER_STATUS_ID_TITLE', 'Payment pending order status');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PENDING_ORDER_STATUS_ID_DESC', 'Status to be used for pending transactions.');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_guarantee_sepa.php b/includes/languages/english/modules/payment/novalnet_guarantee_sepa.php
new file mode 100644
index 0000000..925be76
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_guarantee_sepa.php
@@ -0,0 +1,58 @@
+The amount will be debited from your account by Novalnet
');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PUBLIC_TITLE', 'Direct Debit SEPA with payment guarantee ');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_sepa.png', 'Direct Debit SEPA with payment guarantee ') : '');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_FORM_MANDATE_CONFIRM_TEXT', 'I hereby grant the mandate for the SEPA direct debit (electronic transmission) and confirm that the given bank details are correct!I authorise (A) Novalnet AG to send instructions to my bank to debit my account and (B) my bank to debit my account in accordance with the instructions from Novalnet AG.
Creditor identifier: DE53ZZZ00000004253
Note: You are entitled to a refund from your bank under the terms and conditions of your agreement with bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited.
');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS_TITLE', MODULE_PAYMENT_GUARNTEE_REQUIREMENT.MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PAYMENT_DUE_DATE_TITLE', 'Payment due date (in days)');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PAYMENT_DUE_DATE_DESC', 'Number of days after which the payment is debited (must be between 2 and 14 days)');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_MIN_AMOUNT_LIMIT_TITLE', 'Minimum order amount for payment guarantee');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_MIN_AMOUNT_LIMIT_DESC', 'This setting will override the default setting for the minimum order amount. Note that amount should be in the range of 9,99 EUR - 5.000,00 EUR');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PENDING_ORDER_STATUS_ID_TITLE', 'Payment pending order status');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PENDING_ORDER_STATUS_ID_DESC', 'Status to be used for pending transactions.');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_ideal.php b/includes/languages/english/modules/payment/novalnet_ideal.php
new file mode 100644
index 0000000..d60ba55
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_ideal.php
@@ -0,0 +1,42 @@
+You will be redirected to iDEAL. Please don't close or refresh the browser until the payment is completed
');
+define('MODULE_PAYMENT_NOVALNET_IDEAL_PUBLIC_TITLE', 'iDEAL ');
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_ideal.png', 'iDEAL') : '');
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_instalment_invoice.php b/includes/languages/english/modules/payment/novalnet_instalment_invoice.php
new file mode 100644
index 0000000..a109cd9
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_instalment_invoice.php
@@ -0,0 +1,60 @@
+You will receive an e-mail with the Novalnet account details to complete the payment
');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PUBLIC_TITLE', 'Instalment by Invoice ');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_invoice.png', 'Instalment by Invoice') : '');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS_TITLE', MODULE_PAYMENT_INSTALMENT_REQUIREMENT.MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEST_MODE_TITLE',MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE );
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PERIOD_TITLE', 'Recurring period');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PERIOD_DESC', 'Choose the recurring period for the instalment payment.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CYCLE_TITLE', 'Instalment cycles');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CYCLE_DESC', 'Select the available instalment cycles');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_MIN_AMOUNT_LIMIT_TITLE', 'Minimum order amount (in minimum unit of currency. E.g. enter 100 which is equal to 1.00)');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_MIN_AMOUNT_LIMIT_DESC', 'This setting will override the default setting made in the minimum order amount. Note Minimum amount should be greater than or equal to 19,98 EUR.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PENDING_ORDER_STATUS_ID_TITLE', 'Pending payment order status');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PENDING_ORDER_STATUS_ID_DESC', 'Status to be used for pending transactions.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_instalment_sepa.php b/includes/languages/english/modules/payment/novalnet_instalment_sepa.php
new file mode 100644
index 0000000..1208d93
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_instalment_sepa.php
@@ -0,0 +1,61 @@
+The amount will be debited from your account by Novalnet
');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PUBLIC_TITLE', 'Instalment by Direct Debit SEPA ');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_sepa.png', 'Instalment by Direct Debit SEPA') : '');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_FORM_MANDATE_CONFIRM_TEXT', 'I hereby grant the mandate for the SEPA direct debit (electronic transmission) and confirm that the given bank details are correct!I authorise (A) Novalnet AG to send instructions to my bank to debit my account and (B) my bank to debit my account in accordance with the instructions from Novalnet AG.
Creditor identifier: DE53ZZZ00000004253
Note: You are entitled to a refund from your bank under the terms and conditions of your agreement with bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited.
');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS_TITLE', MODULE_PAYMENT_INSTALMENT_REQUIREMENT.MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PERIOD_TITLE', 'Recurring period');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PERIOD_DESC', 'Choose the recurring period for the instalment payment.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CYCLE_TITLE', 'Instalment cycles');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CYCLE_DESC', 'Select the available instalment cycles');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_MIN_AMOUNT_LIMIT_TITLE', 'Minimum order amount (in minimum unit of currency. E.g. enter 100 which is equal to 1.00)');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_MIN_AMOUNT_LIMIT_DESC', 'This setting will override the default setting made in the minimum order amount. Note Minimum amount should be greater than or equal to 19,98 EUR.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PENDING_ORDER_STATUS_ID_TITLE', 'Pending payment order status');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PENDING_ORDER_STATUS_ID_DESC', 'Status to be used for pending transactions.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC)
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_invoice.php b/includes/languages/english/modules/payment/novalnet_invoice.php
new file mode 100644
index 0000000..86c4963
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_invoice.php
@@ -0,0 +1,55 @@
+You will receive an e-mail with the Novalnet account details to complete the payment
');
+define('MODULE_PAYMENT_NOVALNET_INVOICE_PUBLIC_TITLE', 'Invoice ');
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_invoice.png', 'Invoice') : '');
+define('MODULE_PAYMENT_NOVALNET_INVOICE_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_TEST_MODE_TITLE',MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE );
+define('MODULE_PAYMENT_NOVALNET_INVOICE_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_DUE_DATE_TITLE', 'Payment due date (in days)');
+define('MODULE_PAYMENT_NOVALNET_INVOICE_DUE_DATE_DESC', 'Number of days given to the buyer to transfer the amount to Novalnet (must be greater than 7 days). If this field is left blank, 14 days will be set as due date by default.');
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_CALLBACK_STATUS_ID_TITLE', 'Callback order status');
+define('MODULE_PAYMENT_NOVALNET_INVOICE_CALLBACK_STATUS_ID_DESC', 'Status to be used when callback script is executed for payment received by Novalnet.');
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_postfinance.php b/includes/languages/english/modules/payment/novalnet_postfinance.php
new file mode 100644
index 0000000..e89d138
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_postfinance.php
@@ -0,0 +1,45 @@
+You will be redirected to PostFinance. Please don't close or refresh the browser until the payment is completed
');
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_PUBLIC_TITLE', 'PostFinance E-Finance ');
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_postfinance.png', 'PostFinance E-Finance ') : '');
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_PENDING_ORDER_STATUS_ID_TITLE', 'Pending payment order status');
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_PENDING_ORDER_STATUS_ID_DESC', 'Status to be used for pending transactions.');
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_postfinance_card.php b/includes/languages/english/modules/payment/novalnet_postfinance_card.php
new file mode 100644
index 0000000..bee64ca
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_postfinance_card.php
@@ -0,0 +1,44 @@
+You will be redirected to PostFinance. Please don't close or refresh the browser until the payment is completed
');
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PUBLIC_TITLE', 'PostFinance Card ');
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_postfinance_card.png', 'PostFinance Card ') : '');
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PENDING_ORDER_STATUS_ID_TITLE', 'Pending payment order status');
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PENDING_ORDER_STATUS_ID_DESC', 'Status to be used for pending transactions.');
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_prepayment.php b/includes/languages/english/modules/payment/novalnet_prepayment.php
new file mode 100644
index 0000000..85b3ce1
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_prepayment.php
@@ -0,0 +1,44 @@
+You will receive an e-mail with the Novalnet account details to complete the payment
');
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_PUBLIC_TITLE', 'Prepayment ');
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_prepayment.png', 'Prepayment') : '');
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_ORDER_STATUS_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_CALLBACK_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_CALLBACK_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_CALLBACK_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_CALLBACK_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_przelewy24.php b/includes/languages/english/modules/payment/novalnet_przelewy24.php
new file mode 100644
index 0000000..b6f6289
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_przelewy24.php
@@ -0,0 +1,45 @@
+You will be redirected to Przelewy24. Please don't close or refresh the browser until the payment is completed
');
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_PUBLIC_TITLE', 'Przelewy24 ');
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_przelewy24.png', 'Przelewy24') : '');
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_PENDING_ORDER_STATUS_ID_TITLE', 'Pending payment order status');
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_PENDING_ORDER_STATUS_ID_DESC', 'Status to be used for pending transactions.');
+
+?>
diff --git a/includes/languages/english/modules/payment/novalnet_sepa.php b/includes/languages/english/modules/payment/novalnet_sepa.php
new file mode 100644
index 0000000..e817da8
--- /dev/null
+++ b/includes/languages/english/modules/payment/novalnet_sepa.php
@@ -0,0 +1,53 @@
+The amount will be debited from your account by Novalnet
');
+define('MODULE_PAYMENT_NOVALNET_SEPA_PUBLIC_TITLE', 'Direct Debit SEPA ');
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_sepa.png', 'Direct Debit SEPA ') : '');
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_FORM_MANDATE_CONFIRM_TEXT', 'I hereby grant the mandate for the SEPA direct debit (electronic transmission) and confirm that the given bank details are correct!I authorise (A) Novalnet AG to send instructions to my bank to debit my account and (B) my bank to debit my account in accordance with the instructions from Novalnet AG.
Creditor identifier: DE53ZZZ00000004253
Note: You are entitled to a refund from your bank under the terms and conditions of your agreement with bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited.
');
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_STATUS_TITLE',MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_STATUS_DESC',MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_TEST_MODE_TITLE',MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_TEST_MODE_DESC',MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_PAYMENT_DUE_DATE_TITLE','Payment due date (in days)');
+define('MODULE_PAYMENT_NOVALNET_SEPA_PAYMENT_DUE_DATE_DESC','Number of days after which the payment is debited (must be between 2 and 14 days). ');
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_CUSTOMER_INFO_TITLE',MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_CUSTOMER_INFO_DESC',MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_SORT_ORDER_TITLE',MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_SORT_ORDER_DESC',MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_ORDER_STATUS_ID_TITLE',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_ZONE_TITLE',MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_ZONE_DESC',MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet.php b/includes/languages/german/modules/payment/novalnet.php
new file mode 100644
index 0000000..1684c60
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet.php
@@ -0,0 +1,135 @@
+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.
+');
+
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE', 'Mindesttransaktionsbetrag für die Autorisierung (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)
');
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC','Transaktionen über diesem Betrag werden bis zum Capture als "nur autorisiert" gekennzeichnet. Lassen Sie das Feld leer, um alle Transaktionen zu autorisieren.
');
+
+define('MODULE_PAYMENT_NOVALNET_TRANSACTION_DETAILS', 'Novalnet-Transaktionsdetails');
+define('MODULE_PAYMENT_NOVALNET_TRANSACTION_ID', 'Novalnet Transaktions-ID: ');
+define('MODULE_PAYMENT_NOVALNET_TEST_ORDER_MESSAGE', 'Testbestellung');
+define('MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG', 'Die Zahlung wird im Testmodus durchgeführt, daher wird der Betrag für diese Transaktion nicht eingezogen
');
+define('MODULE_PAYMENT_NOVALNET_INVOICE_COMMENTS_PARAGRAPH', 'Überweisen Sie bitte den Betrag an die unten aufgeführte Bankverbindung unseres Zahlungsdienstleisters Novalnet');
+define('MODULE_PAYMENT_NOVALNET_ACCOUNT_HOLDER', 'Kontoinhaber');
+define('MODULE_PAYMENT_NOVALNET_IBAN', 'IBAN');
+define('MODULE_PAYMENT_NOVALNET_DUE_DATE', 'Fälligkeitsdatum ');
+define('MODULE_PAYMENT_NOVALNET_BANK', 'Bank');
+define('MODULE_PAYMENT_NOVALNET_AMOUNT', 'Betrag');
+define('MODULE_PAYMENT_NOVALNET_SWIFT_BIC', 'BIC');
+define('MODULE_PAYMENT_NOVALNET_INVPRE_REF1', 'Verwendungszweck 1');
+define('MODULE_PAYMENT_NOVALNET_INVPRE_REF2', 'Verwendungszweck 2');
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_MULTI_TEXT', 'Bitte verwenden Sie einen der unten angegebenen Verwendungszwecke für die Überweisung, da nur so Ihr Geldeingang zugeordnet werden kann:');
+
+define('MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR', 'Während der Umleitung wurden einige Daten geändert. Die Überprüfung des Hashes schlug fehl');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_CHOOSE_PLAN', 'Wählen Sie Ihren Ratenplan');
+define('MODULE_PAYMENT_NOVALNET_VALID_ACCOUNT_CREDENTIALS_ERROR', 'Ihre Kontodaten sind ungültig');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_PLAN','Wählen Sie Ihren Ratenplan');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_PLAN_TEXT','Wählen Sie die Finanzierungsoption, die Ihren Bedürfnissen am besten entspricht. Die Raten werden Ihnen entsprechend dem gewählten Ratenplan berechnet');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_AMOUNT_TEXT','Netto-Kreditbetrag : ');
+define('MODULE_PAYMENT_NOVALNET_ENDCUSTOMER_BIRTH_DATE', 'Ihr Geburtsdatum');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_DOB_ERROR_MSG', 'Geben Sie ein gültiges Geburtsdatum ein');
+define('MODULE_PAYMENT_NOVALNET_AGE_ERROR', 'Sie müssen mindestens 18 Jahre alt sein');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_TEXT', 'Ratenzahlung');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_NUMBER', 'Ratenzahl');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_MONTHLY_AMOUNT', 'Monatlich fällige Rate');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INFO', 'Information zu den Raten: ');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_PROCESSED', 'Bezahlte Raten: ');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_DUE', 'Offene Raten: ');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_NXT_AMOUNT', 'Betrag jeder Rate');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_DEBIT_TEXT', 'Die nächste Rate in Höhe von %s wird in ein bis drei Werktagen von Ihrem Konto abgebucht.');
+define('MODULE_PAYMENT_NOVALNET_FORCE_GUARANTEE_ERROR_MESSAGE_COUNTRY', 'Die Zahlung kann nicht ausgeführt werden, weil die Voraussetzungen für die Zahlungsgarantie nicht erfüllt sind (nur Deutschland, Österreich oder die Schweiz sind zulässig).');
+
+define('MODULE_PAYMENT_NOVALNET_FORCE_GUARANTEE_ERROR_MESSAGE_CURRENCY', 'Die Zahlung kann nicht ausgeführt werden, weil die Voraussetzungen für die Zahlungsgarantie nicht erfüllt sind (Nur EUR als Währung erlaubt).');
+
+define('MODULE_PAYMENT_NOVALNET_FORCE_GUARANTEE_ERROR_MESSAGE_ADDRESS','Die Zahlung kann nicht ausgeführt werden, weil die Voraussetzungen für die Zahlungsgarantie nicht erfüllt sind (Die Lieferadresse muss mit der Rechnungsadresse identisch sein)');
+define('MODULE_PAYMENT_NOVALNET_FORCE_GUARANTEE_ERROR_MESSAGE_AMOUNT','
+Die Zahlung kann nicht ausgeführt werden, weil die Voraussetzungen für die Zahlungsgarantie nicht erfüllt sind (Mindestbestellwert %s).');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_CANCEL', 'Die Transaktion wurde am %s um Uhr storniert');
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY_CANCEL', 'Die Transaktion wurde storniert. Grund: %s');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_HOLD_TO_PENDING','Der Status der Transaktion mit der TID: %s am %s. Uhr von ausgesetzt auf ausstehend geändert.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_PENDING_TO_HOLD','Der Status der Transaktion mit der TID: %s wurde am %s. Uhr von ausstehend auf ausgesetzt geändert.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_CREDIT', 'Novalnet-Callback-Skript erfolgreich ausgeführt für: TID %s mit Betrag %s am %s. Nach bezahlter Transaktion finden Sie diese in unserer Novalnet Admin-Portal unter folgender TID: %s');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_EXECUTE', 'Novalnet-Callback-Skript erfolgreich ausgeführt für die TID: %s mit dem Betrag %s on %s.');
+define('MODULE_PAYMENT_GUARANTEE_PAYMENT_MAIL_MESSAGE','Wir freuen uns Ihnen mitteilen zu können, dass Ihre Bestellung bestätigt wurde.');
+define('MODULE_PAYMENT_GUARANTEE_PAYMENT_MAIL_SUBJECT','Bestellbestätigung – Ihre Bestellung %s bei %s wurde bestätigt!');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_CONFIRM','Novalnet-Callback-Nachricht erhalten: Die Buchung wurde am %s Uhr bestätigt');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_CHARGEBACK', 'Chargeback erfolgreich importiert für die TID: %s Betrag: %s um %s. Uhr. TID der Folgebuchung: %s.');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_BOOKBACK', 'Rückerstattung / Bookback erfolgreich ausgeführt für die TID: %s Betrag: %s am %s. TID der Folgebuchung: %s.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_NEXT_CYCLE_TEXT', 'Für Ihre Bestellung Nr. %s bei %s ist die nächste Rate fällig. Bitte beachten Sie weitere Details unten');
+define('MODULE_PAYMENT_NOVALNET_REFERENCE', 'Verwendungszweck: ');
+define('MODULE_PAYMENT_SEPA_DUE_DATE_VALIDATION', 'SEPA Fälligkeitsdatum Ungültiger');
+define('MODULE_PAYMENT_NOVALNET_INVOICE_DUE_DATE_ERROR', 'Geben Sie bitte ein gültiges Fälligkeitsdatum ein');
+define('MODULE_PAYMENT_GUARNTEE_REQUIREMENT', 'Grundanforderungen für die Zahlungsgarantie
+ - Zugelassene Staaten: AT, DE, CH
+ - Zugelassene Währung: EUR
+ - Mindestbetrag der Bestellung: 9,99 EUR
+ - Mindestalter des Endkunden >= 18 Jahre
+ - Rechnungsadresse und Lieferadresse müssen übereinstimmen
+
');
+define('MODULE_PAYMENT_INSTALMENT_REQUIREMENT','Grundanforderungen für die Ratenzahlung
+- Zugelassene Staaten: AT, DE, CH
+- Zugelassene Währung: EUR
+- Mindestbetrag der Bestellung >= 19,98 EUR
+- Bitte beachten Sie, dass der Betrag einer Rate mindestens 9,99 EUR betragen muss und Raten, die diese Kriterien nicht erfüllen, nicht im Ratenplan angezeigt werden.
+- Mindestalter des Endkunden >= 18 Jahre
+- Rechnungsadresse und Lieferadresse müssen übereinstimmen.
+
');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_MESSAGE', 'Ihre Bestellung ist unter Bearbeitung. Sobald diese bestätigt wurde, erhalten Sie alle notwendigen Informationen zum Ausgleich der Rechnung. Wir bitten Sie zu beachten, dass dieser Vorgang bis zu 24 Stunden andauern kann');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEED_SEPA_MESSAGE', 'Ihre Bestellung wird derzeit überprüft. Wir werden Sie in Kürze über den Bestellstatus informieren. Bitte beachten Sie, dass dies bis zu 24 Stunden dauern kann');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_DOB_FORMAT', 'JJJJ-MM-TT');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_DOB_FORMAT_ERROR', 'Ungültiges Datumsformat');
+define('MODULE_PAYMENT_NOVALNET_VALID_MERCHANT_CREDENTIALS_ERROR', 'Füllen Sie bitte alle Pflichtfelder aus.');
+define('MODULE_PAYMENT_NOVALNET_VALID_EMAIL_ERROR', 'Ungültige Werte für die Felder email');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SUMMARY', 'Zusammenfassung');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_PAID_DATE', 'Bezahlt am');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_DATE', 'Nächste Rate fällig am');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_REFERENCE', 'Verwendungszweck');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_STATUS', 'Status');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_INFO', 'Die nächste Rate in Höhe von %s %s wird in ein bis drei Werktagen von Ihrem Konto abgebucht.');
+define('MODULE_PAYMENT_NOVALNET_CYCLES','%s Raten');
+define('MODULE_PAYMENT_NOVALNET_PER_MONTH',' pro %s Monat');
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_PayPal.php b/includes/languages/german/modules/payment/novalnet_PayPal.php
new file mode 100644
index 0000000..ba1db59
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_PayPal.php
@@ -0,0 +1,52 @@
+Sie werden zu PayPal weitergeleitet. Um eine erfolgreiche Zahlung zu gewährleisten, darf die Seite nicht geschlossen oder neu geladen werden, bis die Bezahlung abgeschlossen ist
');
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_PUBLIC_TITLE', 'PayPal ');
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_PayPal.png', 'PayPal') : '');
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_PENDING_ORDER_STATUS_ID_TITLE','Status für Bestellungen mit ausstehender Zahlung');
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_PENDING_ORDER_STATUS_ID_DESC','Wählen Sie, welcher Status für Bestellungen mit ausstehender Zahlung verwendet wird.');
+
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_banktransfer.php b/includes/languages/german/modules/payment/novalnet_banktransfer.php
new file mode 100644
index 0000000..af20cee
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_banktransfer.php
@@ -0,0 +1,42 @@
+Sie werden zu Sofortüberweisung weitergeleitet. Um eine erfolgreiche Zahlung zu gewährleisten, darf die Seite nicht geschlossen oder neu geladen werden, bis die Bezahlung abgeschlossen ist
');
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_PUBLIC_TITLE', 'Sofortüberweisung ');
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_instantbank.png', 'Sofortüberweisung') : '');
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_cashpayment.php b/includes/languages/german/modules/payment/novalnet_cashpayment.php
new file mode 100644
index 0000000..2d3300d
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_cashpayment.php
@@ -0,0 +1,50 @@
+Nach erfolgreichem Bestellabschluss erhalten Sie einen Zahlschein bzw. eine SMS. Damit können Sie Ihre Online-Bestellung bei einem unserer Partner im Einzelhandel (z.B. Drogerie, Supermarkt etc.) bezahlen
');
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_PUBLIC_TITLE', 'Barzahlen ');
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_EXPIRY_DATE_TEXT', 'Verfallsdatum des Zahlscheins');
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_NEAREST_STORE_DETAILS_TEXT', ' Barzahlen-Partnerfiliale in Ihrer Nähe');
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_cashpayment.png', 'Barzahlen') : '');
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS_TITLE',MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS_DESC',MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEST_MODE_TITLE',MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEST_MODE_DESC',MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_EXPIRY_DATE_TITLE','Verfallsdatum des Zahlscheins (in Tagen)');
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_EXPIRY_DATE_DESC',' Geben Sie die Anzahl der Tage ein, um den Betrag in einer Barzahlen-Partnerfiliale in Ihrer Nähe zu bezahlen. Wenn das Feld leer ist, werden standardmäßig 14 Tage als Fälligkeitsdatum gesetzt');
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CUSTOMER_INFO_TITLE',MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CUSTOMER_INFO_DESC',MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SORT_ORDER_TITLE',MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SORT_ORDER_DESC',MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ORDER_STATUS_ID_TITLE',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CALLBACK_STATUS_ID_TITLE',MODULE_PAYMENT_NOVALNET_CALLBACK_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CALLBACK_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_CALLBACK_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ZONE_TITLE',MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ZONE_DESC',MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+define('MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_DATE_ERROR', 'Geben Sie bitte ein gültiges Ablaufdatum für den Zahlschein ein.');
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_cc.php b/includes/languages/german/modules/payment/novalnet_cc.php
new file mode 100644
index 0000000..4864cef
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_cc.php
@@ -0,0 +1,65 @@
+Der Betrag wird Ihrer Kredit-/Debitkarte belastet
');
+define('MODULE_PAYMENT_NOVALNET_VALID_CC_DETAILS', 'Ihre Kreditkartendaten sind ungültig.');
+
+define('MODULE_PAYMENT_NOVALNET_CC_LOGO', ((defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_cc_visa.png', 'Kredit- / Debitkarte') . zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_cc_master.png', 'Kredit- / Debitkarte') : '') . ((!defined('MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO') || MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO == 'True' && (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True')) ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_cc_amex.png', 'Kredit- / Debitkarte') : '') . ((!defined('MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO') || MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO == 'True' && (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True')) ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_cc_maestro.png', 'Kredit- / Debitkarte') : ''));
+
+define('MODULE_PAYMENT_NOVALNET_CC_STATUS_TITLE',MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_STATUS_DESC',MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO_TITLE', 'AMEX-Logo anzeigen');
+define('MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO_DESC','AMEX-Logo auf der Checkout-Seite anzeigen');
+
+define('MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO_TITLE', 'Maestro-Logo anzeigen');
+define('MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO_DESC','Maestro-Logo auf der Checkout-Seite anzeigen');
+
+define('MODULE_PAYMENT_NOVALNET_CC_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_LABEL_STYLE_TITLE', 'CSS-Einstellungen für den iFrame mit Kreditkartendaten
Beschriftung');
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_LABEL_STYLE_DESC','');
+
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_INPUT_STYLE_TITLE', 'Eingabe');
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_INPUT_STYLE_DESC','');
+
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_CSS_STYLE_TITLE', 'Text für das CSS');
+define('MODULE_PAYMENT_NOVALNET_CC_FORM_CSS_STYLE_DESC','');
+
+define('MODULE_PAYMENT_NOVALNET_CC_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_CC_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_CC_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_config.php b/includes/languages/german/modules/payment/novalnet_config.php
new file mode 100644
index 0000000..7f49bfc
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_config.php
@@ -0,0 +1,60 @@
+Ihren Produktaktivierungsschlüssel finden Sie im Novalnet Admin-Portal: PROJEKT > Wählen Sie Ihr Projekt > Shop-Parameter > API-Signatur (Produktaktivierungsschlüssel)');
+
+define('MODULE_PAYMENT_NOVALNET_VENDOR_ID_TITLE', ' Händler-ID');
+define('MODULE_PAYMENT_NOVALNET_VENDOR_ID_DESC', '');
+
+define('MODULE_PAYMENT_NOVALNET_AUTH_CODE_TITLE', ' Authentifizierungscode');
+define('MODULE_PAYMENT_NOVALNET_AUTH_CODE_DESC', '');
+
+define('MODULE_PAYMENT_NOVALNET_PRODUCT_ID_TITLE', ' Projekt-ID');
+define('MODULE_PAYMENT_NOVALNET_PRODUCT_ID_DESC', '');
+
+define('MODULE_PAYMENT_NOVALNET_TARIFF_ID_TITLE', 'Auswahl der Tarif-ID');
+define('MODULE_PAYMENT_NOVALNET_TARIFF_ID_DESC', 'Wählen Sie eine Tarif-ID, die dem bevorzugten Tarifplan entspricht, den Sie im Novalnet Admin-Portal für dieses Projekt erstellt haben.');
+
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_ACCESS_KEY_TITLE', 'Paymentzugriffsschlüssel');
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_ACCESS_KEY_DESC', '');
+
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY_TITLE', 'Zahlungslogo anzeigen');
+define('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY_DESC', 'Das Logo der Zahlungsart wird auf der Checkout-Seite angezeigt.');
+
+define('MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID_TITLE', 'Bestellstatus-Management
On-hold-Bestellstatus');
+define('MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID_DESC', 'Wählen Sie, welcher Status für On-hold-Bestellungen verwendet wird, solange diese nicht bestätigt oder storniert worden sind.');
+
+define('MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_CANCELLED_STATUS_ID_TITLE', 'Status für stornierte Bestellungen');
+define('MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_CANCELLED_STATUS_ID_DESC', 'Wählen Sie, welcher Status für stornierte oder voll erstattete Bestellungen verwendet wird.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_TEST_MODE_TITLE', 'Benachrichtigungs- / Webhook-URL festlegen
Manuelles Testen der Benachrichtigungs- / Webhook-URL erlauben');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_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.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_SEND_TITLE', 'E-Mail-Benachrichtigungen einschalten');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_SEND_DESC', 'Aktivieren Sie diese Option, um die angegebene E-Mail-Adresse zu benachrichtigen, wenn die Benachrichtigungs- / Webhook-URL erfolgreich ausgeführt wurde.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_TO_TITLE', 'E-Mails senden an');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_TO_DESC', 'E-Mail-Benachrichtigungen werden an diese E-Mail-Adresse gesendet.');
+
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_NOTIFY_URL_TITLE', 'Benachrichtigungs- / Webhook-URL');
+define('MODULE_PAYMENT_NOVALNET_CALLBACK_NOTIFY_URL_DESC', 'Händlers mit dem Novalnet-Account synchronisiert zu halten (z.B. Lieferstatus). Weitere Informationen finden Sie in der Installationsanleitung.');
+
+
+?>
+
+
diff --git a/includes/languages/german/modules/payment/novalnet_eps.php b/includes/languages/german/modules/payment/novalnet_eps.php
new file mode 100644
index 0000000..c3f0191
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_eps.php
@@ -0,0 +1,42 @@
+Sie werden zu eps weitergeleitet. Um eine erfolgreiche Zahlung zu gewährleisten, darf die Seite nicht geschlossen oder neu geladen werden, bis die Bezahlung abgeschlossen ist
');
+define('MODULE_PAYMENT_NOVALNET_EPS_PUBLIC_TITLE', 'eps ');
+
+define('MODULE_PAYMENT_NOVALNET_EPS_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_eps.png', 'eps') : '');
+
+define('MODULE_PAYMENT_NOVALNET_EPS_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_EPS_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_EPS_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_EPS_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_EPS_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_EPS_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_EPS_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_giropay.php b/includes/languages/german/modules/payment/novalnet_giropay.php
new file mode 100644
index 0000000..1034c45
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_giropay.php
@@ -0,0 +1,42 @@
+Sie werden zu giropay weitergeleitet. Um eine erfolgreiche Zahlung zu gewährleisten, darf die Seite nicht geschlossen oder neu geladen werden, bis die Bezahlung abgeschlossen ist
');
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_PUBLIC_TITLE', 'giropay ');
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_giropay.png', 'giropay') : '');
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GIROPAY_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_guarantee_invoice.php b/includes/languages/german/modules/payment/novalnet_guarantee_invoice.php
new file mode 100644
index 0000000..2600af9
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_guarantee_invoice.php
@@ -0,0 +1,53 @@
+Sie erhalten eine E-Mail mit den Bankdaten von Novalnet, um die Zahlung abzuschließen
');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PUBLIC_TITLE', 'Rechnung mit Zahlungsgarantie ');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_invoice.png', 'Rechnung mit Zahlungsgarantie') : '');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS_TITLE', MODULE_PAYMENT_GUARNTEE_REQUIREMENT.MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_MIN_AMOUNT_LIMIT_TITLE', 'Mindestbestellbetrag für Zahlungsgarantie');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_MIN_AMOUNT_LIMIT_DESC', 'Diese Einstellung wird den Standardwert für den Mindestbestellbetrag überschreiben. Beachten Sie, dass der Betrag im Bereich von 20,00 EUR – 5.000,00 EUR liegen muss.');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PENDING_ORDER_STATUS_ID_TITLE', 'Status für Bestellungen mit ausstehender Zahlung');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PENDING_ORDER_STATUS_ID_DESC', 'Wählen Sie, welcher Status für Bestellungen mit ausstehender Zahlung verwendet wird.');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_guarantee_sepa.php b/includes/languages/german/modules/payment/novalnet_guarantee_sepa.php
new file mode 100644
index 0000000..9015143
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_guarantee_sepa.php
@@ -0,0 +1,58 @@
+Der Betrag wird durch Novalnet von Ihrem Konto abgebucht
');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PUBLIC_TITLE', 'SEPA-Lastschrift mit Zahlungsgarantie ');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_sepa.png', 'SEPA-Lastschrift mit Zahlungsgarantie') : '');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_FORM_MANDATE_CONFIRM_TEXT', 'Ich erteile hiermit das SEPA-Lastschriftmandat (elektronische Übermittlung) und bestätige, dass die Bankverbindung korrekt ist!Ich ermächtige den Zahlungsempfänger, Zahlungen von meinem Konto mittels Lastschrift einzuziehen. Zugleich weise ich mein Kreditinstitut an, die von dem Zahlungsempfänger auf mein Konto gezogenen Lastschriften einzulösen.
Gläubiger-Identifikationsnummer: DE53ZZZ00000004253
Hinweis: Ich kann innerhalb von acht Wochen, beginnend mit dem Belastungsdatum, die Erstattung des belasteten Betrages verlangen. Es gelten dabei die mit meinem Kreditinstitut vereinbarten Bedingungen.
');
+
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS_TITLE', MODULE_PAYMENT_GUARNTEE_REQUIREMENT.MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PAYMENT_DUE_DATE_TITLE', 'Tage bis zum Einzug des Betrags per SEPA-Lastschrift');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PAYMENT_DUE_DATE_DESC', 'Geben Sie die Anzahl der Tage ein, nach denen der Zahlungsbetrag eingezogen werden soll (muss zwischen 2 und 14 Tagen liegen).');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_MIN_AMOUNT_LIMIT_TITLE', 'Mindestbestellbetrag für Zahlungsgarantie');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_MIN_AMOUNT_LIMIT_DESC', 'Diese Einstellung wird den Standardwert für den Mindestbestellbetrag überschreiben. Beachten Sie, dass der Betrag im Bereich von 20,00 EUR – 5.000,00 EUR liegen muss.');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PENDING_ORDER_STATUS_ID_TITLE', 'Status für Bestellungen mit ausstehender Zahlung');
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PENDING_ORDER_STATUS_ID_DESC', 'Wählen Sie, welcher Status für Bestellungen mit ausstehender Zahlung verwendet wird.');
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_ideal.php b/includes/languages/german/modules/payment/novalnet_ideal.php
new file mode 100644
index 0000000..bd9e01c
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_ideal.php
@@ -0,0 +1,42 @@
+Sie werden zu iDEAL weitergeleitet. Um eine erfolgreiche Zahlung zu gewährleisten, darf die Seite nicht geschlossen oder neu geladen werden, bis die Bezahlung abgeschlossen ist
');
+define('MODULE_PAYMENT_NOVALNET_IDEAL_PUBLIC_TITLE', 'iDEAL ');
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_ideal.png', 'iDEAL') : '');
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_IDEAL_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_IDEAL_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_instalment_invoice.php b/includes/languages/german/modules/payment/novalnet_instalment_invoice.php
new file mode 100644
index 0000000..1e28a41
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_instalment_invoice.php
@@ -0,0 +1,60 @@
+Sie erhalten eine E-Mail mit den Bankdaten von Novalnet, um die Zahlung abzuschließen
');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PUBLIC_TITLE', 'Ratenzahlung per Rechnung');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_invoice.png', 'Ratenzahlung per Rechnung') : '');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS_TITLE', MODULE_PAYMENT_INSTALMENT_REQUIREMENT.MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEST_MODE_TITLE',MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE );
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PERIOD_TITLE', 'Zahlungsrhythmus für die einzelnen Raten');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PERIOD_DESC', 'Wählen Sie einen passenden Zeitraum zwischen den zu zahlenden Raten aus.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CYCLE_TITLE', 'Anzahl der Raten');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CYCLE_DESC', 'Wählen Sie die verschiedenen Anzahlen der Raten aus, die Sie erlauben wollen (Mehrfachnennung möglich)');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_MIN_AMOUNT_LIMIT_TITLE', 'Mindestbestellbetrag (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_MIN_AMOUNT_LIMIT_DESC', 'Diese Einstellung überschreibt die Standardeinstellung für den Mindest-Bestellbetrag. Anmerkung: der Mindest-Bestellbetrag sollte größer oder gleich 19,98 EUR sein.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PENDING_ORDER_STATUS_ID_TITLE', 'Status für Bestellungen mit ausstehender Zahlung');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PENDING_ORDER_STATUS_ID_DESC', 'Wählen Sie, welcher Status für Bestellungen mit ausstehender Zahlung verwendet wird.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_instalment_sepa.php b/includes/languages/german/modules/payment/novalnet_instalment_sepa.php
new file mode 100644
index 0000000..88b29b9
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_instalment_sepa.php
@@ -0,0 +1,61 @@
+Der Betrag wird durch Novalnet von Ihrem Konto abgebucht
');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PUBLIC_TITLE', 'Ratenzahlung per SEPA-Lastschrift ');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_sepa.png', 'Ratenzahlung per SEPA-Lastschrift') : '');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_FORM_MANDATE_CONFIRM_TEXT', 'Ich erteile hiermit das SEPA-Lastschriftmandat (elektronische Übermittlung) und bestätige, dass die Bankverbindung korrekt ist!Ich ermächtige den Zahlungsempfänger, Zahlungen von meinem Konto mittels Lastschrift einzuziehen. Zugleich weise ich mein Kreditinstitut an, die von dem Zahlungsempfänger auf mein Konto gezogenen Lastschriften einzulösen.
Gläubiger-Identifikationsnummer: DE53ZZZ00000004253
Hinweis: Ich kann innerhalb von acht Wochen, beginnend mit dem Belastungsdatum, die Erstattung des belasteten Betrages verlangen. Es gelten dabei die mit meinem Kreditinstitut vereinbarten Bedingungen.
');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS_TITLE',MODULE_PAYMENT_INSTALMENT_REQUIREMENT. MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_MIN_AMOUNT_LIMIT_TITLE', 'Mindestbestellbetrag (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_MIN_AMOUNT_LIMIT_DESC', 'Diese Einstellung überschreibt die Standardeinstellung für den Mindest-Bestellbetrag. Anmerkung: der Mindest-Bestellbetrag sollte größer oder gleich 19,98 EUR sein.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PERIOD_TITLE', 'Zahlungsrhythmus für die einzelnen Raten');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PERIOD_DESC', 'Wählen Sie einen passenden Zeitraum zwischen den zu zahlenden Raten aus.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CYCLE_TITLE', 'Anzahl der Raten');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CYCLE_DESC', 'Wählen Sie die verschiedenen Anzahlen der Raten aus, die Sie erlauben wollen (Mehrfachnennung möglich)');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PENDING_ORDER_STATUS_ID_TITLE', 'Status für Bestellungen mit ausstehender Zahlung');
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PENDING_ORDER_STATUS_ID_DESC', 'Wählen Sie, welcher Status für Bestellungen mit ausstehender Zahlung verwendet wird.');
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC)
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_invoice.php b/includes/languages/german/modules/payment/novalnet_invoice.php
new file mode 100644
index 0000000..fb54618
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_invoice.php
@@ -0,0 +1,54 @@
+Sie erhalten eine E-Mail mit den Bankdaten von Novalnet, um die Zahlung abzuschließen
');
+define('MODULE_PAYMENT_NOVALNET_INVOICE_PUBLIC_TITLE', 'Rechnung ');
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_invoice.png', 'Rechnung ') : '');
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_DUE_DATE_TITLE', 'Fälligkeit der Rechnung (in Tagen)');
+define('MODULE_PAYMENT_NOVALNET_INVOICE_DUE_DATE_DESC', 'Anzahl der Tage, die der Käufer Zeit hat, um den Betrag an Novalnet zu überweisen (muss mehr als 7 Tage betragen). Wenn Sie dieses Feld leer lassen, werden standardmäßig 14 Tage als Fälligkeitsdatum festgelegt.');
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_CALLBACK_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_CALLBACK_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_CALLBACK_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_CALLBACK_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_INVOICE_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_postfinance.php b/includes/languages/german/modules/payment/novalnet_postfinance.php
new file mode 100644
index 0000000..3ae10f4
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_postfinance.php
@@ -0,0 +1,45 @@
+ Sie werden zu PostFinance weitergeleitet. Um eine erfolgreiche Zahlung zu gewährleisten, darf die Seite nicht geschlossen oder neu geladen werden, bis die Bezahlung abgeschlossen ist
');
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_PUBLIC_TITLE', 'PostFinance ');
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_postfinance.png', 'PostFinance') : '');
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_PENDING_ORDER_STATUS_ID_TITLE', 'Status für Bestellungen mit ausstehender Zahlung');
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_PENDING_ORDER_STATUS_ID_DESC', 'Wählen Sie, welcher Status für Bestellungen mit ausstehender Zahlung verwendet wird.');
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_postfinance_card.php b/includes/languages/german/modules/payment/novalnet_postfinance_card.php
new file mode 100644
index 0000000..5cd13a6
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_postfinance_card.php
@@ -0,0 +1,44 @@
+ Sie werden zu PostFinance weitergeleitet. Um eine erfolgreiche Zahlung zu gewährleisten, darf die Seite nicht geschlossen oder neu geladen werden, bis die Bezahlung abgeschlossen ist
');
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PUBLIC_TITLE', 'PostFinance Card ');
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_postfinance_card.png', 'PostFinance Card') : '');
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PENDING_ORDER_STATUS_ID_TITLE', 'Status für Bestellungen mit ausstehender Zahlung');
+define('MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PENDING_ORDER_STATUS_ID_DESC', 'Wählen Sie, welcher Status für Bestellungen mit ausstehender Zahlung verwendet wird.');
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_prepayment.php b/includes/languages/german/modules/payment/novalnet_prepayment.php
new file mode 100644
index 0000000..9a3ddee
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_prepayment.php
@@ -0,0 +1,44 @@
+Sie erhalten eine E-Mail mit den Bankdaten von Novalnet, um die Zahlung abzuschließen
');
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_PUBLIC_TITLE', 'Vorkasse ');
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_prepayment.png', 'Vorkasse') : '');
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_ORDER_STATUS_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_CALLBACK_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_CALLBACK_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_CALLBACK_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_CALLBACK_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PREPAYMENT_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_przelewy24.php b/includes/languages/german/modules/payment/novalnet_przelewy24.php
new file mode 100644
index 0000000..f8be0df
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_przelewy24.php
@@ -0,0 +1,45 @@
+Sie werden zu Przelewy24 weitergeleitet. Um eine erfolgreiche Zahlung zu gewährleisten, darf die Seite nicht geschlossen oder neu geladen werden, bis die Bezahlung abgeschlossen ist
');
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_PUBLIC_TITLE', 'Przelewy24 ');
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_przelewy24.png', 'Przelewy24') : '');
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_ORDER_STATUS_ID_DESC',MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_PENDING_ORDER_STATUS_ID_TITLE', 'Status für Bestellungen mit ausstehender Zahlung');
+define('MODULE_PAYMENT_NOVALNET_PRZELEWY24_PENDING_ORDER_STATUS_ID_DESC', 'Wählen Sie, welcher Status für Bestellungen mit ausstehender Zahlung verwendet wird.');
+
+?>
diff --git a/includes/languages/german/modules/payment/novalnet_sepa.php b/includes/languages/german/modules/payment/novalnet_sepa.php
new file mode 100644
index 0000000..33cc729
--- /dev/null
+++ b/includes/languages/german/modules/payment/novalnet_sepa.php
@@ -0,0 +1,54 @@
+Der Betrag wird durch Novalnet von Ihrem Konto abgebucht
');
+define('MODULE_PAYMENT_NOVALNET_SEPA_PUBLIC_TITLE', 'SEPA-Lastschrift ');
+define('MODULE_PAYMENT_NOVALNET_SEPA_LOGO', (defined('MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY') && MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY == 'True') ? zen_image(DIR_WS_IMAGES . 'icons/novalnet/novalnet_sepa.png', 'SEPA-Lastschrift') : '');
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_FORM_MANDATE_CONFIRM_TEXT', 'Ich erteile hiermit das SEPA-Lastschriftmandat (elektronische Übermittlung) und bestätige, dass die Bankverbindung korrekt ist!Ich ermächtige den Zahlungsempfänger, Zahlungen von meinem Konto mittels Lastschrift einzuziehen. Zugleich weise ich mein Kreditinstitut an, die von dem Zahlungsempfänger auf mein Konto gezogenen Lastschriften einzulösen.
Gläubiger-Identifikationsnummer: DE53ZZZ00000004253
Hinweis: Ich kann innerhalb von acht Wochen, beginnend mit dem Belastungsdatum, die Erstattung des belasteten Betrages verlangen. Es gelten dabei die mit meinem Kreditinstitut vereinbarten Bedingungen.
');
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_STATUS_TITLE', MODULE_PAYMENT_NOVALNET_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_STATUS_DESC', MODULE_PAYMENT_NOVALNET_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_TEST_MODE_TITLE', MODULE_PAYMENT_NOVALNET_TEST_MODE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_TEST_MODE_DESC', MODULE_PAYMENT_NOVALNET_TEST_MODE_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_PAYMENT_DUE_DATE_TITLE', 'Tage bis zum Einzug des Betrags per SEPA-Lastschrift');
+define('MODULE_PAYMENT_NOVALNET_SEPA_PAYMENT_DUE_DATE_DESC', 'Geben Sie die Anzahl der Tage ein, nach denen der Zahlungsbetrag eingezogen werden soll (muss zwischen 2 und 14 Tagen liegen).');
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_LIMIT_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_LIMIT_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ONHOLD_LIMIT_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_CUSTOMER_INFO_TITLE', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_CUSTOMER_INFO_DESC', MODULE_PAYMENT_NOVALNET_CUSTOMER_INFO_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_SORT_ORDER_TITLE', MODULE_PAYMENT_NOVALNET_SORT_ORDER_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_SORT_ORDER_DESC', MODULE_PAYMENT_NOVALNET_SORT_ORDER_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_ORDER_STATUS_ID_TITLE', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_ORDER_STATUS_ID_DESC', MODULE_PAYMENT_NOVALNET_ORDER_STATUS_DESC);
+
+define('MODULE_PAYMENT_NOVALNET_SEPA_ZONE_TITLE', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_TITLE);
+define('MODULE_PAYMENT_NOVALNET_SEPA_ZONE_DESC', MODULE_PAYMENT_NOVALNET_PAYMENT_ZONE_DESC);
+
+
+
+?>
diff --git a/includes/modules/payment/novalnet_PayPal.php b/includes/modules/payment/novalnet_PayPal.php
new file mode 100644
index 0000000..717ae2c
--- /dev/null
+++ b/includes/modules/payment/novalnet_PayPal.php
@@ -0,0 +1,278 @@
+code = 'novalnet_PayPal';
+ $this->title = MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_PAYPAL_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_DESCRIPTION;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS == 'True') ? true : false);
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER;
+ $this->form_action_url = 'https://payport.novalnet.de/paypal_payport';
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) {
+ return false;
+ }
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_PAYPAL_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_PAYPAL_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '' ). $notification;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ global $order;
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ NovalnetUtil::generateEncodeValue($request);
+
+ $process_button_string = '';
+ foreach ($request as $k => $v) {
+ $process_button_string .= zen_draw_hidden_field($k, $v);
+ }
+
+ $process_button_string .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
+
+ return $process_button_string;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $post = $_REQUEST;
+
+ if (isset($post['status']) && $post['status'] == 100) {
+
+ // Hash Validation failed
+ if (NovalnetUtil::validateHashResponse($post)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ // Decoding Novalnet server response
+ $payment_response = NovalnetUtil::decodePaygateResponse($post);
+
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ $order_status = (($payment_response['tid_status'] == 90) ? MODULE_PAYMENT_NOVALNET_PAYPAL_PENDING_ORDER_STATUS_ID : (($payment_response['tid_status'] == 85) ? MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID : MODULE_PAYMENT_NOVALNET_PAYPAL_ORDER_STATUS_ID));
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($payment_response), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $payment_response['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($post) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_PayPal.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_TITLE."', 'MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD', 'Capture', '".MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_DESC."', '6', '2', 'zen_cfg_select_option(array(\'Capture\', \'Authorize\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_LIMIT_DESC."', '6', '3', now())");
+
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_PAYPAL_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_PAYPAL_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_PAYPAL_CUSTOMER_INFO_DESC."', '6', '4', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER', '15', '".MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER_DESC."', '6', '5', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PAYPAL_PENDING_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_PAYPAL_PENDING_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_PAYPAL_PENDING_ORDER_STATUS_ID_DESC."', '6', '7', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PAYPAL_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_PAYPAL_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_PAYPAL_ORDER_STATUS_ID_DESC."', '6', '6', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE_DESC."', '6', '8', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD',
+ 'MODULE_PAYMENT_NOVALNET_PAYPAL_ONHOLD_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_PAYPAL_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_PAYPAL_PENDING_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_PAYPAL_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_banktransfer.php b/includes/modules/payment/novalnet_banktransfer.php
new file mode 100644
index 0000000..0cdfd3b
--- /dev/null
+++ b/includes/modules/payment/novalnet_banktransfer.php
@@ -0,0 +1,272 @@
+code = 'novalnet_banktransfer';
+ $this->title = MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_BANKTRANSFER_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEXT_DESCRIPTION;
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_BANKTRANSFER_SORT_ORDER;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS == 'True') ? true : false);
+ $this->form_action_url = 'https://payport.novalnet.de/online_transfer_payport';
+
+ if (is_object($order))
+ $this->update_status();
+ }
+
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) {
+ return false;
+ }
+
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_BANKTRANSFER_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_BANKTRANSFER_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '') . $notification;
+
+ return $selection;
+ }
+
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ global $order;
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ NovalnetUtil::generateEncodeValue($request);
+
+ $process_button_string = '';
+ foreach ($request as $k => $v) {
+ $process_button_string .= zen_draw_hidden_field($k, $v);
+ }
+
+ $process_button_string .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
+
+ return $process_button_string;
+ }
+
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $post = $_REQUEST;
+
+ if (isset($post['status']) && $post['status'] == 100) {
+
+ // Hash Validation failed
+ if (NovalnetUtil::validateHashResponse($post)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ // Decoding Novalnet server response
+ $payment_response = NovalnetUtil::decodePaygateResponse($post);
+
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus(MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ORDER_STATUS_ID);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($payment_response), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $payment_response['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($post) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_banktransfer.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_CUSTOMER_INFO_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_SORT_ORDER', '8', '".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_SORT_ORDER_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ORDER_STATUS_ID_DESC."', '6', '4', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ZONE_DESC."', '6', '5', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_BANKTRANSFER_ZONE'
+ );
+ }
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_BANKTRANSFER_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_cashpayment.php b/includes/modules/payment/novalnet_cashpayment.php
new file mode 100644
index 0000000..2faa0de
--- /dev/null
+++ b/includes/modules/payment/novalnet_cashpayment.php
@@ -0,0 +1,265 @@
+code = 'novalnet_cashpayment';
+ $this->title = MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_CASHPAYMENT_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEXT_DESCRIPTION;
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SORT_ORDER;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS == 'True') ? true : false);
+
+ if (is_object($order))
+ $this->update_status();
+ }
+
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+
+ /**
+ * Function : javascript_validation()
+ *
+ * @return boolean
+ */
+ function javascript_validation() {
+ return false;
+ }
+
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) { // Validate the Novalnet merchant details
+ return false;
+ }
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_CASHPAYMENT_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '').$notification;
+
+ return $selection;
+ }
+
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+
+ return false;
+ }
+
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ $response = NovalnetUtil::doPaymentCurlCall('https://payport.novalnet.de/paygate.jsp', $request, $this->code);
+ parse_str($response, $payment_response);
+
+ if ($payment_response['status'] == 100) {
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus(MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ORDER_STATUS_ID);
+
+ // Get Barzahlen Comments
+ $cashpayment_comments = NovalnetUtil::formCashpaymentComments($payment_response);
+
+ $order->info['comments'] .= $transaction_comments. $cashpayment_comments;
+
+ $_SESSION['novalnet_cp_token'] = $payment_response['cp_checkout_token'].'|'. $payment_response['test_mode'];
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($request), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $request['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => '0'
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($payment_response) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_cashpayment.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_EXPIRY_DATE_TITLE."', 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_EXPIRY_DATE', '', '".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_EXPIRY_DATE_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CUSTOMER_INFO_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SORT_ORDER', '10', '".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SORT_ORDER_DESC."', '6', '4', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ORDER_STATUS_ID_DESC."', '6', '5', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CALLBACK_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CALLBACK_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CALLBACK_STATUS_ID_DESC."', '6', '6', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ZONE_DESC."', '6', '7', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SLIP_EXPIRY_DATE',
+ 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_CALLBACK_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_CASHPAYMENT_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_CASHPAYMENT_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_cc.php b/includes/modules/payment/novalnet_cc.php
new file mode 100644
index 0000000..e16e950
--- /dev/null
+++ b/includes/modules/payment/novalnet_cc.php
@@ -0,0 +1,358 @@
+code = 'novalnet_cc';
+ $this->title = MODULE_PAYMENT_NOVALNET_CC_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_CC_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_CC_REDIRECTION_TEXT_DESCRIPTION;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_CC_STATUS == 'True') ? true : false);
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_CC_SORT_ORDER;
+ $this->form_action_url = 'https://payport.novalnet.de/pci_payport';
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_CC_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_CC_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) { // Validate the Novalnet merchant details
+ return false;
+ }
+
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_CC_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' : '';
+
+ $cc_fields = '';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_CC_LOGO;
+ $selection['module'] .= $this->description. $cc_fields;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_CC_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '').$notification;
+
+ $fieldArray = array();
+ $fieldArray[] = array(
+ 'title' => '',
+ 'field' => $this->renderCCForm());
+ $selection['fields'] = $fieldArray;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ $post = $_REQUEST;
+
+ if(empty($post['nn_cc_pan_hash']) || empty($post['nn_cc_uniqueid'])) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_VALID_CC_DETAILS . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ global $order;
+
+ $post = $_REQUEST;
+ if (isset($_SESSION['novalnet'][$this->code]['order_amount'])) {
+ $_SESSION['novalnet'][$this->code] = array_merge($_SESSION['novalnet'][$this->code], $post);
+ }
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ NovalnetUtil::generateEncodeValue($request);
+
+ $process_button_string = '';
+ foreach ($request as $k => $v) {
+ $process_button_string .= zen_draw_hidden_field($k, $v);
+ }
+ $process_button_string .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
+ return $process_button_string;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $post = $_REQUEST;
+
+ if (isset($post['status']) && $post['status'] == 100) {
+
+ // Hash Validation failed
+ if (NovalnetUtil::validateHashResponse($post)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ // Hash Validation failed
+ if (NovalnetUtil::validateHashResponse($post)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR . '', 'error');
+ // displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ // Decoding Novalnet server response
+ $payment_response = NovalnetUtil::decodePaygateResponse($post);
+
+ $this->update_response($post, $payment_response);
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($post) . '', 'error');
+ // displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+
+ }
+ }
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_CC_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_cc.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_CC_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_CC_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_ONHOLD_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_ONHOLD', 'Capture', '".MODULE_PAYMENT_NOVALNET_CC_ONHOLD_DESC."', '6', '2', 'zen_cfg_select_option(array(\'Capture\', \'Authorize\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_ONHOLD_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_ONHOLD_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_CC_ONHOLD_LIMIT_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO', 'False', '".MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO_DESC."', '6', '4', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO', 'False', '".MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO_DESC."', '6', '5', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_CC_CUSTOMER_INFO_DESC."', '6', '6', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_FORM_LABEL_STYLE_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_FORM_LABEL_STYLE', 'font-family: verdana, arial, helvetica, sans-serif;font-size: 12px;', '".MODULE_PAYMENT_NOVALNET_CC_FORM_LABEL_STYLE_DESC."', '6', '7', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_FORM_INPUT_STYLE_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_FORM_INPUT_STYLE', 'border: 3px solid #ccc; height: 42px; padding-left: 5px;', '".MODULE_PAYMENT_NOVALNET_CC_FORM_INPUT_STYLE_DESC."', '6', '8', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_FORM_CSS_STYLE_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_FORM_CSS_STYLE', '#iframeForm { max-width:600px;margin-left:25px;} .label-group {width:25%;} .input-group {width:71%} .input-group input {height:38px !important;}@media screen and (min-width:270px) and (max-width:570px) {.label-group,.input-group {width: 100%;}}', '".MODULE_PAYMENT_NOVALNET_CC_FORM_CSS_STYLE_DESC."', '6', '9', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_SORT_ORDER', '2', '".MODULE_PAYMENT_NOVALNET_CC_SORT_ORDER_DESC."', '6', '10', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_CC_ORDER_STATUS_ID_DESC."', '6', '11', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_CC_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_CC_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_CC_ZONE_DESC."', '6', '12', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_CC_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_CC_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_CC_ONHOLD',
+ 'MODULE_PAYMENT_NOVALNET_CC_ONHOLD_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_CC_AMEX_LOGO',
+ 'MODULE_PAYMENT_NOVALNET_CC_MAESTRO_LOGO',
+ 'MODULE_PAYMENT_NOVALNET_CC_FORM_LABEL_STYLE',
+ 'MODULE_PAYMENT_NOVALNET_CC_FORM_INPUT_STYLE',
+ 'MODULE_PAYMENT_NOVALNET_CC_FORM_CSS_STYLE',
+ 'MODULE_PAYMENT_NOVALNET_CC_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_CC_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_CC_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_CC_ZONE'
+ );
+ }
+
+ /**
+ * Update transaction details
+ *
+ * @param $request
+ * @param $response
+ *
+ * @return none
+ */
+ function update_response($request, $response) {
+ global $order;
+ $test_mode = (int)(!empty($response['test_mode']) || MODULE_PAYMENT_NOVALNET_CC_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($response['tid'], $test_mode);
+ $order_status = $response['tid_status'] == 98 ? MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID : MODULE_PAYMENT_NOVALNET_CC_ORDER_STATUS_ID;
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($request), array(
+ 'tid' => $response['tid'],
+ 'amount' => $request['amount'],
+ 'gateway_status' => $response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+ }
+
+ /**
+ * To get Iframe form in checkout page
+ *
+ * @return string
+ */
+ function renderCCForm() {
+
+ $language = ($_SESSION['language'] == 'english') ? 'en' : 'de';
+ $vendor = MODULE_PAYMENT_NOVALNET_VENDOR_ID;
+ $product = MODULE_PAYMENT_NOVALNET_PRODUCT_ID;
+ $serverIp = (filter_var($_SERVER['SERVER_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) || $_SERVER['SERVER_ADDR'] == '::1' || empty($_SERVER['SERVER_ADDR'])) ? '127.0.0.1' : $_SERVER['SERVER_ADDR'];
+
+ // Form signature
+ $signature = base64_encode("vendor=$vendor&product=$product&server_ip=$serverIp");
+
+ // Iframe URL path
+ $path = 'https://secure.novalnet.de/cc?api='. $signature . '&ln=' . $language ;
+
+ // CC CSS Configurations
+ $cc_hidden_field = '
+
+
+
+
+
+
+
+
+
+
+
+
+ ';
+
+
+ return ''.$cc_hidden_field;
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_CC_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_config.php b/includes/modules/payment/novalnet_config.php
new file mode 100644
index 0000000..659acfc
--- /dev/null
+++ b/includes/modules/payment/novalnet_config.php
@@ -0,0 +1,165 @@
+code = 'novalnet_config';
+ $this->title = MODULE_PAYMENT_NOVALNET_CONFIG_TEXT_TITLE;
+ $this->enabled = true;
+ $this->sort_order = 0;
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+ return false;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_CONFIG_ALLOWED'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db, $request_type;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_config.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('', 'MODULE_PAYMENT_NOVALNET_CONFIG_ALLOWED', '', '', '6', '0', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . MODULE_PAYMENT_NOVALNET_PUBLIC_KEY_TITLE. "', 'MODULE_PAYMENT_NOVALNET_PUBLIC_KEY', '', '" .MODULE_PAYMENT_NOVALNET_PUBLIC_KEY_DESC. "', '6', '1', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . MODULE_PAYMENT_NOVALNET_VENDOR_ID_TITLE. "', 'MODULE_PAYMENT_NOVALNET_VENDOR_ID', '', '" . MODULE_PAYMENT_NOVALNET_VENDOR_ID_DESC . "', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . MODULE_PAYMENT_NOVALNET_AUTH_CODE_TITLE . "', 'MODULE_PAYMENT_NOVALNET_AUTH_CODE', '', '" . MODULE_PAYMENT_NOVALNET_AUTH_CODE_DESC . "', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . MODULE_PAYMENT_NOVALNET_PRODUCT_ID_TITLE . "', 'MODULE_PAYMENT_NOVALNET_PRODUCT_ID', '', '" . MODULE_PAYMENT_NOVALNET_PRODUCT_ID_DESC . "', '6', '4', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . MODULE_PAYMENT_NOVALNET_TARIFF_ID_TITLE . "', 'MODULE_PAYMENT_NOVALNET_TARIFF_ID', '', '" . MODULE_PAYMENT_NOVALNET_TARIFF_ID_DESC . "', '6', '5', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . MODULE_PAYMENT_NOVALNET_PAYMENT_ACCESS_KEY_TITLE . "', 'MODULE_PAYMENT_NOVALNET_PAYMENT_ACCESS_KEY', '', '" . MODULE_PAYMENT_NOVALNET_PAYMENT_ACCESS_KEY_DESC . "', '6', '6', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY_TITLE . "', 'MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY', 'True', '" . MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY_DESC. "', '6', '7', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID_DESC."', '6', '8', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_CANCELLED_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_CANCELLED_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_CANCELLED_STATUS_ID_DESC."', '6', '9', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_NOVALNET_CALLBACK_TEST_MODE_TITLE . "', 'MODULE_PAYMENT_NOVALNET_CALLBACK_TEST_MODE', 'False', '" . MODULE_PAYMENT_NOVALNET_CALLBACK_TEST_MODE_DESC . "', '6', '10', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_SEND_TITLE . "', 'MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_SEND', 'True', '" . MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_SEND_DESC . "', '6', '11', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_TO_TITLE . "', 'MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_TO', '', '" . MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_TO_DESC . "', '6', '12', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . MODULE_PAYMENT_NOVALNET_CALLBACK_NOTIFY_URL_TITLE. "', 'MODULE_PAYMENT_NOVALNET_CALLBACK_NOTIFY_URL', '".((($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG) . 'extras/novalnet_callback.php'."', '" .MODULE_PAYMENT_NOVALNET_CALLBACK_NOTIFY_URL_DESC. "', '6', '13', now())");
+
+ return $this->createcustom_novalnet_table();
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $keys = array_merge($this->keys(), array('MODULE_PAYMENT_NOVALNET_CONFIG_ALLOWED'));
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $keys) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ // Assign hidden values
+ $lang = ($_SESSION['language'] == 'english') ? 'EN' : 'DE';
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_PUBLIC_KEY',
+ 'MODULE_PAYMENT_NOVALNET_VENDOR_ID',
+ 'MODULE_PAYMENT_NOVALNET_AUTH_CODE',
+ 'MODULE_PAYMENT_NOVALNET_PRODUCT_ID',
+ 'MODULE_PAYMENT_NOVALNET_TARIFF_ID',
+ 'MODULE_PAYMENT_NOVALNET_PAYMENT_ACCESS_KEY',
+ 'MODULE_PAYMENT_NOVALNET_PAYMENT_LOGO_DISPLAY',
+ 'MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_CANCELLED_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_CALLBACK_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_SEND',
+ 'MODULE_PAYMENT_NOVALNET_CALLBACK_MAIL_TO',
+ 'MODULE_PAYMENT_NOVALNET_CALLBACK_NOTIFY_URL'
+
+ );
+ }
+
+ function createcustom_novalnet_table()
+ {
+ global $db;
+ $insert_novalnet_tables = true;
+ $result = $db->Execute('select table_name from information_schema.columns where table_schema = "' . DB_DATABASE . '"');
+ if ($result->table_name == 'novalnet_transaction_detail')
+ $insert_novalnet_tables = false;
+
+
+ if ($insert_novalnet_tables) {
+ //Import Novalnet package SQL tables
+ $sql_file = DIR_FS_CATALOG . 'includes/ext/novalnet/install/install.sql';
+ $sql_lines = file_get_contents($sql_file);
+ $sql_linesArr = explode(";", $sql_lines);
+ foreach ($sql_linesArr as $sql) {
+ if (trim($sql) > '') {
+ $db->Execute($sql);
+ }
+ }
+ }
+ }
+}
+
+?>
diff --git a/includes/modules/payment/novalnet_eps.php b/includes/modules/payment/novalnet_eps.php
new file mode 100644
index 0000000..9f89e79
--- /dev/null
+++ b/includes/modules/payment/novalnet_eps.php
@@ -0,0 +1,275 @@
+code = 'novalnet_eps';
+ $this->title = MODULE_PAYMENT_NOVALNET_EPS_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_EPS_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_EPS_TEXT_DESCRIPTION;
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_EPS_SORT_ORDER;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_EPS_STATUS == 'True') ? true : false);
+ $this->form_action_url = 'https://payport.novalnet.de/giropay';
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_EPS_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_EPS_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) { // Validate the Novalnet merchant details, paypal admin configuration details
+ return false;
+ }
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_EPS_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_EPS_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_EPS_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : ''). $notification;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ global $order, $db;
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ $customer = $db->Execute("SHOW FIELDS FROM " . TABLE_ORDERS_STATUS_HISTORY . " WHERE FIELD='comments'");
+ if ($customer->RecordCount() > 0) {
+ $customer = $customer->fields;
+ }
+ if (strtolower($customer['Type']) != 'text') {
+ ### ALTER TABLE ORDERS modify the column comments ###
+ $db->Execute("ALTER TABLE " . TABLE_ORDERS_STATUS_HISTORY . " MODIFY comments text");
+ }
+
+ NovalnetUtil::generateEncodeValue($request);
+
+ $process_button_string = '';
+ foreach ($request as $k => $v) {
+ $process_button_string .= zen_draw_hidden_field($k, $v);
+ }
+
+ $process_button_string .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
+
+ return $process_button_string;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $post = $_REQUEST;
+
+ if (isset($post['status']) && $post['status'] == 100) {
+
+ // Hash Validation failed
+ if (NovalnetUtil::validateHashResponse($post)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ // Decoding Novalnet server response
+ $payment_response = NovalnetUtil::decodePaygateResponse($post);
+
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_EPS_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus(MODULE_PAYMENT_NOVALNET_EPS_ORDER_STATUS_ID);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($payment_response), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $payment_response['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($post) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_EPS_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_eps.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_EPS_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_EPS_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_EPS_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_EPS_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_EPS_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_EPS_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_EPS_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_EPS_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_EPS_CUSTOMER_INFO_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_EPS_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_EPS_SORT_ORDER', '12', '".MODULE_PAYMENT_NOVALNET_EPS_SORT_ORDER_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_EPS_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_EPS_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_EPS_ORDER_STATUS_ID_DESC."', '6', '4', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_EPS_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_EPS_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_EPS_ZONE_DESC."', '6', '5', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_EPS_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_EPS_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_EPS_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_EPS_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_EPS_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_EPS_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_EPS_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_giropay.php b/includes/modules/payment/novalnet_giropay.php
new file mode 100644
index 0000000..83d2d08
--- /dev/null
+++ b/includes/modules/payment/novalnet_giropay.php
@@ -0,0 +1,267 @@
+code = 'novalnet_giropay';
+ $this->title = MODULE_PAYMENT_NOVALNET_GIROPAY_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_GIROPAY_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_GIROPAY_TEXT_DESCRIPTION;
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_GIROPAY_SORT_ORDER;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS == 'True') ? true : false);
+ $this->form_action_url = 'https://payport.novalnet.de/giropay';
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_GIROPAY_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_GIROPAY_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) {
+ return false;
+ }
+
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_GIROPAY_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_GIROPAY_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_GIROPAY_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '') . $notification;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order,$this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ global $order, $db;
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+
+ NovalnetUtil::generateEncodeValue($request);
+
+ $process_button_string = '';
+ foreach ($request as $k => $v) {
+ $process_button_string .= zen_draw_hidden_field($k, $v);
+ }
+
+ $process_button_string .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
+
+ return $process_button_string;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $post = $_REQUEST;
+
+ if (isset($post['status']) && $post['status'] == 100) {
+
+ // Hash Validation failed
+ if (NovalnetUtil::validateHashResponse($post)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ // Decoding Novalnet server response
+ $payment_response = NovalnetUtil::decodePaygateResponse($post);
+
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_GIROPAY_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus(MODULE_PAYMENT_NOVALNET_GIROPAY_ORDER_STATUS_ID);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($payment_response), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $payment_response['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($post) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_giropay.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GIROPAY_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_GIROPAY_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_GIROPAY_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GIROPAY_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_GIROPAY_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_GIROPAY_CUSTOMER_INFO_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GIROPAY_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_GIROPAY_SORT_ORDER', '9', '".MODULE_PAYMENT_NOVALNET_GIROPAY_SORT_ORDER_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GIROPAY_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_GIROPAY_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_GIROPAY_ORDER_STATUS_ID_DESC."', '6', '4', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GIROPAY_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_GIROPAY_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_GIROPAY_ZONE_DESC."', '6', '5', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_GIROPAY_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_GIROPAY_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_GIROPAY_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_GIROPAY_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_GIROPAY_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_GIROPAY_STATUS == 'true') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_guarantee_invoice.php b/includes/modules/payment/novalnet_guarantee_invoice.php
new file mode 100644
index 0000000..716541c
--- /dev/null
+++ b/includes/modules/payment/novalnet_guarantee_invoice.php
@@ -0,0 +1,311 @@
+code = 'novalnet_guarantee_invoice';
+ $this->title = MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEXT_DESCRIPTION;
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_SORT_ORDER;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS == 'True') ? true : false);
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+ global $order;
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) { // Validate the Novalnet merchant details
+ return false;
+ }
+
+ list($payment_implementation_type, $error) = NovalnetUtil::checkGuaranteeConditions((array)$order, $this->code); // Check condition for displaying birthdate field
+
+ $notification = '';
+ if ($payment_implementation_type == 'error') {
+ $notification .= $error. '
';
+ }
+
+ $customer_info = trim(strip_tags(MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_CUSTOMER_INFO));
+ $customer_info = !empty($customer_info) ? $customer_info.'
' : '';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '') . $notification. $customer_info;
+ $customer_details = NovalnetUtil::getCustomerfields();
+ $fieldsArray = array();
+
+ if (empty($order->billing['company'])) {
+ $fieldsArray[] = array(
+ 'title' => MODULE_PAYMENT_NOVALNET_ENDCUSTOMER_BIRTH_DATE." * ",
+ 'field' => NovalnetUtil::getGuaranteeField($this->code.'_birthdate', $customer_details)
+ );
+ }
+
+ $selection['fields'] = $fieldsArray;
+
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ global $order, $messageStack;
+ $post = $_REQUEST;
+ list($payment_implementation, $error) = NovalnetUtil::checkGuaranteeConditions((array)$order, $this->code);
+
+ if ($payment_implementation == 'error') {
+ $messageStack->add_session('checkout_payment', $error . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ if (empty($order->billing['company']) && empty($post[$this->code.'_birthdate'])) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_DOB_ERROR_MSG . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ if (!empty($post[$this->code.'_birthdate']) && NovalnetUtil::validateAge($post[$this->code.'_birthdate'])) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_AGE_ERROR . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ return false;
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ $post = $_REQUEST;
+
+ if (isset($_SESSION['novalnet'][$this->code]['order_amount'])) {
+ $_SESSION['novalnet'][$this->code] = array_merge($post, $_SESSION['novalnet'][$this->code]);
+ }
+
+ return false;
+
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ $response = NovalnetUtil::doPaymentCurlCall('https://payport.novalnet.de/paygate.jsp', $request, $this->code);
+ parse_str($response, $payment_response);
+
+ if ($payment_response['status'] == 100) {
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+ $order_status = ($payment_response['tid_status'] == 75) ? MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PENDING_ORDER_STATUS_ID : (($payment_response['tid_status'] == 91) ? MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID : MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ORDER_STATUS_ID);
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ if ($payment_response['tid_status'] != 75) {
+ // Get Invoice / Prepayment Comments and Bank details
+ $invoice_comments = NovalnetUtil::formInvoicePrepaymentComments($payment_response);
+ } else {
+ $invoice_comments = MODULE_PAYMENT_NOVALNET_GUARANTEE_MESSAGE;
+ }
+
+ $order->info['comments'] = $transaction_comments. $invoice_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($request), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $request['amount'],
+ 'comments' => PHP_EOL.$order->info['comments'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($payment_response) . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $db, $insert_id;
+
+ if ($_SESSION['novalnet'][$this->code]['gateway_status'] != 75) {
+ // Get Prepayment payment reference comments
+ $reference_comments = NovalnetUtil::novalnetReferenceComments($insert_id, $_SESSION['novalnet'][$this->code], $this->code);
+
+ $comments = $_SESSION['novalnet'][$this->code]['comments'].$reference_comments;
+
+ $db->Execute("update ".TABLE_ORDERS_STATUS_HISTORY." set comments = '".$comments."' where orders_id = '".$insert_id."'");
+ }
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_guarantee_invoice.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD', 'Capture', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_DESC."', '6', '2', 'zen_cfg_select_option(array(\'Capture\', \'Authorize\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_LIMIT_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_MIN_AMOUNT_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_MIN_AMOUNT_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_MIN_AMOUNT_LIMIT_DESC."', '6', '4', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_CUSTOMER_INFO_DESC."', '6', '5', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_SORT_ORDER', '5', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_SORT_ORDER_DESC."', '6', '6', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PENDING_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PENDING_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PENDING_ORDER_STATUS_ID_DESC."', '6', '7', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ORDER_STATUS_ID_DESC."', '6', '8', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ZONE_DESC."', '6', '9', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_MIN_AMOUNT_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ONHOLD_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_PENDING_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_ZONE');
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_GUARANTEE_INVOICE_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_guarantee_sepa.php b/includes/modules/payment/novalnet_guarantee_sepa.php
new file mode 100644
index 0000000..b4182da
--- /dev/null
+++ b/includes/modules/payment/novalnet_guarantee_sepa.php
@@ -0,0 +1,312 @@
+code = 'novalnet_guarantee_sepa';
+ $this->title = MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEXT_DESCRIPTION;
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_SORT_ORDER;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS == 'True') ? true : false);
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+ global $order;
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) { // Validate the Novalnet merchant details
+ return false;
+ }
+
+ list($payment_implementation_type, $error) = NovalnetUtil::checkGuaranteeConditions((array)$order, $this->code); // Check condition for displaying birthdate field
+
+ $notification = '';
+ if ($payment_implementation_type == 'error') {
+ $notification .= $error. '
';
+ }
+
+ $sepa_fields = '';
+
+ $customer_info = trim(strip_tags(MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_CUSTOMER_INFO));
+ $customer_info = !empty($customer_info) ? $customer_info . '
': '';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : ''). $notification. $customer_info. $sepa_fields;
+
+ $fieldsArray = array();
+
+ $fieldsArray[] = array('title' => MODULE_PAYMENT_NOVALNET_ACCOUNT_HOLDER,
+ 'field' => zen_draw_input_field($this->code.'_bank_account_holder', $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'id="' . $this->code . '_bank_account_holder" placeholder="'.MODULE_PAYMENT_NOVALNET_ACCOUNT_HOLDER.'" AUTOCOMPLETE="OFF" onkeypress="return allowName(event);"'),
+ 'tag' => $this->code . '_bank_account_holder');
+ $fieldsArray[] = array('title' => MODULE_PAYMENT_NOVALNET_IBAN,
+ 'field' => zen_draw_input_field($this->code.'_bank_iban', '', 'id="' . $this->code . '_bank_iban" placeholder="'.MODULE_PAYMENT_NOVALNET_IBAN.'" AUTOCOMPLETE="OFF" onkeypress="return allowAlphaNumeric(event);"'),
+ 'tag' => $this->code . '_bank_iban');
+
+ if (empty($order->billing['company'])) {
+ $customer_details = NovalnetUtil::getCustomerfields();
+ $fieldsArray[] = array(
+ 'title' => MODULE_PAYMENT_NOVALNET_ENDCUSTOMER_BIRTH_DATE." * ",
+ 'field' => NovalnetUtil::getGuaranteeField($this->code.'_birthdate', $customer_details)
+ );
+ }
+ $fieldsArray[] = array('title' => '', 'field' => ''.
+ MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_FORM_MANDATE_CONFIRM_TEXT.' |
');
+ $selection['fields'] = $fieldsArray;
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ global $order, $messageStack;
+ $post = $_REQUEST;
+
+ list($payment_implementation, $error) = NovalnetUtil::checkGuaranteeConditions((array)$order, $this->code);
+ if ($payment_implementation == 'error') {
+ $messageStack->add_session('checkout_payment', $error . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ if (empty($post[$this->code.'_bank_iban']) || empty($post[$this->code.'_bank_account_holder'])) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_VALID_ACCOUNT_CREDENTIALS_ERROR . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ if (empty($order->billing['company']) && empty($post[$this->code.'_birthdate'])) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_DOB_ERROR_MSG . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ if (!empty($post[$this->code.'_birthdate']) && NovalnetUtil::validateAge($post[$this->code.'_birthdate'])) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_AGE_ERROR . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ $post = $_REQUEST;
+ if (isset($_SESSION['novalnet'][$this->code]['order_amount'])) {
+ $_SESSION['novalnet'][$this->code] = array_merge($_SESSION['novalnet'][$this->code], $post);
+ }
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ $response = NovalnetUtil::doPaymentCurlCall('https://payport.novalnet.de/paygate.jsp', $request, $this->code);
+ parse_str($response, $payment_response);
+
+ if ($payment_response['status'] == 100) {
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ $order_status = ($payment_response['tid_status'] == 75) ? MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PENDING_ORDER_STATUS_ID : (($payment_response['tid_status'] == 99) ? MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID : MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ORDER_STATUS_ID);
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+ $guarantee_comments = '';
+ if ($payment_response['tid_status'] == 75) {
+ $guarantee_comments = MODULE_PAYMENT_NOVALNET_GUARANTEED_SEPA_MESSAGE;
+ }
+
+ $order->info['comments'] .= $transaction_comments. $guarantee_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($request), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $request['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($payment_response) . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_guarantee_sepa.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PAYMENT_DUE_DATE_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PAYMENT_DUE_DATE', '', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PAYMENT_DUE_DATE_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD', 'Capture', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_DESC."', '6', '3', 'zen_cfg_select_option(array(\'Capture\', \'Authorize\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_LIMIT_DESC."', '6', '4', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_CUSTOMER_INFO_DESC."', '6', '5', now())");
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_MIN_AMOUNT_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_MIN_AMOUNT_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_MIN_AMOUNT_LIMIT_DESC."', '6', '6', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_SORT_ORDER', '6', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_SORT_ORDER_DESC."', '6', '7', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PENDING_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PENDING_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PENDING_ORDER_STATUS_ID_DESC."', '6', '8', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ORDER_STATUS_ID_DESC."', '6', '9', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ZONE_DESC."', '6', '10', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PAYMENT_DUE_DATE',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ONHOLD_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_MIN_AMOUNT_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_PENDING_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_GUARANTEE_SEPA_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_ideal.php b/includes/modules/payment/novalnet_ideal.php
new file mode 100644
index 0000000..b11544b
--- /dev/null
+++ b/includes/modules/payment/novalnet_ideal.php
@@ -0,0 +1,269 @@
+code = 'novalnet_ideal';
+ $this->title = MODULE_PAYMENT_NOVALNET_IDEAL_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_IDEAL_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_IDEAL_TEXT_DESCRIPTION;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_IDEAL_STATUS == 'True') ? true : false);
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_IDEAL_SORT_ORDER;
+ $this->form_action_url = 'https://payport.novalnet.de/online_transfer_payport';
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_IDEAL_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_IDEAL_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) {
+ return false;
+ }
+
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_IDEAL_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_IDEAL_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_IDEAL_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG: '') .$notification;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ global $order;
+
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+
+ NovalnetUtil::generateEncodeValue($request);
+
+ $process_button_string = '';
+ foreach ($request as $k => $v) {
+ $process_button_string .= zen_draw_hidden_field($k, $v);
+ }
+
+ $process_button_string .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
+
+ return $process_button_string;
+ }
+
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $post = $_REQUEST;
+
+ $_SESSION['customer_id'] = $post['customer_no'];
+
+ if (isset($post['status']) && $post['status'] == 100) {
+
+ // Hash Validation failed
+ if (NovalnetUtil::validateHashResponse($post)) {
+
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ // Decoding Novalnet server response
+ $payment_response = NovalnetUtil::decodePaygateResponse($post);
+
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_IDEAL_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus(MODULE_PAYMENT_NOVALNET_IDEAL_ORDER_STATUS_ID);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($payment_response), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $payment_response['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($post) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_IDEAL_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_ideal.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_IDEAL_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_IDEAL_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_IDEAL_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_IDEAL_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_IDEAL_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_IDEAL_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_IDEAL_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_IDEAL_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_IDEAL_CUSTOMER_INFO_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_IDEAL_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_IDEAL_SORT_ORDER', '7', '".MODULE_PAYMENT_NOVALNET_IDEAL_SORT_ORDER_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_IDEAL_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_IDEAL_ORDER_STATUS_ID', '7', '".MODULE_PAYMENT_NOVALNET_IDEAL_ORDER_STATUS_ID_DESC."', '6', '4', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_IDEAL_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_IDEAL_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_IDEAL_ZONE_DESC."', '6', '5', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_IDEAL_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_IDEAL_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_IDEAL_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_IDEAL_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_IDEAL_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_IDEAL_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_IDEAL_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_instalment_invoice.php b/includes/modules/payment/novalnet_instalment_invoice.php
new file mode 100644
index 0000000..129c68b
--- /dev/null
+++ b/includes/modules/payment/novalnet_instalment_invoice.php
@@ -0,0 +1,370 @@
+code = 'novalnet_instalment_invoice';
+ $this->title = MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEXT_DESCRIPTION;
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_SORT_ORDER;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS == 'True') ? true : false);
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+ global $order, $currencies;
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) { // Validate the Novalnet merchant details
+ return false;
+ }
+
+ list($payment_implementation_type, $error) = NovalnetUtil::checkGuaranteeConditions((array)$order, $this->code); // Check condition for displaying birthdate field
+
+ $notification = '';
+ if ($payment_implementation_type == 'error') {
+ $notification .= $error. '
';
+ }
+
+ $customer_info = trim(strip_tags(MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CUSTOMER_INFO));
+ $customer_info = !empty($customer_info) ? $customer_info.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_LOGO;
+ $selection['module'] .= $this->description. '
+ ';
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG: '').$notification. $customer_info;
+
+ $amount = $currencies->format($order->info['total'], 1, $order->info['currency']);
+
+ $periods = NovalnetUtil::getInstalmentCycles($this->code, $order);
+
+ $cycles = NovalnetUtil::getInstalmentPlanDetails($this->code);
+
+ if (empty($cycles) || empty($periods)) {
+ return false;
+ }
+
+ $lang = ($_SESSION['language'] == 'english') ? 'en' : 'de';
+ $fieldArray = array();
+ if (empty($order->billing['company'])) {
+ $customer_details = NovalnetUtil::getCustomerfields();
+ $fieldArray[] = array(
+ 'title' => MODULE_PAYMENT_NOVALNET_ENDCUSTOMER_BIRTH_DATE." * ",
+ 'field' => NovalnetUtil::getGuaranteeField($this->code.'_birthdate', $customer_details)
+ );
+ }
+ $totalamount = number_format($order->info['total'] * $currencies->get_value($order->info['currency']), 2);
+ $total = str_replace(',', '', $totalamount);
+
+ $fieldArray[] = array('title' => '' . MODULE_PAYMENT_NOVALNET_INSTALMENT_PLAN . '
' . MODULE_PAYMENT_NOVALNET_INSTALMENT_PLAN_TEXT . '
' . MODULE_PAYMENT_NOVALNET_INSTALMENT_AMOUNT_TEXT . $amount . '
' ,
+ 'field' => zen_draw_pull_down_menu('novalnet_instalment_invoice_period', $periods, $periods[0], 'id="novalnet_instalment_invoice_period" class="form-control"', false));
+ $fieldArray[] = array(
+ 'title' => '',
+ 'field' => '
+
+
+
+
+
+ '
+ );
+ $selection['fields'] = $fieldArray;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ global $order, $messageStack;
+ $post = $_REQUEST;
+
+ list($payment_implementation_type, $error) = NovalnetUtil::checkGuaranteeConditions((array)$order, $this->code); // Check condition for displaying birthdate field
+
+ if ($payment_implementation_type == 'error') {
+ $messageStack->add_session('checkout_payment', $error . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ $birthdate = $post[$this->code.'_birthdate'];
+ if (empty($order->billing['company']) && NovalnetUtil::validateAge($birthdate, $this->code)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_AGE_ERROR . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ if ($post['novalnet_instalment_invoice_period'] == '0'){
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_INSTALMENT_CHOOSE_PLAN . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ $post = $_REQUEST;
+ if (isset($_SESSION['novalnet'][$this->code]['order_amount'])) {
+ $_SESSION['novalnet'][$this->code] = array_merge($_SESSION['novalnet'][$this->code], $post);
+ }
+
+ return false;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ $response = NovalnetUtil::doPaymentCurlCall('https://payport.novalnet.de/paygate.jsp', $request, $this->code);
+ parse_str($response, $payment_response);
+ if ($payment_response['status'] == 100) {
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ if ($payment_response['tid_status'] != 75) {
+ // Get Invoice / Prepayment Comments and Bank details
+ $invoice_comments = NovalnetUtil::formInvoicePrepaymentComments($payment_response);
+
+ } else {
+ $invoice_comments = MODULE_PAYMENT_NOVALNET_GUARANTEE_MESSAGE;
+ }
+
+ $order_status = $payment_response['tid_status'] == 75 ? MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PENDING_ORDER_STATUS_ID : ($payment_response['tid_status'] == 91 ? MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID : MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ORDER_STATUS_ID);
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ $order->info['comments'] .= $transaction_comments. $invoice_comments;
+ $instalment_details = array();
+ if ($future_instalment = $payment_response['future_instalment_dates']) {
+ $future_instalments = explode('|', $future_instalment);
+ foreach ($future_instalments as $future_instalment) {
+ $cycle = strtok($future_instalment, "-");
+ $cycle_date = explode('-', $future_instalment, 2);
+ $instalment_details[$cycle] = [
+ 'amount' => $payment_response['instalment_cycle_amount'],
+ 'nextCycle' => $cycle_date[1],
+ 'paidDate' => ($cycle == 1) ? date('Y-m-d') : '',
+ 'status' => ($cycle == 1) ? 'Paid' : 'Pending',
+ 'reference' => ($cycle == 1) ? $payment_response['tid'] : ''
+ ];
+ }
+ }
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($request), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $request['amount'],
+ 'comments' => $order->info['comments'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'gateway_response' => $payment_response,
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount'],
+ 'instalment_details' => serialize($instalment_details)
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($payment_response) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $db, $insert_id;
+
+ $instalment_comments = NovalnetUtil::instalmentComments($_SESSION['novalnet'][$this->code]['gateway_response'], $this->code);
+ $reference_comments = '';
+ if ($_SESSION['novalnet'][$this->code]['gateway_status'] != 75) {
+
+ // Get Prepayment payment reference comments
+ $reference_comments .= NovalnetUtil::novalnetReferenceComments($insert_id, $_SESSION['novalnet'][$this->code], $this->code);
+ }
+
+ $comments = $reference_comments . PHP_EOL. $instalment_comments;
+
+ $trans_comments = $_SESSION['novalnet'][$this->code]['comments'].PHP_EOL.$comments;
+
+ $db->Execute("update ".TABLE_ORDERS_STATUS_HISTORY." set comments = '".$trans_comments."' where orders_id = '".$insert_id."'");
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_instalment_invoice.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD', 'Capture', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_DESC."', '6', '2', 'zen_cfg_select_option(array(\'Capture\', \'Authorize\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_LIMIT_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PERIOD_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PERIOD', '', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PERIOD_DESC."', '6', '4', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CYCLE_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CYCLE', '', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CYCLE_DESC."', '6', '5', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_MIN_AMOUNT_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_MIN_AMOUNT_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_MIN_AMOUNT_LIMIT_DESC."', '6', '6', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CUSTOMER_INFO_DESC."', '6', '7', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_SORT_ORDER', '13', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_SORT_ORDER_DESC."', '6', '8', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PENDING_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PENDING_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PENDING_ORDER_STATUS_ID_DESC."', '6', '9', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ORDER_STATUS_ID_DESC."', '6', '10', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ZONE_DESC."', '6', '11', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ $lang = ($_SESSION['language'] == 'english') ? 'en' : 'de';
+ echo '';
+ if( isset( $_GET['action'] ) && $_GET['action'] == 'edit' ) {
+ echo '';
+ }
+ return array( 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ONHOLD_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PERIOD',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CYCLE',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_MIN_AMOUNT_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_PENDING_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_ZONE');
+ }
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_INSTALMENT_INVOICE_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_instalment_sepa.php b/includes/modules/payment/novalnet_instalment_sepa.php
new file mode 100644
index 0000000..68888b8
--- /dev/null
+++ b/includes/modules/payment/novalnet_instalment_sepa.php
@@ -0,0 +1,364 @@
+code = 'novalnet_instalment_sepa';
+ $this->title = MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEXT_DESCRIPTION;
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_SORT_ORDER;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS == 'True') ? true : false);
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+ global $order, $currencies;
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) { // Validate the Novalnet merchant details
+ return false;
+ }
+
+ list($payment_implementation_type, $error) = NovalnetUtil::checkGuaranteeConditions((array)$order, $this->code); // Check condition for displaying birthdate field
+
+ $notification = '';
+ if ($payment_implementation_type == 'error') {
+ $notification .= $error. '
';
+ }
+ $customer_info = trim(strip_tags(MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CUSTOMER_INFO));
+ $customer_info = !empty($customer_info) ? $customer_info. '
': '';
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_LOGO;
+ $selection['module'] .= $this->description . '
+ ';
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '') .$notification. $customer_info;
+
+ $amount = $currencies->format($order->info['total'], 1, $order->info['currency']);
+
+ $periods = NovalnetUtil::getInstalmentCycles($this->code, $order);
+
+ $cycles = NovalnetUtil::getInstalmentPlanDetails($this->code);
+
+ if (empty($cycles) || empty($periods)) {
+ return false;
+ }
+
+ $lang = ($_SESSION['language'] == 'english') ? 'en' : 'de';
+
+ $totalamount = number_format($order->info['total'] * $currencies->get_value($order->info['currency']), 2);
+ $total = str_replace(',', '', $totalamount);
+
+ $fieldsArray = array();
+ $fieldsArray[] = array('title' => MODULE_PAYMENT_NOVALNET_ACCOUNT_HOLDER,
+ 'field' => zen_draw_input_field($this->code.'_bank_account_holder', $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'id="'.$this->code.'_bank_account_holder" placeholder="'.MODULE_PAYMENT_NOVALNET_ACCOUNT_HOLDER.'" autocomplete="off" onkeypress="return allowName(event);"'),
+ 'tag' => $this->code.'_bank_account_holder' );
+ $fieldsArray[] = array('title' => MODULE_PAYMENT_NOVALNET_IBAN,
+ 'field' => zen_draw_input_field($this->code.'_bank_iban','', 'id="'.$this->code.'_bank_iban" placeholder="'.MODULE_PAYMENT_NOVALNET_IBAN.'" autocomplete="off" onkeypress="return allowAlphaNumeric(event);"'),
+ 'tag' => $this->code.'_bank_iban');
+ if (empty($order->billing['company'])) {
+ $customer_details = NovalnetUtil::getCustomerfields();
+
+ $fieldsArray[] = array(
+ 'title' => MODULE_PAYMENT_NOVALNET_ENDCUSTOMER_BIRTH_DATE." * ",
+ 'field' => NovalnetUtil::getGuaranteeField($this->code.'_birthdate', $customer_details)
+ );
+ }
+ $fieldsArray[] = array('title' => '',
+ 'field' => ''.
+ MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_FORM_MANDATE_CONFIRM_TEXT.' |
');
+ $fieldsArray[] = array('title' => '' . MODULE_PAYMENT_NOVALNET_INSTALMENT_PLAN . '
' . MODULE_PAYMENT_NOVALNET_INSTALMENT_PLAN_TEXT . '
' . MODULE_PAYMENT_NOVALNET_INSTALMENT_AMOUNT_TEXT . $amount . '
',
+ 'field' => zen_draw_pull_down_menu('novalnet_instalment_sepa_period', $periods, $periods[0], 'id=novalnet_instalment_sepa_period'));
+ $fieldsArray[] = array(
+ 'title' => '',
+ 'field' => '
+
+
+
+
+
+
+ ');
+ $selection['fields'] = $fieldsArray;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ global $order, $messageStack;
+ $post = $_REQUEST;
+
+ list($payment_implementation_type, $error) = NovalnetUtil::checkGuaranteeConditions((array)$order, $this->code); // Check condition for displaying birthdate field
+
+ if ($payment_implementation_type == 'error') {
+ $messageStack->add_session('checkout_payment', $error . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ if (!empty($post) && (empty($post[$this->code.'_bank_account_holder']) || empty($post[$this->code.'_bank_iban']))) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_VALID_ACCOUNT_CREDENTIALS_ERROR . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ $birthdate = $post[$this->code.'_birthdate'];
+ if (empty($order->billing['company']) && NovalnetUtil::validateAge($birthdate, $this->code)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_AGE_ERROR . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ if ($post['novalnet_instalment_sepa_period'] == '0') {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_INSTALMENT_CHOOSE_PLAN . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ $post = $_REQUEST;
+ if (isset($_SESSION['novalnet'][$this->code]['order_amount'])) {
+ $_SESSION['novalnet'][$this->code] = array_merge($_SESSION['novalnet'][$this->code], $post);
+ }
+ return false;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ $response = NovalnetUtil::doPaymentCurlCall('https://payport.novalnet.de/paygate.jsp', $request, $this->code);
+ parse_str($response, $payment_response);
+
+ if ($payment_response['status'] == 100) {
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ $order_status = $payment_response['tid_status'] == 75 ? MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PENDING_ORDER_STATUS_ID : ($payment_response['tid_status'] == 99 ? MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID : MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ORDER_STATUS_ID);
+
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ // Set order status
+ if ($payment_response['tid_status'] == 75)
+ $transaction_comments .= MODULE_PAYMENT_NOVALNET_GUARANTEED_SEPA_MESSAGE;
+
+ $order->info['comments'] .= $transaction_comments . NovalnetUtil::instalmentComments($payment_response, $this->code);
+ $instalment_details = array();
+ if ($future_instalment = $payment_response['future_instalment_dates']) {
+ $future_instalments = explode('|', $future_instalment);
+ foreach ($future_instalments as $future_instalment) {
+ $cycle = strtok($future_instalment, "-");
+ $cycle_date = explode('-', $future_instalment, 2);
+ $instalment_details[$cycle] = [
+ 'amount' => $payment_response['instalment_cycle_amount'],
+ 'nextCycle' => $cycle_date[1],
+ 'paidDate' => ($cycle == 1) ? date('Y-m-d') : '',
+ 'status' => ($cycle == 1) ? 'Paid' : 'Pending',
+ 'reference' => ($cycle == 1) ? $payment_response['tid'] : ''
+ ];
+ }
+ }
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($request), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $request['amount'],
+ 'comments' => $order->info['comments'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount'],
+ 'instalment_details' => serialize($instalment_details)
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($payment_response) . '', 'error');
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_instalment_sepa.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD', 'Capture', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_DESC."', '6', '2', 'zen_cfg_select_option(array(\'Capture\', \'Authorize\'), ', now())");
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_LIMIT_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PERIOD_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PERIOD', '', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PERIOD_DESC."', '6', '4', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CYCLE_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CYCLE', '', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CYCLE_DESC."', '6', '5', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_MIN_AMOUNT_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_MIN_AMOUNT_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_MIN_AMOUNT_LIMIT_DESC."', '6', '6', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CUSTOMER_INFO_DESC."', '6', '7', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_SORT_ORDER', '14', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_SORT_ORDER_DESC."', '6', '8', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PENDING_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PENDING_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PENDING_ORDER_STATUS_ID_DESC."', '6', '9', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ORDER_STATUS_ID_DESC."', '6', '10', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ZONE_DESC."', '6', '11', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ $lang = ($_SESSION['language'] == 'english') ? 'en' : 'de';
+ echo '';
+ if( isset( $_GET['action'] ) && $_GET['action'] == 'edit' ) {
+ echo '';
+ }
+ return array( 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ONHOLD_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PERIOD',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CYCLE',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_MIN_AMOUNT_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_PENDING_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_ZONE');
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_INSTALMENT_SEPA_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_invoice.php b/includes/modules/payment/novalnet_invoice.php
new file mode 100644
index 0000000..a418246
--- /dev/null
+++ b/includes/modules/payment/novalnet_invoice.php
@@ -0,0 +1,266 @@
+code = 'novalnet_invoice';
+ $this->title = MODULE_PAYMENT_NOVALNET_INVOICE_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_INVOICE_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_INVOICE_TEXT_DESCRIPTION;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_INVOICE_STATUS == 'True') ? true : false);
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_INVOICE_SORT_ORDER;
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_INVOICE_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_INVOICE_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) { // Validate the Novalnet merchant details
+ return false;
+ }
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_INVOICE_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title . ' '. MODULE_PAYMENT_NOVALNET_INVOICE_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_INVOICE_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : ''). $notification;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+
+ return false;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ $response = NovalnetUtil::doPaymentCurlCall('https://payport.novalnet.de/paygate.jsp', $request, $this->code);
+ parse_str($response, $payment_response);
+
+ if ($payment_response['status'] == 100) {
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_INVOICE_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ $order_status = $payment_response['tid_status'] == '100' ? MODULE_PAYMENT_NOVALNET_INVOICE_ORDER_STATUS_ID : MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID;
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ // Get Invoice / Prepayment Comments and Bank details
+ $transaction_comments .= NovalnetUtil::formInvoicePrepaymentComments($payment_response);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($request), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $request['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'comments' => $order->info['comments'],
+ 'total_amount' => '0',
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($payment_response) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $db, $insert_id;
+
+ // Get Prepayment payment reference comments
+ $reference_comments = NovalnetUtil::novalnetReferenceComments($insert_id, $_SESSION['novalnet'][$this->code], $this->code);
+
+ $comments = $_SESSION['novalnet'][$this->code]['comments'].$reference_comments;
+
+ $db->Execute("update ".TABLE_ORDERS_STATUS_HISTORY." set comments = '".$comments."' where orders_id = '".$insert_id."'");
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_INVOICE_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_invoice.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INVOICE_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_INVOICE_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_INVOICE_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INVOICE_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_INVOICE_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_INVOICE_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INVOICE_DUE_DATE_TITLE."', 'MODULE_PAYMENT_NOVALNET_INVOICE_DUE_DATE', '', '".MODULE_PAYMENT_NOVALNET_INVOICE_DUE_DATE_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_TITLE."', 'MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD', 'Capture', '".MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_DESC."', '6', '3', 'zen_cfg_select_option(array(\'Capture\', \'Authorize\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_LIMIT_DESC."', '6', '4', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INVOICE_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_INVOICE_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_INVOICE_CUSTOMER_INFO_DESC."', '6', '5', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_INVOICE_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_INVOICE_SORT_ORDER', '3', '".MODULE_PAYMENT_NOVALNET_INVOICE_SORT_ORDER_DESC."', '6', '6', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INVOICE_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_INVOICE_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_INVOICE_ORDER_STATUS_ID_DESC."', '6', '7', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INVOICE_CALLBACK_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_INVOICE_CALLBACK_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_INVOICE_CALLBACK_STATUS_ID_DESC."', '6', '8', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_INVOICE_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_INVOICE_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_INVOICE_ZONE_DESC."', '6', '9', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_INVOICE_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_INVOICE_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD',
+ 'MODULE_PAYMENT_NOVALNET_INVOICE_ONHOLD_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_INVOICE_DUE_DATE',
+ 'MODULE_PAYMENT_NOVALNET_INVOICE_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_INVOICE_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_INVOICE_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_INVOICE_CALLBACK_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_INVOICE_ZONE');
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_INVOICE_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_postfinance.php b/includes/modules/payment/novalnet_postfinance.php
new file mode 100644
index 0000000..8ad8ec6
--- /dev/null
+++ b/includes/modules/payment/novalnet_postfinance.php
@@ -0,0 +1,271 @@
+code = 'novalnet_postfinance';
+ $this->title = MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_POSTFINANCE_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEXT_DESCRIPTION;
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_POSTFINANCE_SORT_ORDER;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS == 'True') ? true : false);
+ $this->form_action_url = 'https://payport.novalnet.de/postfinance';
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_POSTFINANCE_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_POSTFINANCE_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) {
+ return false;
+ }
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_POSTFINANCE_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_POSTFINANCE_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '' ).$notification;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ global $order;
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+
+ NovalnetUtil::generateEncodeValue($request);
+
+ $process_button_string = '';
+ foreach ($request as $k => $v) {
+ $process_button_string .= zen_draw_hidden_field($k, $v);
+ }
+
+ $process_button_string .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
+
+ return $process_button_string;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $post = $_REQUEST;
+
+ if (isset($post['status']) && $post['status'] == 100) {
+
+ // Hash Validation failed
+ if (NovalnetUtil::validateHashResponse($post)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ // Decoding Novalnet server response
+ $payment_response = NovalnetUtil::decodePaygateResponse($post);
+
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ // Check order status
+ $order_status = (isset($post['tid_status']) && $post['tid_status'] == '83') ? MODULE_PAYMENT_NOVALNET_POSTFINANCE_PENDING_ORDER_STATUS_ID : MODULE_PAYMENT_NOVALNET_POSTFINANCE_ORDER_STATUS_ID;
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($payment_response), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $payment_response['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($post) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_postfinance.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CUSTOMER_INFO_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_SORT_ORDER', '17', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_SORT_ORDER_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_PENDING_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_PENDING_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_PENDING_ORDER_STATUS_ID_DESC."', '6', '5', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_ORDER_STATUS_ID_DESC."', '6', '4', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_ZONE_DESC."', '6', '6', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_PENDING_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_POSTFINANCE_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_postfinance_card.php b/includes/modules/payment/novalnet_postfinance_card.php
new file mode 100644
index 0000000..0f8359f
--- /dev/null
+++ b/includes/modules/payment/novalnet_postfinance_card.php
@@ -0,0 +1,273 @@
+code = 'novalnet_postfinance_card';
+ $this->title = MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEXT_DESCRIPTION;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS == 'True') ? true : false);
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_SORT_ORDER;
+ $this->form_action_url = 'https://payport.novalnet.de/postfinance';
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) {
+ return false;
+ }
+
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '') .$notification;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ global $order;
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+
+ NovalnetUtil::generateEncodeValue($request);
+
+ $process_button_string = '';
+ foreach ($request as $k => $v) {
+ $process_button_string .= zen_draw_hidden_field($k, $v);
+ }
+
+ $process_button_string .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
+
+ return $process_button_string;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $post = $_REQUEST;
+
+ if (isset($post['status']) && $post['status'] == 100) {
+
+ // Hash Validation failed
+ if (NovalnetUtil::validateHashResponse($post)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ // Decoding Novalnet server response
+ $payment_response = NovalnetUtil::decodePaygateResponse($post);
+
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ // Check order status
+ $order_status = (isset($post['tid_status']) && $post['tid_status'] == '83') ? MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PENDING_ORDER_STATUS_ID : MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ORDER_STATUS_ID;
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($payment_response), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $payment_response['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($post) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_postfinance_card.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_CUSTOMER_INFO_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_SORT_ORDER', '16', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_SORT_ORDER_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PENDING_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PENDING_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PENDING_ORDER_STATUS_ID_DESC."', '6', '5', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ORDER_STATUS_ID_DESC."', '6', '4', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ZONE_DESC."', '6', '6', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_PENDING_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_POSTFINANCE_CARD_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_prepayment.php b/includes/modules/payment/novalnet_prepayment.php
new file mode 100644
index 0000000..929055f
--- /dev/null
+++ b/includes/modules/payment/novalnet_prepayment.php
@@ -0,0 +1,262 @@
+code = 'novalnet_prepayment';
+ $this->title = MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_PREPAYMENT_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEXT_DESCRIPTION;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS == 'True') ? true : false);
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_PREPAYMENT_SORT_ORDER;
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_PREPAYMENT_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_PREPAYMENT_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) {
+ return false;
+ }
+
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_PREPAYMENT_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_PREPAYMENT_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '') . $notification;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+
+ return false;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ $response = NovalnetUtil::doPaymentCurlCall('https://payport.novalnet.de/paygate.jsp', $request, $this->code);
+ parse_str($response, $payment_response);
+
+ if (isset($payment_response['status']) && $payment_response['status'] == 100) {
+
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ $order_status = $payment_response['tid_status'] == '100' ? MODULE_PAYMENT_NOVALNET_PREPAYMENT_ORDER_STATUS_ID : MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID;
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ // Get Invoice / Prepayment Comments and Bank details
+ $transaction_comments .= NovalnetUtil::formInvoicePrepaymentComments($payment_response);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($request), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $request['amount'],
+ 'gateway_response' => $payment_response,
+ 'comments' => $order->info['comments'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => '0'
+ ));
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($payment_response) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $db, $insert_id;
+
+ // Get Prepayment payment reference comments
+ $reference_comments = NovalnetUtil::novalnetReferenceComments($insert_id, $_SESSION['novalnet'][$this->code], $this->code);
+
+ $comments = $_SESSION['novalnet'][$this->code]['comments'].$reference_comments;
+
+ $db->Execute("update ".TABLE_ORDERS_STATUS_HISTORY." set comments = '".$comments."' where orders_id = '".$insert_id."'");
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_prepayment.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_PREPAYMENT_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_PREPAYMENT_CUSTOMER_INFO_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_PREPAYMENT_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_SORT_ORDER', '4', '".MODULE_PAYMENT_NOVALNET_PREPAYMENT_SORT_ORDER_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PREPAYMENT_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_PREPAYMENT_ORDER_STATUS_DESC."', '6', '4', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PREPAYMENT_CALLBACK_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_CALLBACK_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_PREPAYMENT_CALLBACK_STATUS_ID_DESC."', '6', '5', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PREPAYMENT_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_PREPAYMENT_ZONE_DESC."', '6', '6', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_CALLBACK_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_PREPAYMENT_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_PREPAYMENT_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_przelewy24.php b/includes/modules/payment/novalnet_przelewy24.php
new file mode 100644
index 0000000..716a2ba
--- /dev/null
+++ b/includes/modules/payment/novalnet_przelewy24.php
@@ -0,0 +1,274 @@
+code = 'novalnet_przelewy24';
+ $this->title = MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_PRZELEWY24_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEXT_DESCRIPTION;
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_PRZELEWY24_SORT_ORDER;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS == 'True') ? true : false);
+ $this->form_action_url = 'https://payport.novalnet.de/globalbank_transfer';
+
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_PRZELEWY24_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_PRZELEWY24_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) {
+ return false;
+ }
+
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_PRZELEWY24_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_PRZELEWY24_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '').$notification;
+
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ return false;
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ global $order;
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+
+ NovalnetUtil::generateEncodeValue($request);
+
+ $process_button_string = '';
+ foreach ($request as $k => $v) {
+ $process_button_string .= zen_draw_hidden_field($k, $v);
+ }
+ $process_button_string .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
+
+ return $process_button_string;
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $post = $_REQUEST;
+
+ if (isset($post['status']) && $post['status'] == 100) {
+
+ // Hash Validation failed
+ if (NovalnetUtil::validateHashResponse($post)) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_TRANSACTION_REDIRECT_ERROR . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+
+ // Decoding Novalnet server response
+ $payment_response = NovalnetUtil::decodePaygateResponse($post);
+
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ // Check order status
+ $order_status = (isset($post['tid_status']) && $post['tid_status'] == '86') ? MODULE_PAYMENT_NOVALNET_PRZELEWY24_PENDING_ORDER_STATUS_ID : MODULE_PAYMENT_NOVALNET_PRZELEWY24_ORDER_STATUS_ID;
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($payment_response), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $payment_response['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => ($payment_response['tid_status'] == '86') ? '0' : $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($post) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_przelewy24.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_PRZELEWY24_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_PRZELEWY24_CUSTOMER_INFO_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_PRZELEWY24_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_SORT_ORDER', '11', '".MODULE_PAYMENT_NOVALNET_PRZELEWY24_SORT_ORDER_DESC."', '6', '3', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PRZELEWY24_PENDING_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_PENDING_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_PRZELEWY24_PENDING_ORDER_STATUS_ID_DESC."', '6', '5', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PRZELEWY24_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_PRZELEWY24_ORDER_STATUS_ID_DESC."', '6', '4', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_PRZELEWY24_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_PRZELEWY24_ZONE_DESC."', '6', '6', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_PENDING_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_PRZELEWY24_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_PRZELEWY24_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/includes/modules/payment/novalnet_sepa.php b/includes/modules/payment/novalnet_sepa.php
new file mode 100644
index 0000000..65273bb
--- /dev/null
+++ b/includes/modules/payment/novalnet_sepa.php
@@ -0,0 +1,277 @@
+code = 'novalnet_sepa';
+ $this->title = MODULE_PAYMENT_NOVALNET_SEPA_TEXT_TITLE;
+ $this->public_title = MODULE_PAYMENT_NOVALNET_SEPA_PUBLIC_TITLE;
+ $this->description = MODULE_PAYMENT_NOVALNET_SEPA_TEXT_DESCRIPTION;
+ $this->enabled = ((MODULE_PAYMENT_NOVALNET_SEPA_STATUS == 'True') ? true : false);
+ $this->sort_order = MODULE_PAYMENT_NOVALNET_SEPA_SORT_ORDER;
+ if (is_object($order))
+ $this->update_status();
+ }
+ /**
+ * Function : update_status()
+ *
+ */
+ function update_status() {
+ global $order, $db;
+
+ if (($this->enabled == true) && ((int) MODULE_PAYMENT_NOVALNET_SEPA_ZONE > 0)) {
+ $check_flag = false;
+ $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NOVALNET_SEPA_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
+ while (!$check->EOF) {
+ if ($check->fields['zone_id'] < 1) {
+ $check_flag = true;
+ break;
+ } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
+ $check_flag = true;
+ break;
+ }
+ $check->MoveNext();
+ }
+ if ($check_flag == false) {
+ $this->enabled = false;
+ }
+ }
+ }
+ /**
+ * Function : javascript_validation()
+ *
+ */
+ function javascript_validation() {
+ return false;
+ }
+ /**
+ * Function : selection()
+ *
+ */
+ function selection() {
+ global $order;
+
+ if (!NovalnetUtil::checkMerchantConfiguration() || !$this->validateAdminConfiguration() ) {
+ return false;
+ }
+
+ // Display payment description and notification of the buyer message
+ $notification = trim(strip_tags(MODULE_PAYMENT_NOVALNET_SEPA_CUSTOMER_INFO));
+ $notification = !empty($notification) ? $notification.'
' :'';
+
+ $sepa_fields = '';
+
+ $selection['id'] = $this->code;
+ $selection['module'] = $this->public_title.MODULE_PAYMENT_NOVALNET_SEPA_LOGO;
+ $selection['module'] .= $this->description;
+ $selection['module'] .= ((MODULE_PAYMENT_NOVALNET_SEPA_TEST_MODE == 'True') ? MODULE_PAYMENT_NOVALNET_TEST_MODE_MSG : '') . $sepa_fields . $notification;
+ $fieldArray = array();
+ $fieldArray[] = array('title' => MODULE_PAYMENT_NOVALNET_ACCOUNT_HOLDER,
+ 'field' => zen_draw_input_field($this->code.'_bank_account_holder', $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'id="' . $this->code . '_bank_account_holder" placeholder="'.MODULE_PAYMENT_NOVALNET_ACCOUNT_HOLDER.'" AUTOCOMPLETE="OFF" onkeypress="return allowName(event);"'),
+ 'tag' => $this->code . '_bank_account_holder');
+ $fieldArray[] = array('title' => MODULE_PAYMENT_NOVALNET_IBAN,
+ 'field' => zen_draw_input_field($this->code.'_bank_iban', '', 'id="' . $this->code . '_bank_iban" placeholder="'.MODULE_PAYMENT_NOVALNET_IBAN.'" AUTOCOMPLETE="OFF" onkeypress="return allowAlphaNumeric(event);"'),
+ 'tag' => $this->code . '_bank_iban');
+ $fieldArray[] = array('title' => '', 'field' => ''.
+ MODULE_PAYMENT_NOVALNET_SEPA_FORM_MANDATE_CONFIRM_TEXT.' |
');
+ $selection['fields'] = $fieldArray;
+ return $selection;
+ }
+ /**
+ * Function : pre_confirmation_check()
+ *
+ */
+ function pre_confirmation_check() {
+ global $messageStack;
+ $post = $_REQUEST;
+
+ if (empty($post[$this->code.'_bank_iban']) || empty($post[$this->code.'_bank_account_holder'])) {
+ $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NOVALNET_VALID_ACCOUNT_CREDENTIALS_ERROR . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+ /**
+ * Function : confirmation()
+ *
+ */
+ function confirmation() {
+ global $order;
+ $_SESSION['novalnet'][$this->code]['order_amount'] = NovalnetUtil::getPaymentAmount((array)$order, $this->code);
+ return false;
+ }
+ /**
+ * Function : process_button()
+ *
+ */
+ function process_button() {
+ $post = $_REQUEST;
+ if (isset($_SESSION['novalnet'][$this->code]['order_amount'])) {
+ $_SESSION['novalnet'][$this->code] = array_merge($_SESSION['novalnet'][$this->code], $post);
+ }
+ }
+ /**
+ * Function : before_process()
+ *
+ */
+ function before_process() {
+ global $order, $messageStack;
+
+ $urlparam = array_merge((array)$order, $_SESSION['novalnet'][$this->code]);
+ $request = NovalnetUtil::getCommonRequestParams($urlparam, $this->code);
+ $response = NovalnetUtil::doPaymentCurlCall('https://payport.novalnet.de/paygate.jsp', $request, $this->code);
+ parse_str($response, $payment_response);
+ if ($payment_response['status'] == 100) {
+ $test_mode = (int)(!empty($payment_response['test_mode']) || MODULE_PAYMENT_NOVALNET_SEPA_TEST_MODE == 'True');
+
+ // Form transaction comments
+ $transaction_comments = NovalnetUtil::formPaymentComments($payment_response['tid'], $test_mode);
+
+ $order_status = ($payment_response['tid_status'] == 99) ? MODULE_PAYMENT_NOVALNET_ONHOLD_ORDER_COMPLETE_STATUS_ID : MODULE_PAYMENT_NOVALNET_SEPA_ORDER_STATUS_ID;
+
+ // Set order status
+ $order->info['order_status'] = NovalnetUtil::checkDefaultOrderStatus($order_status);
+
+ $order->info['comments'] .= $transaction_comments;
+
+ $_SESSION['novalnet'][$this->code] = array_merge(NovalnetUtil::paymentInitialParams($request), array(
+ 'tid' => $payment_response['tid'],
+ 'amount' => $request['amount'],
+ 'gateway_status' => $payment_response['tid_status'],
+ 'total_amount' => $_SESSION['novalnet'][$this->code]['order_amount']
+ ));
+
+ } else {
+ $messageStack->add_session('checkout_payment', NovalnetUtil::getTransactionMessage($payment_response) . '', 'error');
+ // Novalnet transaction status got failure displaying error message
+ zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
+ }
+ }
+
+ /**
+ * Function : after_process()
+ *
+ */
+ function after_process() {
+ global $insert_id;
+
+ // Update payment process based on the response.
+ NovalnetUtil::logInitialTransaction(array(
+ 'payment' => $this->code,
+ 'order_no' => $insert_id
+ ));
+
+ // Sending post back call to Novalnet server
+ NovalnetUtil::postBackCall(array( 'payment' => $this->code, 'order_no' => $insert_id ));
+
+ return false;
+ }
+ /**
+ * Function : check()
+ *
+ */
+ function check() {
+ global $db;
+ if (!isset($this->_check)) {
+ $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_NOVALNET_SEPA_STATUS'");
+ $this->_check = $check_query->RecordCount();
+ }
+ return $this->_check;
+ }
+
+ /**
+ * Function : install()
+ *
+ */
+ function install() {
+ global $db;
+
+ include(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/novalnet_sepa.php');
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_SEPA_STATUS_TITLE."', 'MODULE_PAYMENT_NOVALNET_SEPA_STATUS', 'False', '".MODULE_PAYMENT_NOVALNET_SEPA_STATUS_DESC."', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_SEPA_TEST_MODE_TITLE."', 'MODULE_PAYMENT_NOVALNET_SEPA_TEST_MODE', 'False', '".MODULE_PAYMENT_NOVALNET_SEPA_TEST_MODE_DESC."', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_SEPA_PAYMENT_DUE_DATE_TITLE."', 'MODULE_PAYMENT_NOVALNET_SEPA_PAYMENT_DUE_DATE', '', '".MODULE_PAYMENT_NOVALNET_SEPA_PAYMENT_DUE_DATE_DESC."', '6', '2', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_TITLE."', 'MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD', 'Capture', '".MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_DESC."', '6', '3', 'zen_cfg_select_option(array(\'Capture\', \'Authorize\'), ', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_LIMIT_TITLE."', 'MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_LIMIT', '', '".MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_LIMIT_DESC."', '6', '4', now())");
+
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_SEPA_CUSTOMER_INFO_TITLE."', 'MODULE_PAYMENT_NOVALNET_SEPA_CUSTOMER_INFO', '', '".MODULE_PAYMENT_NOVALNET_SEPA_CUSTOMER_INFO_DESC."', '6', '5', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".MODULE_PAYMENT_NOVALNET_SEPA_SORT_ORDER_TITLE."', 'MODULE_PAYMENT_NOVALNET_SEPA_SORT_ORDER', '1', '".MODULE_PAYMENT_NOVALNET_SEPA_SORT_ORDER_DESC."', '6', '6', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_SEPA_ORDER_STATUS_ID_TITLE."', 'MODULE_PAYMENT_NOVALNET_SEPA_ORDER_STATUS_ID', '0', '".MODULE_PAYMENT_NOVALNET_SEPA_ORDER_STATUS_ID_DESC."', '6', '7', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
+
+ $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('".MODULE_PAYMENT_NOVALNET_SEPA_ZONE_TITLE."', 'MODULE_PAYMENT_NOVALNET_SEPA_ZONE', '0', '".MODULE_PAYMENT_NOVALNET_SEPA_ZONE_DESC."', '6', '8', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
+ }
+
+ /**
+ * Function : remove()
+ *
+ */
+ function remove() {
+ global $db;
+ $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ /**
+ * Function : keys()
+ *
+ * @return array
+ */
+ function keys() {
+ echo '';
+ return array( 'MODULE_PAYMENT_NOVALNET_SEPA_STATUS',
+ 'MODULE_PAYMENT_NOVALNET_SEPA_TEST_MODE',
+ 'MODULE_PAYMENT_NOVALNET_SEPA_PAYMENT_DUE_DATE',
+ 'MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD',
+ 'MODULE_PAYMENT_NOVALNET_SEPA_ONHOLD_LIMIT',
+ 'MODULE_PAYMENT_NOVALNET_SEPA_CUSTOMER_INFO',
+ 'MODULE_PAYMENT_NOVALNET_SEPA_SORT_ORDER',
+ 'MODULE_PAYMENT_NOVALNET_SEPA_ORDER_STATUS_ID',
+ 'MODULE_PAYMENT_NOVALNET_SEPA_ZONE'
+ );
+ }
+
+ /**
+ * Validate admin configuration
+ *
+ * @return boolean
+ */
+ function validateAdminConfiguration()
+ {
+ if (MODULE_PAYMENT_NOVALNET_SEPA_STATUS == 'True') {
+ if (strpos(MODULE_PAYMENT_INSTALLED, 'novalnet_config.php') === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+?>
diff --git a/novalnet_autoconfig.php b/novalnet_autoconfig.php
new file mode 100644
index 0000000..56186e2
--- /dev/null
+++ b/novalnet_autoconfig.php
@@ -0,0 +1,68 @@
+ $request['hash'],
+ 'lang' => $request['lang']
+ );
+
+ $response = json_decode(NovalnetUtil::doPaymentCurlCall('https://payport.novalnet.de/autoconfig', $data, 'novalnet_autoconfig'));
+
+ $json_error = json_last_error();
+
+ if (empty($json_error)) {
+ if ($response->status == '100') {
+ $merchant_details = array(
+ 'vendor_id' => $response->vendor,
+ 'auth_code' => $response->auth_code,
+ 'product_id' => $response->product,
+ 'access_key' => $response->access_key,
+ 'test_mode' => $response->test_mode,
+ 'tariff' => $response->tariff,
+ );
+ echo json_encode($merchant_details);
+ exit();
+ } else {
+ if ($response->status == '106') {
+ echo sprintf(MODULE_PAYMENT_NOVALNET_CONFIG_MESSAGE, $_SERVER['SERVER_ADDR']);
+ $result = sprintf(MODULE_PAYMENT_NOVALNET_CONFIG_MESSAGE, $_SERVER['SERVER_ADDR']);
+ } else {
+ $result = !empty($response->config_result) ? $response->config_result : $response->status_desc;
+ }
+ }
+ echo json_encode(array('status_desc' => $result));
+ exit();
+ }
+ }
+ echo json_encode(array('status_desc' => 'empty'));
+ exit();
+ }
+}
+new AutoConfig();