diff --git a/assets/css/novalnet-checkout.css b/assets/css/novalnet-checkout.css new file mode 100755 index 0000000..3787c58 --- /dev/null +++ b/assets/css/novalnet-checkout.css @@ -0,0 +1,22 @@ +.novalnet_loader { + position: fixed; + left: 0px; + top: 0px; + width: 100%; + height: 100%; + z-index: 9999; + background: url('../images/nn_loader.gif') 50% 50% no-repeat; +} + +.nn_cc_overlay { + position: fixed; + width: 100% ! important; + height: 100% ! important; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0,0,0,0.5); + z-index: 9999; + cursor: pointer; +} diff --git a/assets/images/nn_loader.gif b/assets/images/nn_loader.gif new file mode 100755 index 0000000..cf70c2e Binary files /dev/null and b/assets/images/nn_loader.gif differ diff --git a/assets/images/novalnet.png b/assets/images/novalnet.png new file mode 100755 index 0000000..6e9b8b9 Binary files /dev/null and b/assets/images/novalnet.png differ diff --git a/assets/images/novalnet_cashpayment.png b/assets/images/novalnet_cashpayment.png new file mode 100755 index 0000000..6319569 Binary files /dev/null and b/assets/images/novalnet_cashpayment.png differ diff --git a/assets/images/novalnet_cc_amex.png b/assets/images/novalnet_cc_amex.png new file mode 100755 index 0000000..cfbbba5 Binary files /dev/null and b/assets/images/novalnet_cc_amex.png differ diff --git a/assets/images/novalnet_cc_cartasi.png b/assets/images/novalnet_cc_cartasi.png new file mode 100755 index 0000000..8b2cc12 Binary files /dev/null and b/assets/images/novalnet_cc_cartasi.png differ diff --git a/assets/images/novalnet_cc_carte-bleue.png b/assets/images/novalnet_cc_carte-bleue.png new file mode 100755 index 0000000..ffe67f4 Binary files /dev/null and b/assets/images/novalnet_cc_carte-bleue.png differ diff --git a/assets/images/novalnet_cc_diners.png b/assets/images/novalnet_cc_diners.png new file mode 100755 index 0000000..d9d4810 Binary files /dev/null and b/assets/images/novalnet_cc_diners.png differ diff --git a/assets/images/novalnet_cc_discover.png b/assets/images/novalnet_cc_discover.png new file mode 100755 index 0000000..6db9e3c Binary files /dev/null and b/assets/images/novalnet_cc_discover.png differ diff --git a/assets/images/novalnet_cc_jcb.png b/assets/images/novalnet_cc_jcb.png new file mode 100755 index 0000000..0064100 Binary files /dev/null and b/assets/images/novalnet_cc_jcb.png differ diff --git a/assets/images/novalnet_cc_maestro.png b/assets/images/novalnet_cc_maestro.png new file mode 100755 index 0000000..26c6386 Binary files /dev/null and b/assets/images/novalnet_cc_maestro.png differ diff --git a/assets/images/novalnet_cc_mastercard.png b/assets/images/novalnet_cc_mastercard.png new file mode 100755 index 0000000..fed2b8e Binary files /dev/null and b/assets/images/novalnet_cc_mastercard.png differ diff --git a/assets/images/novalnet_cc_unionpay.png b/assets/images/novalnet_cc_unionpay.png new file mode 100755 index 0000000..5b8c37c Binary files /dev/null and b/assets/images/novalnet_cc_unionpay.png differ diff --git a/assets/images/novalnet_cc_visa.png b/assets/images/novalnet_cc_visa.png new file mode 100755 index 0000000..87b9709 Binary files /dev/null and b/assets/images/novalnet_cc_visa.png differ diff --git a/assets/images/novalnet_eps.png b/assets/images/novalnet_eps.png new file mode 100755 index 0000000..02875ae Binary files /dev/null and b/assets/images/novalnet_eps.png differ diff --git a/assets/images/novalnet_giropay.png b/assets/images/novalnet_giropay.png new file mode 100755 index 0000000..5bcd509 Binary files /dev/null and b/assets/images/novalnet_giropay.png differ diff --git a/assets/images/novalnet_ideal.png b/assets/images/novalnet_ideal.png new file mode 100755 index 0000000..9d08251 Binary files /dev/null and b/assets/images/novalnet_ideal.png differ diff --git a/assets/images/novalnet_instantbank.png b/assets/images/novalnet_instantbank.png new file mode 100755 index 0000000..d36b633 Binary files /dev/null and b/assets/images/novalnet_instantbank.png differ diff --git a/assets/images/novalnet_invoice.png b/assets/images/novalnet_invoice.png new file mode 100755 index 0000000..1898ed4 Binary files /dev/null and b/assets/images/novalnet_invoice.png differ diff --git a/assets/images/novalnet_paypal.png b/assets/images/novalnet_paypal.png new file mode 100755 index 0000000..9defac5 Binary files /dev/null and b/assets/images/novalnet_paypal.png differ diff --git a/assets/images/novalnet_prepayment.png b/assets/images/novalnet_prepayment.png new file mode 100755 index 0000000..9104281 Binary files /dev/null and b/assets/images/novalnet_prepayment.png differ diff --git a/assets/images/novalnet_przelewy24.png b/assets/images/novalnet_przelewy24.png new file mode 100755 index 0000000..331d7b3 Binary files /dev/null and b/assets/images/novalnet_przelewy24.png differ diff --git a/assets/images/novalnet_sepa.png b/assets/images/novalnet_sepa.png new file mode 100755 index 0000000..7daf3ca Binary files /dev/null and b/assets/images/novalnet_sepa.png differ diff --git a/assets/js/novalnet-admin.js b/assets/js/novalnet-admin.js new file mode 100755 index 0000000..76a8485 --- /dev/null +++ b/assets/js/novalnet-admin.js @@ -0,0 +1,254 @@ +/** + * Novalnet Admin action. + * + * @category Novalnet Admin action + * @package edd-novalnet-gateway + * @copyright Novalnet (https://www.novalnet.de) + * @license https://www.novalnet.de/payment-plugins/kostenlos/lizenz + */ + +var novalnet_admin; + +jQuery( document ).ready( + function ($) { + + if ( $( 'input[name="edd_settings[novalnet_public_key]"]' ).val() === '' || $( 'input[name="edd_settings[novalnet_tariff_id]"]' ).val() === '' || $( 'input[name="edd_settings[novalnet_tariff_id]"]' ).val() === undefined ) { + $('.notice-success').hide( ); + } + + $( '.guarantee_requirements' ).css( 'width','550%' ); + hide_vendor_details(); + jQuery( 'input[name="edd_settings[novalnet_public_key]"]' ).on( + 'change', + function() { + if ( '' !== jQuery.trim( jQuery( 'input[name="edd_settings[novalnet_public_key]"]' ).val() ) ) { + fill_novalnet_details(); + } else { + null_basic_params(); + } + } + ); + + if ( undefined != $( 'input[name="edd_settings[novalnet_public_key]"]' ).val() && '' != $( 'input[name="edd_settings[novalnet_public_key]"]' ).val() ) { + fill_novalnet_details(); + hide_vendor_details(); + } else { + null_basic_params(); + } + + // Onhold Fields Configurations. + onholdConfig(); + + // Guarantee Fields Configurations. + guaranteeConfig(); + + if ( '0' == jQuery( 'select[id="edd_settings[novalnet_subs_enable_option]"]' ).val() ) { + jQuery( '.novalnet_subs_config' ).closest( 'tr' ).hide(); + } else { + jQuery( '.novalnet_subs_config' ).closest( 'tr' ).show(); + jQuery('#edd_settings_novalnet_subs_payments__chosen').css('width', '400px'); + } + + jQuery( 'select[id="edd_settings[novalnet_subs_enable_option]"]' ).on( 'change', + function(){ + if ( '0' == jQuery( 'select[id="edd_settings[novalnet_subs_enable_option]"]' ).val() ) { + jQuery( '.novalnet_subs_config' ).closest( 'tr' ).hide(); + } else { + jQuery( '.novalnet_subs_config' ).closest( 'tr' ).show(); + jQuery('#edd_settings_novalnet_subs_payments__chosen').css('width', '400px'); + } + } + ); + } +); + +/* Null config values */ +function null_basic_params() { + jQuery( 'input[name="edd_settings[novalnet_merchant_id]"], input[name="edd_settings[novalnet_auth_code]"], input[name="edd_settings[novalnet_product_id]"], input[name="edd_settings[novalnet_access_key]"], input[name="edd_settings[novalnet_public_key]"], input[name="edd_settings[novalnet_client_key]"]' ).val( '' ); + jQuery( 'select[name="edd_settings[novalnet_tariff_id]"]' ).find( 'option' ).remove(); + jQuery( 'select[name="edd_settings[novalnet_tariff_id]"]' ).append( + jQuery( + '', + { + value: '', + text : novalnet_admin.select_text, + } + ) + ); + jQuery( 'select[name="edd_settings[novalnet_subs_tariff_id]"]' ).find( 'option' ).remove(); + jQuery( 'select[name="edd_settings[novalnet_subs_tariff_id]"]' ).append( + jQuery( + '', + { + value: '', + text : novalnet_admin.select_text, + } + ) + ); + +} + + + +/* Process to fill the vendor details */ +function fill_novalnet_details() { + var data = { + 'novalnet_api_key': jQuery.trim( jQuery( 'input[name="edd_settings[novalnet_public_key]"]' ).val() ), + 'action': 'get_novalnet_apiconfig', + }; + + /*global ajaxur */ + ajax_call( data, ajaxurl ); +} + + + /* hide the vendor details */ +function hide_vendor_details () { + jQuery( 'input[name="edd_settings[novalnet_merchant_id]"], input[name="edd_settings[novalnet_auth_code]"], input[name="edd_settings[novalnet_product_id]"], input[name="edd_settings[novalnet_access_key]"],input[name="edd_settings[novalnet_client_key]"]' ).prop( 'readonly', true ); + jQuery( 'input[name="edd_settings[novalnet_merchant_id]"]' ).closest( 'tr' ).css( 'display','none' ); + jQuery( 'input[name="edd_settings[novalnet_auth_code]"]' ).closest( 'tr' ).css( 'display','none' ); + jQuery( 'input[name="edd_settings[novalnet_product_id]"]' ).closest( 'tr' ).css( 'display','none' ); + jQuery( 'input[name="edd_settings[novalnet_access_key]"]' ).closest( 'tr' ).css( 'display','none' ); + jQuery( 'input[name="edd_settings[novalnet_client_key]"]' ).closest( 'tr' ).css( 'display','none' ); +} + + +function ajax_call ( url_param, novalnet_server_url ) { + + // Checking for cross domain request. + if ('XDomainRequest' in window && null !== window.XDomainRequest ) { + var request_data = jQuery.param( url_param ); + var xdr = new XDomainRequest(); + xdr.open( 'POST' , novalnet_server_url ); + xdr.onload = function () { + config_hash_response( this.responseText ); + }; + xdr.send( request_data ); + } else { + jQuery.ajax( + { + type: 'POST', + url: novalnet_server_url, + data: url_param, + success: function( response ) { + config_hash_response( response ); + } + } + ); + } +} + +/* Vendor hash process */ +function config_hash_response ( data ) { + + jQuery( '.blockUI' ).remove(); + + data = data.data; + + if ( undefined !== data.error && '' !== data.error ) { + + alert( data.error ); + null_basic_params(); + return false; + } + + var saved_tariff_id = jQuery( 'input[name="edd_settings[novalnet_tariff_id]"]' ).val(); + var saved_subs_tariff_id = jQuery( 'input[name="edd_settings[novalnet_subs_tariff_id]"]' ).val(); + + if (jQuery( 'input[name="edd_settings[novalnet_tariff_id]"]' ).prop( 'type' ) == 'text') { + jQuery( 'input[name="edd_settings[novalnet_tariff_id]"]' ).replaceWith( '' ); + } + + if (jQuery( 'input[name="edd_settings[novalnet_subs_tariff_id]"]' ).prop( 'type' ) == 'text') { + jQuery( 'input[name="edd_settings[novalnet_subs_tariff_id]"]' ).replaceWith( '' ); + } + jQuery( 'select[name="edd_settings[novalnet_tariff_id]"], select[name="edd_settings[novalnet_subs_tariff_id]"]' ).empty().append(); + jQuery( 'select[name="edd_settings[novalnet_tariff_id]"]' ).append( + jQuery( + '', + { + value: '', + text : novalnet_admin.select_text, + } + ) + ); + + for ( var tariff_id in data.tariff ) { + var tariff_type = data.tariff[ tariff_id ].type; + var tariff_value = data.tariff[ tariff_id ].name; + + // Assign subscription tariff id. + if ('4' === jQuery.trim( tariff_type ) ) { + jQuery( 'select[name="edd_settings[novalnet_subs_tariff_id]"]' ).append( + jQuery( + '', + { + value: jQuery.trim( tariff_id ), + text : jQuery.trim( tariff_value ) + } + ) + ); + if (saved_subs_tariff_id === jQuery.trim( tariff_id ) ) { + jQuery( 'select[name="edd_settings[novalnet_subs_tariff_id]"]' ).val( jQuery.trim( tariff_id ) ); + } + } else { + jQuery( 'select[name="edd_settings[novalnet_tariff_id]"]' ).append( + jQuery( + '', + { + value: jQuery.trim( tariff_id ), + text : jQuery.trim( tariff_value ) + } + ) + ); + } + + // Assign tariff id. + if (saved_tariff_id === jQuery.trim( tariff_id ) ) { + jQuery( 'select[name="edd_settings[novalnet_tariff_id]"]' ).val( jQuery.trim( tariff_id ) ); + } + } + // Assign vendor details. + jQuery( 'input[name="edd_settings[novalnet_merchant_id]"]' ).val( data.vendor ); + jQuery( 'input[name="edd_settings[novalnet_auth_code]"]' ).val( data.auth_code ); + jQuery( 'input[name="edd_settings[novalnet_product_id]"]' ).val( data.product ); + jQuery( 'input[name="edd_settings[novalnet_access_key]"]' ).val( data.access_key ); + jQuery( 'input[name="edd_settings[novalnet_client_key]"]' ).val( data.client_key ); + return true; +} +// Onhold Fields Configurations. +function onholdConfig(){ + + jQuery( 'select[id="edd_settings[novalnet_invoice_manual_limit]"],select[id="edd_settings[novalnet_sepa_manual_limit]"],select[id="edd_settings[novalnet_cc_manual_limit]"],select[id="edd_settings[novalnet_paypal_manual_limit]"]' ).on( + 'change', + function(){ + if ( 'capture' != jQuery( 'select[id="edd_settings[novalnet_invoice_manual_limit]"],select[id="edd_settings[novalnet_sepa_manual_limit]"],select[id="edd_settings[novalnet_cc_manual_limit]"],select[id="edd_settings[novalnet_paypal_manual_limit]"]' ).val() ) { + jQuery( 'input[id="edd_settings[novalnet_invoice_manual_check]"],input[id="edd_settings[novalnet_sepa_manual_check]"],input[id="edd_settings[novalnet_cc_manual_check]"],input[id="edd_settings[novalnet_paypal_manual_check]"]' ).closest( 'tr' ).show(); + } else { + jQuery( 'input[id="edd_settings[novalnet_invoice_manual_check]"],input[id="edd_settings[novalnet_sepa_manual_check]"],input[id="edd_settings[novalnet_cc_manual_check]"],input[id="edd_settings[novalnet_paypal_manual_check]"]' ).closest( 'tr' ).hide(); + } + } + ).change(); +} +// Guaranteed Fields Configurations. +function guaranteeConfig(){ + + jQuery( 'input[id="edd_settings[novalnet_invoice_guarantee_enable]"],input[id="edd_settings[novalnet_sepa_guarantee_enable]"]' ).on( + 'change', + function(){ + if ( jQuery( 'input[id="edd_settings[novalnet_invoice_guarantee_enable]"],input[id="edd_settings[novalnet_sepa_guarantee_enable]"]' ).is( ':checked' ) ) { + + jQuery( 'select[id="edd_settings[novalnet_invoice_guarantee_pending_status]"],select[id="edd_settings[novalnet_sepa_guarantee_pending_status]"]' ).closest( 'tr' ).show(); + jQuery( 'input[id="edd_settings[novalnet_invoice_guarantee_minimum_order_amount]"],input[id="edd_settings[novalnet_sepa_guarantee_minimum_order_amount]"]' ).closest( 'tr' ).show(); + jQuery( 'select[id="edd_settings[novalnet_sepa_force_normal_payment]"],select[id="edd_settings[novalnet_invoice_force_normal_payment]"]' ).closest( 'tr' ).show(); + jQuery( 'select[id="edd_settings[novalnet_sepa_order_pending_status]"],select[id="edd_settings[novalnet_invoice_order_pending_status]"]' ).closest( 'tr' ).show(); + } else { + jQuery( 'select[id="edd_settings[novalnet_invoice_guarantee_pending_status]"],select[id="edd_settings[novalnet_sepa_guarantee_pending_status]"]' ).closest( 'tr' ).hide(); + jQuery( 'input[id="edd_settings[novalnet_invoice_guarantee_minimum_order_amount]"],input[id="edd_settings[novalnet_sepa_guarantee_minimum_order_amount]"]' ).closest( 'tr' ).hide(); + jQuery( 'select[id="edd_settings[novalnet_sepa_force_normal_payment]"],select[id="edd_settings[novalnet_invoice_force_normal_payment]"]' ).closest( 'tr' ).hide(); + jQuery( 'select[id="edd_settings[novalnet_sepa_order_pending_status]"],select[id="edd_settings[novalnet_invoice_order_pending_status]"]' ).closest( 'tr' ).hide(); + } + } + ).change(); + +} diff --git a/assets/js/novalnet-cc.js b/assets/js/novalnet-cc.js new file mode 100755 index 0000000..16b10be --- /dev/null +++ b/assets/js/novalnet-cc.js @@ -0,0 +1,215 @@ +/** + * Novalnet CC action process + * + * @category Novalnet CC action + * @package edd-novalnet-gateway + * @copyright Novalnet (https://www.novalnet.de) + * @license https://www.novalnet.de/payment-plugins/kostenlos/lizenz + */ + +var novalnet_cc; + +jQuery( document ).ready( + function ($) { + + jQuery( "#edd_purchase_form" ).on( + 'submit', + function( evt ) { + + /* Fetch the payment name from the payment selection */ + var payment = jQuery( '.edd-gateway:checked' ).val(); + if ( payment == 'novalnet_cc' && jQuery( '#novalnet_cc_hash' ).val() == '' && '' == jQuery( '#novalnet_cc_error' ).val() ) { + NovalnetUtility.getPanHash(); + return false; + } + } + ); + jQuery( "#edd-purchase-button" ).on( + 'click', + function( evt ) { + if ( jQuery( '#novalnet_cc_hash' ).val() == '' && '' == jQuery( '#novalnet_cc_error' ).val() ) { + NovalnetUtility.getPanHash(); + return false; + } + } + ); + + jQuery( "#edd-recurring-form" ).on( + 'submit', + function( evt ) { + var payment = jQuery('input[name=edd-recurring-update-gateway]').val(); + /* Fetch the payment name from the payment selection */ + if ( payment == 'novalnet_cc' && jQuery( '#novalnet_cc_hash' ).val() == '' && '' == jQuery( '#novalnet_cc_error' ).val() ) { + NovalnetUtility.getPanHash(); + return false; + } + } + ); + + if ( ( jQuery( "#edd-recurring-form" ).html() !== undefined || jQuery( "#edd-purchase-button" ).html() !== undefined ) && $( '#nnIframe' ).is( ":visible" ) ) { + novalnet_load_iframe(); + } + } +); + +function novalnet_load_iframe() { + + NovalnetUtility.setClientKey( (novalnet_cc.client_key !== undefined) ? novalnet_cc.client_key : ''); + + var configurationObject = { + + // You can handle the process here, when specific events occur. + callback: { + + // Called once the pan_hash (temp. token) created successfully. + on_success: function (data) { + jQuery( '#novalnet_cc_do_redirect' ).val( data['do_redirect'] ); + jQuery( '#novalnet_cc_hash' ).val( data['hash'] ); + jQuery( '#novalnet_cc_uniqueid' ).val( data['unique_id'] ); + if ( jQuery('#edd_purchase_form').html() != null ) { + jQuery('#edd_purchase_form').submit(); + } + if ( jQuery('#edd-recurring-form').html() != null ) { + jQuery('#edd-recurring-form').submit(); + } + }, + + // Called in case of an invalid payment data or incomplete input. + on_error: function (data) { + if ( undefined !== data['error_message'] ) { + jQuery( '#novalnet_cc_error' ).val( data['error_message'] ); + if ( jQuery('#edd_purchase_form').html() != null ) { + jQuery('#edd_purchase_form').submit(); + } + if ( jQuery('#edd-recurring-form').html() != null ) { + jQuery('#edd-recurring-form').submit(); + } + } + }, + + // Called in case the Challenge window Overlay (for 3ds2.0) displays + on_show_overlay: function (data) { + document.getElementById("nnIframe").classList.add("nn_cc_overlay"); + }, + + // Called in case the Challenge window Overlay (for 3ds2.0) hided + on_hide_overlay: function (data) { + document.getElementById("nnIframe").classList.remove("nn_cc_overlay"); + } + }, + + // You can customize your Iframe container styel, text etc. + iframe: { + + // It is mandatory to pass the Iframe ID here. Based on which the entire process will took place. + id: "nnIframe", + + // Set to 1 to make you Iframe input container more compact (default - 0) + inline: 0, + + skip_auth: 1, + + // Add the style (css) here for either the whole Iframe contanier or for particular label/input field + style: { + // The css for the Iframe container + container: novalnet_cc.common_style_text, + + // The css for the input field of the Iframe container + input: novalnet_cc.common_field_style, + + // The css for the label of the Iframe container + label: novalnet_cc.common_label_style + }, + text: { + + // The End-customers selected language. The Iframe container will be rendered in this Language. + lang : novalnet_cc.lang, + + // Basic Error Message + error: novalnet_cc.card_error_text, + + // You can customize the text for the Card Holder here + card_holder : { + + // You have to give the Customized label text for the Card Holder Container here + label: novalnet_cc.card_holder_label, + + // You have to give the Customized placeholder text for the Card Holder Container here + place_holder: novalnet_cc.card_holder_input, + }, + card_number : { + + // You have to give the Customized label text for the Card Number Container here + label: novalnet_cc.card_number_label, + + // You have to give the Customized placeholder text for the Card Number Container here + place_holder: novalnet_cc.card_number_input, + }, + expiry_date : { + + // You have to give the Customized label text for the Expiry Date Container here + label: novalnet_cc.card_expiry_label, + }, + cvc : { + + // You have to give the Customized label text for the CVC/CVV/CID Container here + label: novalnet_cc.card_cvc_label, + + // You have to give the Customized placeholder text for the CVC/CVV/CID Container here + place_holder: novalnet_cc.card_cvc_input, + } + } + }, + + // Add Customer data + customer: { + + // Your End-customer\'s First name which will be prefilled in the Card Holder field + first_name: (novalnet_cc.first_name !== undefined) ? novalnet_cc.first_name : '', + + // Your End-customer\'s Last name which will be prefilled in the Card Holder field + last_name: (novalnet_cc.last_name !== undefined) ? novalnet_cc.last_name : '', + + // Your End-customer\'s billing address. + billing: { + + // Your End-customer\'s billing street (incl. House no). + street: (novalnet_cc.street !== undefined) ? novalnet_cc.street : '', + + // Your End-customer\'s billing city. + city: (novalnet_cc.city !== undefined) ? novalnet_cc.city : '', + + // Your End-customer\'s billing zip. + zip: (novalnet_cc.zip !== undefined) ? novalnet_cc.zip : '', + + // Your End-customer\'s billing country ISO code. + country_code: (novalnet_cc.country_code !== undefined) ? novalnet_cc.country_code : '' + } + }, + + // Add transaction data + transaction: { + + // The payable amount that can be charged for the transaction (in minor units), for eg:- Euro in Eurocents (5,22 EUR = 522). + amount: (novalnet_cc.amount !== undefined) ? novalnet_cc.amount : 0, + + // The three-character currency code as defined in ISO-4217. + currency: (novalnet_cc.currency !== undefined) ? novalnet_cc.currency : '', + + // Set to 1 for the TEST transaction (default - 0). + test_mode: (novalnet_cc.test_mode !== undefined) ? novalnet_cc.test_mode : 0, + + enforce_3d: (novalnet_cc.enforce_3d !== undefined) ? novalnet_cc.enforce_3d : '' + }, + custom: { + + // Shopper\'s selected language in shop + lang: (novalnet_cc.lang !== undefined) ? novalnet_cc.lang : '' + } + }; + + // Create the Credit Card form + NovalnetUtility.createCreditCardForm(configurationObject); +} + + diff --git a/assets/js/novalnet-sepa.js b/assets/js/novalnet-sepa.js new file mode 100755 index 0000000..ee5feed --- /dev/null +++ b/assets/js/novalnet-sepa.js @@ -0,0 +1,54 @@ +/** + * Novalnet SEPA action + * + * @category Novalnet SEPA action + * @package edd-novalnet-gateway + * @copyright Novalnet (https://www.novalnet.de) + * @license https://www.novalnet.de/payment-plugins/kostenlos/lizenz + */ + +var novalnet_sepa; + +function novalnet_sepa_common_validation(event, allowstring ) { + + jQuery( '#novalnet_sepa_iban' ).keyup( + function(event) { + var iban = jQuery( '#novalnet_sepa_iban' ).val().toUpperCase(); + jQuery( '#novalnet_sepa_iban' ).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; + } + ); + + var keycode = ( 'which' in event ) ? event.which : event.keyCode, + event = event || window.event, + reg = ''; + if ( 'alphanumeric' == allowstring ) { + reg = /^(?:[0-9a-zA-Z]+$)/; + } else if ( 'holder' == allowstring ) { + var reg = /[^0-9\[\]\/\\#,+@!^()$~%'"=:;<>{}\_\|*?`]/g; + } else { + var reg = /^(?:[0-9]+$)/; + } + return ( reg.test( String.fromCharCode( keycode ) ) || keycode == 0 || keycode == 8 ); + +} + +function sepa_mandate_toggle_process( event ) { + + jQuery( "#novalnet-about-mandate" ).toggle(); +} diff --git a/assets/js/novalnet-subscription.js b/assets/js/novalnet-subscription.js new file mode 100755 index 0000000..136f6ae --- /dev/null +++ b/assets/js/novalnet-subscription.js @@ -0,0 +1,87 @@ +/** + * Novalnet Subscription handle + * + * @category Novalnet Subscription action + * @package edd-novalnet-gateway + * @copyright Novalnet (https://www.novalnet.de) + * @license https://www.novalnet.de/payment-plugins/kostenlos/lizenz + */ + +var novalnet_subscription; + +jQuery( document ).ready( + function ( $ ) { + $.fn.bindFirst = function( name, fn ) { + var elem, handlers, i, _len; + this.bind( name, fn ); + for (i = 0, _len = this.length; i < _len; i++) { + elem = this[i]; + handlers = jQuery._data( elem ).events[name.split( '.' )[0]]; + handlers.unshift( handlers.pop() ); + } + }; + $( document ).ready( + function() { + $('#edd_settings_novalnet_subs_payments__chosen .chosen-search-input').css( "display", "none" ); + $('#edd_settings_novalnet_subs_payments__chosen .chosen-choices').attr('style','height:140px'); + $( '.edd_subscription_cancel' ).removeClass( 'edd_subscription_cancel' ).addClass( 'edd_novalnet_subscription_cancel' ); + } + ); + $( ".edd_novalnet_subscription_cancel, a" ).bindFirst( + "click", + function( e ) { + novalnet_subscription.admin ? $( '#edd_update_subscription' ).hide() : ''; + var submit_url = ( undefined == $( this ).attr( 'href' ) ) ? jQuery( this ).children( 'a' ).attr( 'href' ) : $( this ).attr( 'href' ); + if ( $('input[name="sub_id"]').length || ! novalnet_subscription.admin ) { + if ( 0 < submit_url.indexOf( "novalnet_subscription" ) ) { + form_name = ! novalnet_subscription.admin ? 'td' : 'form'; + $( this ).closest( form_name ).append( novalnet_subscription.reason_list ); + $( this ).css( 'display', 'none' ); + e.preventDefault(); + e.stopImmediatePropagation(); + } + } + $( '#novalnet_subscription_cancel' ).attr( 'method', 'POST' ); + $( '#novalnet_subscription_cancel' ).attr( 'action', submit_url ) + } + ); + + $( '#edd_update_subscription' ).click( + function( evt ) { + if ( 'true' == novalnet_subscription.can_update && ( 'cancelled' != jQuery( 'select[name="status"]' ).val() || 'cancelled' == jQuery( 'select[name="status"]' ).val() ) ) { + alert( ( novalnet_subscription.novalnet_subs_cancel ) ); + return false; + } + return true; + } + ); + if ( novalnet_subscription.hide_backend_details ) { + $( '.edd-edit-sub-expiration' ).click( + function( evt ) { + $( '.edd-sub-expiration' ).prop( 'disabled', 'disabled' ); + return false; + } + ); + $( '.edd-edit-sub-transaction-id' ).click( + function( evt ) { + $( '.edd-sub-transaction-id' ).prop( 'disabled', 'disabled' ); + return false; + } + ); + } + } +); +function novalnet_hide_button( event ) { + jQuery( '#' + event.id ).append(); + if ( event.id == 'novalnet_cancel' && '' == jQuery( '#novalnet_subscription_cancel_reason' ).val() ) { + alert( novalnet_subscription.error_message ); + return false; + } + jQuery( '.novalnet_loader' ).css( 'display', 'block' ); + jQuery( event ).css( 'opacity', '0.1' ); + jQuery( event ).click( + function () { + return false; + } + ); +} diff --git a/assets/js/novalnet.js b/assets/js/novalnet.js new file mode 100755 index 0000000..75bf12a --- /dev/null +++ b/assets/js/novalnet.js @@ -0,0 +1,381 @@ +/** + * Novalnet Function action + * + * @category Novalnet function action + * @package edd-novalnet-gateway + * @copyright Novalnet (https://www.novalnet.de) + * @license https://www.novalnet.de/payment-plugins/kostenlos/lizenz + */ + +function day_blur_action ( e , payment ) { + + var date, updated_date; + updated_date = date = jQuery( '#' + payment + '_day' ).val(); + if ( date != '0' && date != '' && date.length < 2 ) { + updated_date = "0" + date; + } else if ( date == '0' ) { + updated_date = date.replace( '0', '01' ); + } else if ( date == '00' ) { + updated_date = date.replace( '00', '01' ); + } + jQuery( '#' + payment + '_day' ).val( updated_date ); +} + +/* Check for year validation */ +function year_validation ( e , payment ) { + + var current_date = new Date(); + var max_year = current_date.getFullYear() - 18; + var min_year = current_date.getFullYear() - 91; + var year_val = jQuery( '#' + payment + '_year' ).val(); + var year_len = year_val.length; + let maximum_year = parseInt( max_year.toString().substring( 0 ,year_len ) ); + let minimum_year = parseInt( min_year.toString().substring( 0 ,year_len ) ); + let user_val = year_val.substring( 0, year_len ); + if ( e.keyCode != 8 || e.keyCode != 46 ) { + if ( user_val > maximum_year || user_val < minimum_year || isNaN( user_val ) ) { + jQuery( '#' + payment + '_year' ).val( year_val.substring( 0, year_len - 1 ) ); + e.preventDefault(); + e.stopImmediatePropagation(); + return false; + } + } +} + + +/* Check for valid date */ +function allow_date( event ) { + + var cursor = event.target.selectionStart; + var keycode = ( 'which' in event ) ? event.which : event.keyCode, + reg = /^(?:[0-9]+$)/; + var id_val = event.target; + var payment_id = jQuery( id_val ).attr( 'id' ); + var payment; + if ( payment_id == 'novalnet_sepa_day' || payment_id == 'novalnet_sepa_month' || payment_id == 'novalnet_sepa_year' ) { + payment = payment_id.match( /novalnet_sepa/g ); + } else if ( payment_id == 'novalnet_invoice_day' || payment_id == 'novalnet_invoice_month' || payment_id == 'novalnet_invoice_year' ) { + payment = payment_id.match( /novalnet_invoice/g ); + } + + var current_date = new Date(); + var max_year = current_date.getFullYear() - 18; + var min_year = current_date.getFullYear() - 91; + var array_month = [ "01", "02", "03", "04", "05", "06","07", "08", "09", "10", "11", "12" ]; + + monthAutocomplete( document.getElementById( payment + "_month" ), array_month ); + + var year_range = []; + + for ( var year = max_year; year >= min_year; year-- ) { + year_range.push( '' + year + '' ); + } + + yearAutocomplete( document.getElementById( payment + "_year" ), year_range ); + + jQuery( "#" + payment + "_day" ).on( + "keypress textInput", + function ( e ) { + + var cur_val = e.target.selectionStart; + var keyCode = e.which || e.originalEvent.data.charCodeAt( 0 ); + var expr = String.fromCharCode( keyCode ); + day_val = jQuery( "#" + payment + "_day" ).val(); + + if ( day_val.length == 1 ) { + if ( expr > 2 && day_val.charAt( 0 ) > 2 && cur_val == 0 ) { + reg = /^[0-2]$/; + return ( reg.test( String.fromCharCode( keycode ) ) || 0 === keycode || 8 === keycode ); + } else if ( ( day_val.charAt( 0 ) >= 4 && expr > 3 && ( cur_val == 0 || cur_val == 1 ) ) || (day_val.charAt( 0 ) == 3 && expr > 1 && cur_val == 1 ) ) { + return false; + } else if ( ( cur_val == 0 && day_val.charAt( 0 ) == 1 && expr > 3 ) || ( cur_val == 0 && day_val.charAt( 0 ) == 2 && expr > 2 ) || ( day_val.length == 1 && cur_val == 1 && day_val > 3 ) ) { + return false; + } else if ( day_val.charAt( 0 ) == 0 && expr > 3 && cur_val == 0 ) { + return false; + } + } + } + ); + + jQuery( "#" + payment + "_day" ).on( + 'blur', + function ( e ) { + day_blur_action( e , payment ); + } + ); + + jQuery( "#" + payment + "_year" ).on( + "input", + function ( e ) { + year_validation( e , payment ); + } + ); + + jQuery( "#" + payment + "_month" ).on( + 'blur', + function ( e ) { + var month = this.value; + if ( ( month.length == 1 && month == '0' ) || ( month.length == 2 && month == '00' ) ) { + jQuery( "#" + payment + "_month" ).val( '01' ); + } else if ( month.length == 1 ) { + jQuery( "#" + payment + "_month" ).val( '0' + month ); + } + } + ); + + jQuery( "#" + payment + "_month" ).keypress( + function ( event ) { + var keycode = ( 'which' in event ) ? event.which : event.keyCode; + var expr = String.fromCharCode( keycode ); + var month = jQuery( "#" + payment + "_month" ).val(); + var cursor = event.target.selectionStart; + if ( jQuery( "#" + payment + "_month" ).val() > 0 ) { + reg = /^(?:[0-2]+$)/; + } else { + reg = /^(?:[0-9]+$)/; + } + + if ( ( month > 2 && month.length == 1 && cursor == 0 && expr > 0 ) || ( ( month == 2 || month == 1 || month == 0 ) && month.length == 1 && cursor == 0 && expr > 1 ) ) { + return false; + } else if ( ( month >= 2 && month.length == 1 && cursor == 1 && expr >= 0 ) ) { + return false; + } + return ( reg.test( String.fromCharCode( keycode ) ) || 0 === keycode || 8 === keycode ); + } + ); + + return ( reg.test( String.fromCharCode( keycode ) ) || 0 === keycode || 8 === keycode ); +} + +/* Check for Month list Validation */ +function monthAutocomplete( input_val , array_month ) { + + var currentFocus; + var payment = input_val.id; + + input_val.addEventListener( + "input", + function ( e ) { + + var a, b, i, val = this.value; + + closeAllLists( input_val ); + if ( ! val || val.length < 1 ) { + return false; + } + currentFocus = -1; + + a = document.createElement( "div" ); + a.setAttribute( "id", this.id + "autocomplete-month-list" ); + a.setAttribute( "class", "autocomplete-items" ); + a.style.width = "123px"; + a.style.margin = "0 auto"; + a.style.border = "2px solid #d4d0ba"; + a.style.marginLeft = "110px"; + a.style.position = "absolute"; + a.style.backgroundColor = "#fff"; + + this.parentNode.appendChild( a ); + var count = 0; + var month_length = array_month.length; + for ( i = 0; i < month_length; i++ ) { + var regex = new RegExp( val, 'g' ); + if ( array_month[i].match( regex ) ) { + if ( count == 12 ) { + break; + } + b = document.createElement( "div" ); + b.innerHTML = array_month[i].replace( val,"" + val + "" ); + b.innerHTML += ""; + b.addEventListener( + "click", + function ( e ) { + input_val.value = this.getElementsByTagName( "input" )[0].value; + closeAllLists( input_val ); + } + ); + b.onmouseover = function() { + this.style.backgroundColor = "#d4d0ba"; + } + b.onmouseout = function() { + this.style.backgroundColor = "#fff"; + } + a.appendChild( b ); + count++; + } + } + + } + ); + + input_val.addEventListener( + "keydown", + function ( e ) { + + var x = document.getElementById( this.id + "autocomplete-month-list" ); + if (x) { + x = x.getElementsByTagName( "div" ); + } + if ( e.keyCode == 40 ) { + currentFocus++; + addActiveValue( x ); + } else if ( e.keyCode == 38 ) { + currentFocus--; + addActiveValue( x ); + } else if ( e.keyCode == 13 ) { + e.preventDefault(); + if ( currentFocus > -1 ) { + if (x) { + x[currentFocus].click(); + } + } + } + } + ); + + function addActiveValue( x ) { + if ( ! x) { + return false; + } + removeActiveValue( x ); + if ( isNaN( currentFocus ) ) { + currentFocus = 0; + } + if ( currentFocus >= x.length ) { + currentFocus = 0; + } + if ( currentFocus < 0 ) { + currentFocus = ( x.length - 1 ); + } + x[currentFocus].classList.add( "autocomplete-active" ); + var elements = jQuery( x[currentFocus] ); + jQuery( '#' + payment ).val( jQuery( '.month_active', elements ).val() ); + } + + jQuery( "#" + payment ).on( + 'click', + function ( e ) { + closeAllLists( e.target ); + } + ); + +} + +function closeAllLists ( input_val, elmnt ) { + var x = document.getElementsByClassName( "autocomplete-items" ); + for ( var i = 0; i < x.length; i++ ) { + if ( elmnt != x[i] && elmnt != input_val ) { + x[i].parentNode.removeChild( x[i] ); + } + } +} + +function removeActiveValue( x ) { + for ( var i = 0; i < x.length; i++ ) { + x[i].classList.remove( "autocomplete-active" ); + } +} + +/* Check for Year list Validation */ +function yearAutocomplete ( input_val, array_year ) { + + var currentFocus; + var payment = input_val.id; + + input_val.addEventListener( + "input", + function ( e ) { + + var a, b, i, val = this.value; + + closeAllLists( input_val ); + if ( ! val || val.length < 2 || val.length > 3) { + return false; + } + currentFocus = -1; + + a = document.createElement( "div" ); + a.setAttribute( "id", this.id + "autocomplete-list" ); + a.setAttribute( "class", "autocomplete-items" ); + a.style.width = "10%"; + a.style.float = "right"; + a.style.border = "2px solid #d4d0ba"; + a.style.marginLeft = "236px"; + a.style.position = "absolute"; + a.style.backgroundColor = "#fff"; + + this.parentNode.appendChild( a ); + var count = 1; + for ( i = 0; i < array_year.length; i++ ) { + var regex = new RegExp( val, 'g' ); + if ( array_year[i].match( regex ) ) { + if ( count == 11 ) { + break; + } + b = document.createElement( "div" ); + b.innerHTML = array_year[i].replace( val,"" + val + "" ); + b.innerHTML += ""; + b.addEventListener( + "click", + function ( e ) { + input_val.value = this.getElementsByTagName( "input" )[0].value; + closeAllLists( input_val ); + } + ); + b.onmouseover = function() { this.style.backgroundColor = "#d4d0ba"; } + b.onmouseout = function() { this.style.backgroundColor = "#fff"; } + a.appendChild( b ); + count++; + } + } + } + ); + + input_val.addEventListener( + "keydown", + function ( e ) { + var x = document.getElementById( this.id + "autocomplete-list" ); + if (x) { + x = x.getElementsByTagName( "div" ); + } + if ( e.keyCode == 40 ) { + currentFocus++; + addActiveValue( x ); + } else if ( e.keyCode == 38 ) { + currentFocus--; + addActiveValue( x ); + } else if ( e.keyCode == 13 ) { + e.preventDefault(); + if ( currentFocus > -1 ) { + if (x) { + x[currentFocus].click(); + } + } + } + } + ); + + function addActiveValue( x ) { + if ( ! x) { + return false; + } + removeActiveValue( x ); + if ( currentFocus >= x.length ) { + currentFocus = 0; + } + if ( currentFocus < 0 ) { + currentFocus = ( x.length - 1 ); + } + x[currentFocus].classList.add( "autocomplete-active" ); + var elements = jQuery( x[currentFocus] ); + jQuery( '#' + payment ).val( jQuery( '.year_active', elements ).val() ); + } + + jQuery( "#" + payment ).on( + 'click', + function ( e ) { + closeAllLists( e.target ); + } + ); + +} diff --git a/class-novalnet.php b/class-novalnet.php new file mode 100755 index 0000000..79704ac --- /dev/null +++ b/class-novalnet.php @@ -0,0 +1,159 @@ +setup_constants(); + self::$instance->includes(); + add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'novalnet_action_links' ); + add_action( 'plugins_loaded', array( self::$instance, 'novalnet_initialize_payments' ) ); + + // Registration hooks. + register_activation_hook( NOVALNET_PLUGIN_FILE, 'novalnet_activation_process' ); + register_deactivation_hook( NOVALNET_PLUGIN_FILE, 'novalnet_deactivate_plugin' ); + + // Include payment gateway files. + foreach ( glob( NOVALNET_PLUGIN_DIR . 'includes/gateways/*.php' ) as $filename ) { + include_once $filename; + } + } + return self::$instance; + } + + /** + * Setup plugin constants. + * + * @access private + * @since 1.0.1 + */ + private function setup_constants() { + + // Plugin version. + if ( ! defined( 'NOVALNET_VERSION' ) ) { + define( 'NOVALNET_VERSION', '2.1.1' ); + } + + // Plugin Folder Path. + if ( ! defined( 'NOVALNET_PLUGIN_DIR' ) ) { + define( 'NOVALNET_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); + } + + // Plugin Folder URL. + if ( ! defined( 'NOVALNET_PLUGIN_URL' ) ) { + define( 'NOVALNET_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); + } + + // Plugin Root File. + if ( ! defined( 'NOVALNET_PLUGIN_FILE' ) ) { + define( 'NOVALNET_PLUGIN_FILE', __FILE__ ); + } + + } + + /** + * Include required files. + * + * @access private + * @since 1.1.0 + */ + private function includes() { + include_once NOVALNET_PLUGIN_DIR . 'includes/novalnet-functions.php'; + include_once NOVALNET_PLUGIN_DIR . '/novalnet-install.php'; + include_once NOVALNET_PLUGIN_DIR . 'includes/admin/class-novalnet-global-config.php'; + include_once NOVALNET_PLUGIN_DIR . 'includes/class-novalnet-subscriptions.php'; + } + + /** + * Actions to initialize Novalnet Payments to EDD + * + * Display's Payment in admin + * + * @since 1.0.1 + */ + public function novalnet_initialize_payments() { + /* loads the Novalnet language translation strings */ + load_plugin_textdomain( 'edd-novalnet', false, dirname( plugin_basename( NOVALNET_PLUGIN_FILE ) ) . '/languages/' ); + } + + /** + * Display admin notice at WordPress admin during Plug-in activation + * + * Activate Easy Digital Downloads plugin before you activate the Novalnet payments + * + * @since 1.0.1 + */ + public function novalnet_admin_notices() { + + add_settings_error( 'edd-notices', 'edd-novalnet-admin-error', ( ! is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) ? __( 'Easy Digital Downloads Payment Gateway by Novalnetadd-on requires Easy Digital Downloads plugin. Please install and activate it.', 'edd-novalnet' ) : ( ! extension_loaded( 'curl' ) ? ( __( 'Easy Digital Downloads Payment Gateway by Novalnetrequires PHP CURL. You need to activate the CURL function on your server. Please contact your hosting provider.', 'edd-novalnet' ) ) : '' ) ), 'error' ); + settings_errors( 'edd-notices' ); + } + } +endif; // End if class_exists check. + +/** + * To include all instance object + * + * @since 1.0.1 + */ +function novalnet_payment() { + return Novalnet::instance(); +} + +// Get Novalnet Running. +novalnet_payment(); diff --git a/includes/admin/class-novalnet-global-config.php b/includes/admin/class-novalnet-global-config.php new file mode 100755 index 0000000..e61df3c --- /dev/null +++ b/includes/admin/class-novalnet-global-config.php @@ -0,0 +1,366 @@ +gateway ) && ( $sub->get_total_payments() > $sub->bill_times && 0 != $sub->bill_times ) ) { + novalnet_subs_cancel_perform( $sub ); + } + } + + /** + * Adding admin script + * + * @since 1.1.0 + */ + public static function global_admin_script() { + + // Enqueue script. + wp_enqueue_script( 'novalnet-admin-script', NOVALNET_PLUGIN_URL . 'assets/js/novalnet-admin.js', '', NOVALNET_VERSION ); + + wp_localize_script( + 'novalnet-admin-script', + 'novalnet_admin', + array( + 'select_text' => __( '--Select--', 'edd-novalnet' ), + ) + ); + } + + /** + * To update and store the registered values given Novalnet Global Configuration + * + * @since 1.1.0 + * @access public + */ + public static function update_novalnet_settings() { + // Update Global configuraion fields. + update_option( self::register_novalnet_global_settings() ); + } + + /** + * Register the payment gateways setting section + * + * @since 1.1.0 + * @access public + * @param array $gateway_sections Array of sections for the gateways tab in payment gateways tab. + * @return array $gateway_sections To add Novalnet Global Configuration into sub-sections of payment gateways tab. + */ + public function register_novalnet_global_gateway( $gateway_sections ) { + $gateway_sections['novalnet_global_config'] = __( 'Novalnet Global Configuration', 'edd-novalnet' ); + return $gateway_sections; + } + + /** + * Adds the settings of the Novalnet Global Configuration + * + * @since 1.1.0 + * @access public + * @param array $gateway_settings List of global settings. + */ + public function register_novalnet_global_settings( $gateway_settings ) { + + $edd_settings = get_option('edd_settings'); + if( !empty( $edd_settings['novalnet_subs_payments'] ) ) { + $edd_subs_payment = $edd_settings['novalnet_subs_payments']; + } + if( !empty( $edd_subs_payment ) ) { + update_option('temp_subs_payment', $edd_subs_payment ); + $standard_subs_payment = $edd_subs_payment; + } else if( !empty( get_option('temp_subs_payment') ) ) { + $standard_subs_payment = get_option('temp_subs_payment'); + $store_temp_subs_payment = array( + 'novalnet_subs_payments' => get_option('temp_subs_payment') + ); + update_option('edd_settings', array_merge( $edd_settings, $store_temp_subs_payment )); + } else { + $standard_subs_payment = array( + 'novalnet_cc', + 'novalnet_sepa', + 'novalnet_invoice', + 'novalnet_prepayment', + 'novalnet_paypal', + ); + } + + $admin_url = 'https://admin.novalnet.de/'; + $url = ( version_compare(EDD_VERSION, '2.5.17', '<=') ) ? 'products' : 'novalnet_callback'; + $novalnet_global = array( + array( + 'id' => 'novalnet_settings', + /* translators: %s: admin URL */ + 'name' => '' . __( 'Novalnet API Configuration', 'edd-novalnet' ) . ' ' . sprintf( __( 'Please read the Installation Guide before you start and login to the Novalnet Admin Portal using your merchant account. To get a merchant account, mail to sales@novalnet.de or call +49 (089) 923068320.', 'edd-novalnet' ), $admin_url) . '', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_public_key', + 'name' => __( 'Product activation key', 'edd-novalnet' ) . ' *', + 'type' => 'text', + 'size' => 'regular', + 'autocomplete' => 'off', + 'tooltip_title' => __( 'Product activation key', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Your product activation key is a unique token for merchant authentication and payment processing.', 'edd-novalnet' ), + /* translators: %s: admin URL */ + 'desc' => '' . sprintf( __( "Get your Product activation key from the Novalnet Admin Portal: PROJECT > Choose your project > Shop Parameters > API Signature (Product activation key)","edd-novalnet"), $admin_url ), + ), + array( + 'id' => 'novalnet_merchant_id', + 'name' => __( 'Merchant ID ', 'edd-novalnet' ), + 'type' => 'text', + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_auth_code', + 'name' => __( 'Authentication code', 'edd-novalnet' ), + 'type' => 'text', + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_product_id', + 'name' => __( 'Project ID', 'edd-novalnet' ), + 'type' => 'text', + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_tariff_id', + 'name' => __( 'Select Tariff ID', 'edd-novalnet' ) . ' * ', + 'tooltip_title' => __( 'Select Tariff ID', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Select a Tariff ID to match the preferred tariff plan you created at the Novalnet Admin Portal for this project.', 'edd-novalnet' ), + 'type' => 'text', + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_access_key', + 'name' => __( 'Payment access key', 'edd-novalnet' ), + 'type' => 'text', + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_client_key', + 'name' => __( 'Client Key', 'edd-novalnet' ) . ' *', + 'type' => 'text', + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_common_payment_logo', + 'name' => __( 'Display payment logo', 'edd-novalnet' ), + 'tooltip_title' => __( 'Display payment logo', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment method logo(s) will be displayed on the checkout page. ', 'edd-novalnet' ), + 'type' => 'select', + 'options' => array( + 'no' => __( 'No', 'edd-novalnet' ), + 'yes' => __( 'Yes', 'edd-novalnet' ), + ), + 'std' => 'yes', + ), + array( + 'id' => 'novalnet_global_settings_onhold_status', + 'name' => '' . __( 'Order status management for on-hold transactions', 'edd-novalnet' ) . ' ', + 'type' => 'header', + ), + array( + 'id' => 'novalnet_onhold_success_status', + 'name' => __( 'On-hold order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'pending', + 'tooltip_title' => __( 'On-hold order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for on-hold orders until the transaction is confirmed or canceled.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_onhold_cancel_status', + 'name' => __( 'Canceled order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'abandoned', + 'tooltip_title' => __( 'Canceled order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used when order is canceled or fully refunded.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_global_settings_subs_config', + 'name' => '' . __( 'Dynamic subscription management', 'edd-novalnet' ) . ' ', + 'type' => 'header', + ), + array( + 'id' => 'novalnet_subs_enable_option', + 'name' => __( 'Enable subscriptions', 'edd-novalnet' ), + 'type' => 'select', + 'options' => array( + '0' => __( 'No', 'edd-novalnet' ), + '1' => __( 'Yes', 'edd-novalnet' ), + ), + 'std' => '0', + ), + array( + 'name' => __( 'Subscription payments', 'edd-novalnet' ), + 'id' => 'novalnet_subs_payments', + 'type' => 'select', + 'class' => 'novalnet_subs_config', + 'multiple' => true, + 'chosen' => true, + 'size' => 'regular', + 'options' => array( + 'novalnet_cc' => __( 'Novalnet Credit/Debit Cards', 'edd-novalnet' ), + 'novalnet_sepa' => __( 'Novalnet Direct Debit SEPA', 'edd-novalnet' ), + 'novalnet_invoice' => __( 'Novalnet Invoice', 'edd-novalnet' ), + 'novalnet_prepayment' => __( 'Novalnet Prepayment', 'edd-novalnet' ), + 'novalnet_paypal' => __( 'Novalnet PayPal', 'edd-novalnet' ), + ), + 'std' => $standard_subs_payment, + ), + array( + 'id' => 'novalnet_subs_tariff_id', + 'class' => 'novalnet_subs_config', + 'name' => __( 'Subscription Tariff ID', 'edd-novalnet' ) . ' * ', + 'tooltip_title' => __( 'Subscription Tariff ID', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Select the preferred Novalnet subscription tariff ID available for your project. For more information, please refer the Installation Guide.', 'edd-novalnet' ), + 'type' => 'text', + 'size' => 'regular', + ), + array( + 'name' => '' . __( 'Notification / Webhook URL Setup', 'edd-novalnet' ) . ' ', + 'type' => 'header', + 'id' => 'novalnet_vendor_settings', + ), + array( + 'id' => 'novalnet_merchant_test_mode', + 'name' => __( 'Allow manual testing of the Notification / Webhook URL', 'edd-novalnet' ), + 'tooltip_title' => __( 'Allow manual testing of the Notification / Webhook URL', 'edd-novalnet' ), + 'tooltip_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.', 'edd-novalnet' ), + 'type' => 'select', + 'options' => array( + '0' => __( 'No', 'edd-novalnet' ), + '1' => __( 'Yes', 'edd-novalnet' ), + ), + 'std' => '0', + ), + array( + 'id' => 'novalnet_merchant_email', + 'name' => __( 'Enable e-mail notification', 'edd-novalnet' ), + 'tooltip_title' => __( 'Enable e-mail notification', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Enable this option to notify the given e-mail address when the Notification / Webhook URL is executed successfully.', 'edd-novalnet' ), + 'type' => 'select', + 'options' => array( + '0' => __( 'No', 'edd-novalnet' ), + '1' => __( 'Yes', 'edd-novalnet' ), + ), + 'std' => '0', + ), + array( + 'id' => 'novalnet_merchant_email_to', + 'name' => __( 'Send e-mail to', 'edd-novalnet' ), + 'tooltip_title' => __( 'Send e-mail to', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Notification / Webhook URL execution messages will be sent to this e-mail.', 'edd-novalnet' ), + 'type' => 'text', + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_merchant_notify_url', + 'name' => __( 'Notification / Webhook URL', 'edd-novalnet' ), + 'type' => 'text', + 'size' => 'regular', + 'std' => add_query_arg( + array( + 'edd-api' => $url, + ), + get_site_url() . '/' + ), + + 'desc' => '' . sprintf(__( 'You must add the following webhook endpoint to your Novalnet Admin Portal . This will allow you to receive notifications about the transaction status.', 'edd-novalnet' ), $admin_url ), + 'allow_blank' => false, + ), + ); + $gateway_settings['novalnet_global_config'] = apply_filters( 'edd_novalnet_global_settings', $novalnet_global ); + return $gateway_settings; + } + + /** + * Sent request to novalnet server for merchant configurations + * + * @since 2.0.0 + */ + public function novalnet_apiconfig() { + $request = wp_unslash( $_POST ); + $error = ''; + if ( ! empty( $request ['novalnet_api_key'] ) ) { + $request = array( + 'lang' => novalnet_shop_language(), + 'hash' => trim( $request ['novalnet_api_key'] ), + ); + $response = novalnet_handle_communication( 'https://payport.novalnet.de/autoconfig', $request ); + $result = json_decode( $response ); + + if ( ! empty( $result->status ) && '100' === $result->status ) { + wp_send_json_success( $result ); + } else { + + if ( '106' === $result->status ) { + /* translators: %s: Server Address */ + $error = sprintf( __( 'You need to configure your outgoing server IP address ( %s ) at Novalnet. Please configure it in Novalnet Admin Portal or contact technic@novalnet.de', 'edd-novalnet' ), novalnet_server_addr( 'SERVER_ADDR' ) ); + } else { + $error = $result->config_result; + } + } + } else { + $error = __( 'Please fill in all the mandatory fields', 'edd-novalnet' ); + } + + wp_send_json_error( + array( + 'error' => $error, + ) + ); + } + +} +new Novalnet_Global_Config(); diff --git a/includes/api/class-novalnet-callback-api.php b/includes/api/class-novalnet-callback-api.php new file mode 100755 index 0000000..0318d8a --- /dev/null +++ b/includes/api/class-novalnet-callback-api.php @@ -0,0 +1,1029 @@ +get_requested_params(); + + // Order reference of given callback request. + $order_reference = (array) $vendor_script->get_order_reference(); + + if ( ! empty( $order_reference['order_no'] ) ) { + + list( $payment_gateway, $callback_amount, $sum_amount, $org_amount, $payment_level ) = $vendor_script->get_payment_data( $request_param, $order_reference['order_no'] ); + + // Check for payment_type. + if ( ! in_array( $vendor_script->ary_request_params['payment_type'], $vendor_script->ary_payment_groups[ $order_reference['payment_type'] ], true ) ) { + $vendor_script->debug_error( 'Novalnet callback received. Payment type (' . $vendor_script->ary_request_params['payment_type'] . ') is not valid.' ); + } + + $vendor_script->perform_subscription_stop_request( $request_param ); + + // Transaction cancellation process. + $vendor_script->transaction_cancellation( $request_param ); + + // level 0 payments - Initial payments. + $vendor_script->zero_level_process( $request_param ); + + // level 1 payments - Type of charge backs. + $vendor_script->first_level_process( $request_param ); + + // level 2 payments - Type of payment. + $vendor_script->second_level_process( $request_param ); + + $vendor_script->perform_subscription_reactivation_request( $request_param ); + + if ( '100' !== $request_param['status'] || '100' !== $request_param['tid_status'] ) { + $vendor_script->debug_error( 'Status ' . $request_param['status'] . ' is not valid: Only 100 is allowed' ); + } + } else { + + $nn_order_id = $request_param['order_no']; + if ( ! empty( $nn_order_id ) ) { + $post_details = get_post( $nn_order_id ); + if ( !empty( $post_details) && $post_details->post_type == 'edd_payment' ) { + $payment = get_novalnet_payment( $nn_order_id ); + if ( $nn_order_id == $post_details->ID && novalnet_check_string($payment) ) { + $vendor_script->handle_communication_failure( $payment ); + } else { + $vendor_script->debug_error( 'Order number is not valid' ); + } + } + } + /* Error section : Due to order reference not found from the shop database */ + $vendor_script->debug_error( 'Novalnet callback received. Order Reference not exist!' ); + }// End if. + + $vendor_script->debug_error( 'Callback script executed already. Refer order: ' . $order_reference['order_no'] ); +} + +/** + * Callback trigger for all payment + */ +class Novalnet_Callback_Api { + + /** + * Form request params. + * + * @var array + */ + public $ary_request_params = array(); + + /** + * Array Type of payment available - Level : 0. + * + * @var array + */ + public $ary_payments = array( 'CREDITCARD', 'INVOICE_START', 'DIRECT_DEBIT_SEPA', 'GUARANTEED_INVOICE', 'GUARANTEED_DIRECT_DEBIT_SEPA', 'PAYPAL', 'ONLINE_TRANSFER', 'IDEAL', 'EPS', 'GIROPAY', 'PRZELEWY24', 'CASHPAYMENT' ); + + /** + * Array Type of Charge backs available - Level : 1. + * + * @var array + */ + public $ary_chargebacks = array( 'GUARANTEED_INVOICE_BOOKBACK', 'GUARANTEED_SEPA_BOOKBACK', 'RETURN_DEBIT_SEPA', 'REVERSAL', 'CREDITCARD_BOOKBACK', 'CREDITCARD_CHARGEBACK', 'REFUND_BY_BANK_TRANSFER_EU', 'PAYPAL_BOOKBACK', 'PRZELEWY24_REFUND', 'REFUND_BY_BANK_TRANSFER_EU', 'CASHPAYMENT_REFUND' ); + + /** + * Array Type of CreditEntry payment and Collections available - Level : 2. + * + * @var array + */ + public $ary_collection = array( 'INVOICE_CREDIT', 'CASHPAYMENT_CREDIT', 'ONLINE_TRANSFER_CREDIT', 'CREDIT_ENTRY_CREDITCARD', 'CREDIT_ENTRY_SEPA', 'CREDIT_ENTRY_DE', 'DEBT_COLLECTION_SEPA', 'DEBT_COLLECTION_CREDITCARD', 'DEBT_COLLECTION_DE' ); + + /** + * Form list of payment types as per payment method. + * + * @var array + */ + public $ary_payment_groups = array( + 'novalnet_cc' => array( 'CREDITCARD', 'CREDITCARD_CHARGEBACK', 'CREDITCARD_BOOKBACK', 'CREDIT_ENTRY_CREDITCARD', 'DEBT_COLLECTION_CREDITCARD', 'SUBSCRIPTION_STOP', 'SUBSCRIPTION_REACTIVATE', 'TRANSACTION_CANCELLATION' ), + 'novalnet_sepa' => array( 'DIRECT_DEBIT_SEPA', 'RETURN_DEBIT_SEPA', 'CREDIT_ENTRY_SEPA', 'DEBT_COLLECTION_SEPA', 'GUARANTEED_DIRECT_DEBIT_SEPA', 'GUARANTEED_SEPA_BOOKBACK', 'REFUND_BY_BANK_TRANSFER_EU', 'SUBSCRIPTION_STOP', 'SUBSCRIPTION_REACTIVATE', 'TRANSACTION_CANCELLATION' ), + 'novalnet_ideal' => array( 'IDEAL', 'REFUND_BY_BANK_TRANSFER_EU', 'ONLINE_TRANSFER_CREDIT', 'REVERSAL', 'CREDIT_ENTRY_DE', 'DEBT_COLLECTION_DE' ), + 'novalnet_instantbank' => array( 'ONLINE_TRANSFER', 'REFUND_BY_BANK_TRANSFER_EU', 'ONLINE_TRANSFER_CREDIT', 'REVERSAL', 'CREDIT_ENTRY_DE', 'DEBT_COLLECTION_DE' ), + 'novalnet_paypal' => array( 'PAYPAL', 'SUBSCRIPTION_STOP', 'PAYPAL_BOOKBACK', 'SUBSCRIPTION_REACTIVATE', 'TRANSACTION_CANCELLATION' ), + 'novalnet_przelewy24' => array( 'PRZELEWY24', 'PRZELEWY24_REFUND', 'TRANSACTION_CANCELLATION' ), + 'novalnet_prepayment' => array( 'INVOICE_START', 'INVOICE_CREDIT', 'SUBSCRIPTION_STOP', 'SUBSCRIPTION_REACTIVATE', 'REFUND_BY_BANK_TRANSFER_EU' ), + 'novalnet_invoice' => array( 'INVOICE_START', 'GUARANTEED_INVOICE', 'GUARANTEED_INVOICE_BOOKBACK', 'INVOICE_CREDIT', 'SUBSCRIPTION_STOP', 'SUBSCRIPTION_REACTIVATE', 'REFUND_BY_BANK_TRANSFER_EU', 'TRANSACTION_CANCELLATION', 'CREDIT_ENTRY_DE', 'DEBT_COLLECTION_DE' ), + 'novalnet_eps' => array( 'EPS', 'REFUND_BY_BANK_TRANSFER_EU', 'ONLINE_TRANSFER_CREDIT', 'REVERSAL', 'CREDIT_ENTRY_DE', 'DEBT_COLLECTION_DE' ), + 'novalnet_giropay' => array( 'GIROPAY', 'REFUND_BY_BANK_TRANSFER_EU', 'ONLINE_TRANSFER_CREDIT', 'REVERSAL', 'CREDIT_ENTRY_DE', 'DEBT_COLLECTION_DE' ), + 'novalnet_cashpayment' => array( 'CASHPAYMENT', 'CASHPAYMENT_CREDIT', 'CASHPAYMENT_REFUND' ), + ); + + /** + * Novalnet Transaction Cancellation catagory. + * + * @var array + */ + + public $cancellation = array( + 'TRANSACTION_CANCELLATION', + ); + + /** + * Need check these params. + * + * @var array + */ + public $params_required = array( + 'vendor_id' => '', + 'status' => '', + 'tid_status' => '', + 'payment_type' => '', + 'tid' => '', + ); + + /** + * Subscription stop. + * + * @var array + */ + public $ary_subscriptions = array( 'SUBSCRIPTION_STOP', 'SUBSCRIPTION_REACTIVATE', 'SUBSCRIPTION_PAUSE', 'SUBSCRIPTION_UPDATE' ); + + /** + * Get all required action and filter to process callback script + */ + public function __construct() { + + self::check_ip_address(); + + $params = array_map( 'trim', $_REQUEST ); // Input var okay. + + if ( empty( $params ) ) { + self::debug_error( 'Novalnet callback received. No params passed over!' ); + } + + if ( ! empty( $params['subs_billing'] ) ) { + $this->params_required['signup_tid'] = ''; + } elseif ( isset( $params['payment_type'] ) && in_array( $params['payment_type'], array_merge( $this->ary_chargebacks, $this->ary_collection ), true ) ) { + $this->params_required['tid_payment'] = ''; + } + + $this->ary_request_params = self::validate_request_params( $params ); + } + + /** + * Validate the basic needed param + * + * @since 1.0.1 + * @access public + * @param array $params Validate required param. + * @return array $params Return validated param. + */ + public function validate_request_params( $params ) { + + if ( ! empty( $params ) ) { + $value_nt_exist = array( 'reference', 'vendor_id', 'tid', 'status', 'tid_status', 'status_messge', 'payment_type', 'signup_tid' ); + foreach ( $value_nt_exist as $value ) { + if ( ! isset( $params[ $value ] ) ) { + $params[ $value ] = ''; + } + } + if ( ! $params['tid'] ) { + $params['tid'] = $params['signup_tid']; + } + + foreach ( $this->params_required as $k => $v ) { + if ( empty( $params[ $k ] ) ) { + self::debug_error( 'Required param ( ' . $k . ' ) missing!' ); + } elseif ( in_array( $k, array( 'tid', 'tid_payment', 'signup_tid' ), true ) && ! preg_match( '/^\d{17}$/', $params[ $k ] ) ) { + self::debug_error( 'Invalid TID [ ' . $params[ $k ] . ' ] for order: ' . $params['order_no'] ); + } + } + + // Validating payment_type. + if ( ! in_array( $params['payment_type'], array_merge( $this->ary_payments, $this->ary_chargebacks, $this->ary_collection, $this->ary_subscriptions, $this->cancellation ), true ) ) { + self::debug_error( 'Payment type ( ' . $params['payment_type'] . ' ) is mismatched!' ); + } + + if ( '' !== $params['signup_tid'] && ( isset($params['subs_billing']) && $params['subs_billing'] == 1 ) ) { + $params['shop_tid'] = $params['signup_tid']; + } elseif ( in_array( $params['payment_type'], array_merge( $this->ary_chargebacks, $this->ary_collection ), true ) ) { // Invoice. + $params['shop_tid'] = $params['tid_payment']; + } elseif ( '' !== $params['tid'] ) { + $params['shop_tid'] = $params['tid']; + } + + return $params; + }// End if. + } + + /** + * Checks the client IP address + * + * @since 1.0.1 + * @access public + */ + public function check_ip_address() { + global $test_mode; + $get_host_address = gethostbyname( 'pay-nn.de' ); + if ( empty( $get_host_address ) ) { + self::debug_error( 'Novalnet HOST IP missing' ); + } + $get_ip_address = get_remote_address(); + if ( ( $get_host_address !== $get_ip_address ) && ! $test_mode ) { + foreach ($_SERVER as $key ) { + if(!empty($_SERVER[ $key ])){ + foreach ( explode( ',', $_SERVER[ $key ] ) as $server_ip ) { + if ($server_ip == $get_host_address) { + return; + } + } + } + } + self::debug_error( 'Unauthorised access from the IP [' . $get_ip_address . ']' ); + } + } + + /** + * Mail notification + * + * @since 1.0.1 + * @access public + * @param array $data Send callback mail. + */ + public function send_notify_mail( $data ) { + global $edd_options; + + if ( ! empty( $edd_options['novalnet_merchant_email'] ) ) { + $emails = new EDD_Emails(); + $email_to_addr = ! empty( $edd_options['novalnet_merchant_email_to'] ) ? trim( $edd_options['novalnet_merchant_email_to'] ) : ''; + + $email_subject = 'Novalnet Callback Script Access Report - ' . get_option( 'blogname' ); + if ( $data['comments'] && ! empty( $email_to_addr ) ) { + $comments = $data['comments']; + $message = html_entity_decode( $comments ); + $emails->__set( 'heading', $email_subject ); + $emails->send( $email_to_addr, $email_subject, $message ); + } + } + self::debug_error( $data['comments'] ); + } + + /** + * Transaction cancellation. + * + * @param array $request_param server response. + */ + public function transaction_cancellation( $request_param ) { + global $wpdb, $edd_options, $order_reference; + + if ( '103' === $request_param['tid_status'] && 'TRANSACTION_CANCELLATION' === $request_param['payment_type'] && '103' !== $order_reference ['gateway_status'] ) { + /* translators: %1$s: date */ + $request_param['message'] = PHP_EOL . sprintf( __( 'The transaction has been canceled on %1$s.', 'edd-novalnet' ), edd_novalnet_formatted_date() ); + + // Update order comments. + $order_status = $edd_options['novalnet_onhold_cancel_status']; + EDD()->session->set( 'novalnet_transaction_comments', $request_param['message'] ); + edd_update_payment_status( $order_reference['order_no'], $order_status ); + $this->update_comments( $order_reference, $request_param['message'] ); + + // Update gateway status. + $wpdb->update( + $wpdb->prefix . 'novalnet_transaction_detail', + array( + 'gateway_status' => $request_param['tid_status'], + ), + array( + 'order_no' => $order_reference['order_no'], + ) + ); // db call ok; no-cache ok. + + $this->send_notify_mail( array( 'comments' => $request_param['message'] ) ); + } + } + + /** + * Get order details + * + * @since 1.0.1 + * @access public + * @return array $order_ref Return order details to make callback success. + */ + public function get_order_reference() { + global $wpdb; + + $tid = isset( $this->ary_request_params['shop_tid'] ) ? $this->ary_request_params['shop_tid'] : $this->ary_request_params['tid']; + + $order_id = isset( $this->ary_request_params['order_no'] ) ? $this->ary_request_params['order_no'] : ''; + + // Get recurring details. + if ( isset( $this->ary_request_params['subs_billing'] ) && '1' === $this->ary_request_params['subs_billing'] || in_array( $this->ary_request_params['payment_type'], array( 'SUBSCRIPTION_STOP', 'SUBSCRIPTION_REACTIVATE' ), true ) ) { + $recurring_details = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}novalnet_subscription_details WHERE recurring_tid='%s'", $tid ), ARRAY_A ); + $order_id = isset( $recurring_details['order_no'] ) ? $recurring_details['order_no'] : ''; + } + + if ( ! empty( $order_id ) ) { + $order_ref = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}novalnet_transaction_detail WHERE tid=%s OR order_no=%s", $tid, $order_id ) ); + } else { + $order_ref = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}novalnet_transaction_detail WHERE tid=%s", $tid ) ); + } + return $order_ref; + } + + /** + * Handle communication failure transaction + * + * @param array $payment payment name. + */ + public function handle_communication_failure( $payment ) { + + global $edd_options, $wpdb; + + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options[ $payment . '_test_mode' ] ) || ! empty( $this->ary_request_params['test_mode'] ) ); + $key = ( isset( $this->ary_request_params['key'] ) && !empty( $this->ary_request_params['key'] ) ) ? $this->ary_request_params['key'] : !empty($this->ary_request_params['payment_id']) ? $this->ary_request_params['payment_id'] : '' ; + + $amount = str_replace('.', ',', sprintf('%.2f', $this->ary_request_params['amount'] / 100 ) ); + + if ( '100' === $this->ary_request_params ['status'] ) { + + update_post_meta( $this->ary_request_params['order_no'], '_edd_payment_gateway', $payment ); + update_post_meta( $this->ary_request_params['order_no'], '_nn_order_tid', $this->ary_request_params['tid'] ); + + $invoice_payments = array( 'novalnet_invoice', 'novalnet_prepayment' ); + + if ( in_array( $payment, $invoice_payments, true ) || ( 'novalnet_paypal' === $payment && ( '90' === $this->ary_request_params['tid_status'] || '85' === $this->ary_request_params['tid_status'] ) ) || ( 'novalnet_przelewy24' === $payment && '86' === $this->ary_request_params['tid_status'] ) || ( 'novalnet_cashpayment' === $payment ) ) { + update_post_meta( $this->ary_request_params['order_no'], '_nn_callback_amount', 0 ); + } else { + // Set the purchase to complete. + update_post_meta( $this->ary_request_params['order_no'], '_nn_callback_amount', get_post_meta( $this->ary_request_params['order_no'], '_edd_payment_total', true ) * 100 ); + } + + if ( in_array( $this->ary_request_params['tid_status'], array( '91', '99', '98', '85' ), true ) ) { + $final_order_status = $edd_options['novalnet_onhold_success_status']; + } elseif ( in_array( $this->ary_request_params['tid_status'], array( '75', '90', '86' ), true ) ) { + $final_order_status = $edd_options[ $payment . '_order_pending_status' ]; + } else { + $final_order_status = $edd_options[ $payment . '_order_completion_status' ]; + if ( '41' === $key ) { + $final_order_status = $edd_options[ $payment . '_order_callback_status' ]; + } + } + $novalnet_comments = ''; + $novalnet_comments .= novalnet_form_transaction_details( $this->ary_request_params, $test_mode ); + if ( in_array( $payment, $invoice_payments, true ) ) { + $novalnet_comments = novalnet_get_invoice_comments( $this->ary_request_params, $payment, $amount, $novalnet_comments, true, true ); + } + + if ( $payment === 'novalnet_cashpayment' ) { + $novalnet_comments .= cashpayment_order_comments( $this->ary_request_params ); + } + + $this->ary_request_params['amount'] = $amount; + update_transaction_details( $this->ary_request_params, $payment ); + + $novalnet_comments = html_entity_decode( $novalnet_comments, ENT_QUOTES, 'UTF-8' ); + // Update Novalnet Transaction details into payment note. + $post_comments = get_post( $edd_options ); + $post_comments->post_excerpt .= $novalnet_comments; + // Update Novalnet Transaction details into shop database. + wp_update_post( + array( + 'ID' => $this->ary_request_params['order_no'], + 'post_excerpt' => $novalnet_comments, + ) + ); + EDD()->session->set( 'novalnet_transaction_comments', $novalnet_comments ); + edd_update_payment_status( $this->ary_request_params['order_no'], $final_order_status ); + edd_insert_payment_note( $this->ary_request_params['order_no'], $novalnet_comments ); + if ( 'publish' !== $final_order_status || ! empty( $this->ary_request_params['subs_id'] ) ) { + edd_trigger_purchase_receipt( $this->ary_request_params['order_no'] ); + } + } else { + + update_post_meta( $this->ary_request_params['order_no'], '_edd_payment_gateway', $payment ); + update_post_meta( $this->ary_request_params['order_no'], '_nn_order_tid', $this->ary_request_params['tid'] ); + + $novalnet_comments = ''; + $novalnet_comments .= novalnet_form_transaction_details( $this->ary_request_params, $test_mode ); + $novalnet_comments .= ( isset( $this->ary_request_params['status_text'] ) ? $this->ary_request_params['status_text'] : ( isset( $this->ary_request_params['status_desc'] ) ? $this->ary_request_params['status_desc'] : $this->ary_request_params['status_message'] ) ); + + $this->ary_request_params['amount'] = $amount; + update_transaction_details( $this->ary_request_params, $payment ); + + $novalnet_comments = html_entity_decode( $novalnet_comments, ENT_QUOTES, 'UTF-8' ); + // Update Novalnet Transaction details into payment note. + $post_comments = get_post( $edd_options ); + $post_comments->post_excerpt .= $novalnet_comments; + // Update Novalnet Transaction details into shop database. + wp_update_post( + array( + 'ID' => $this->ary_request_params['order_no'], + 'post_excerpt' => $novalnet_comments, + ) + ); + EDD()->session->set( 'novalnet_transaction_comments', $novalnet_comments ); + edd_update_payment_status( $this->ary_request_params['order_no'], 'abandoned' ); + edd_insert_payment_note( $this->ary_request_params['order_no'], $novalnet_comments ); + } + self::debug_error( $novalnet_comments ); + } + + /** + * Get given payment_type level for process + * + * @since 1.0.1 + * @access public + */ + public function get_payment_type_level() { + if ( ! empty( $this->ary_request_params ) ) { + if ( in_array( $this->ary_request_params['payment_type'], $this->ary_payments, true ) ) { + return 0; + } elseif ( in_array( $this->ary_request_params['payment_type'], $this->ary_chargebacks, true ) ) { + return 1; + } elseif ( in_array( $this->ary_request_params['payment_type'], $this->ary_collection, true ) ) { + return 2; + } + } + return false; + } + + /** + * Get request param from post + * + * @since 1.0.1 + * @access public + */ + public function get_requested_params() { + return $this->ary_request_params; + } + + /** + * Error message + * + * @since 1.0.1 + * @access public + * @param string $message Print if the error persist while running. + */ + public function debug_error( $message = 'Authentication Failed!' ) { + wp_die( + wp_kses( $message, array() ), + 'Novalnet Callback', + array( + 'response' => '200', + ) + ); + wp_die( + '', + 'Novalnet Callback', + array( + 'response' => '200', + ) + ); + } + + /** + * Creation for order for each recurring process + * + * @since 1.0.2 + * @access public + * @param string $subscription_id Get subscription order. + * @param array $request_param Get post parent order. + */ + public function recurring_order_creation( $subscription_id, $request_param ) { + global $wpdb, $test_mode, $edd_options,$order_reference; + $recurring_order = ''; + $subscription = new EDD_Subscription( $subscription_id ); + $recurring_method = get_post_meta( $subscription->parent_payment_id, '_edd_payment_gateway', true ); + $trans_details = $wpdb->get_row( $wpdb->prepare( "SELECT termination_reason FROM {$wpdb->prefix}novalnet_subscription_details WHERE order_no=%s", $subscription->parent_payment_id ), ARRAY_A ); // db call ok; no-cache ok. + $edd_recurring_version = preg_replace( '/[^0-9.].*/', '', get_option( 'edd_recurring_version' ) ); + $get_times_billed = ( version_compare($edd_recurring_version, '2.6', '<') ) ? $subscription->get_total_payments() : $subscription->get_times_billed(); + + if ( ( ( ( $get_times_billed < $subscription->bill_times ) && 0 !== $subscription->bill_times ) || '0' === $subscription->bill_times ) && empty( $trans_details['termination_reason'] ) ) { + + // When a user makes a recurring payment. + $subscription->add_payment( + array( + 'amount' => $subscription->recurring_amount, + 'transaction_id' => $subscription->transaction_id, + 'gateway' => $recurring_method, + ) + ); + + $subscription->renew(); + $recurring_order = $this->get_recurring_order( $subscription ); + update_post_meta( $recurring_order, '_nn_order_tid', $request_param['tid'] ); + update_post_meta( $recurring_order, '_edd_payment_total', $request_param['amount'] / 100 ); + update_post_meta( $recurring_order, '_edd_payment_transaction_id', $recurring_order ); + $trans_details = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}novalnet_transaction_detail WHERE order_no=%s", $subscription->parent_payment_id ), ARRAY_A ); // db call ok; no-cache ok. + update_post_meta( $request_param['tid'], '_order_total', $request_param['amount'] / 100 ); + update_post_meta( $subscription->parent_payment_id, '_nn_customer_id', $trans_details['product_id'] . '-' . $subscription->customer->user_id ); + + $wpdb->insert( + "{$wpdb->prefix}novalnet_transaction_detail", + array( + 'order_no' => $recurring_order, + 'vendor_id' => $trans_details['vendor_id'], + 'auth_code' => $trans_details['auth_code'], + 'product_id' => $trans_details['product_id'], + 'tariff_id' => $trans_details['tariff_id'], + 'payment_id' => $trans_details['payment_id'], + 'payment_type' => $recurring_method, + 'tid' => $request_param['tid'], + 'subs_id' => ! empty( $trans_details['subs_id'] ) ? $trans_details['subs_id'] : '', + 'amount' => $request_param['amount'], + 'callback_amount' => ( 'INVOICE_START' == $request_param['payment_type'] ) ? 0 : $request_param['amount'], + 'currency' => $trans_details['currency'], + 'gateway_status' => ! empty( $request_param['tid_status'] ) ? $request_param['tid_status'] : '', + 'test_mode' => $request_param['test_mode'], + 'customer_id' => $subscription->customer->user_id, + 'customer_email' => $subscription->customer->email, + 'date' => gmdate( 'Y-m-d H:i:s' ), + ) + ); // db call ok; no-cache ok. + $novalnet_comments = novalnet_form_transaction_details( $request_param, $request_param['test_mode'] ); + + if ( 'INVOICE_START' === $request_param['payment_type'] ) { + $request_param['order_no'] = $recurring_order; + $novalnet_comments = novalnet_get_invoice_comments( $request_param, $recurring_method, sprintf( '%0.2f', ( $request_param['amount'] / 100 ) ), $novalnet_comments, true, true ); + $ary_set_null_value = array( 'invoice_bankname', 'due_date', 'invoice_bankplace', 'invoice_iban', 'invoice_bic' ); + foreach ( $ary_set_null_value as $value ) { + if ( ! isset( $request_param[ $value ] ) ) { + $request_param[ $value ] = ''; + } + } + }// End if. + + $next_payment_date = ''; + $edd_recurring_version = preg_replace( '/[^0-9.].*/', '', get_option( 'edd_recurring_version' ) ); + $get_times_billed = ( version_compare($edd_recurring_version, '2.6', '<') ) ? $subscription->get_total_payments() : $subscription->get_times_billed(); + if ( ( ! empty( $request_param['paid_until'] ) || ! empty( $request_param['next_subs_cycle'] ) ) && $get_times_billed !== $subscription->bill_times ) { + $next_payment_date = __( 'Next charging date: ', 'edd-novalnet' ) . date_i18n( get_option( 'date_format' ), strtotime( ! empty( $request_param['next_subs_cycle'] ) ? $request_param['next_subs_cycle'] : $request_param['paid_until'] ) ); + } + /* translators: %1$s: parent tid, %2$s: amount, %3$s: date, %4$s: tid */ + $callback_comments = PHP_EOL . sprintf( __( 'Subscription has been successfully renewed for the TID: %1$s with the amount %2$s on %3$s. The renewal TID is: %4$s', 'edd-novalnet' ), $request_param['shop_tid'], edd_currency_filter( edd_format_amount( $request_param ['amount'] / 100 ) ), date_i18n( get_option( 'date_format' ), strtotime( gmdate( 'Y-m-d' ) ) ), $request_param['tid'] ) . PHP_EOL; + update_post_meta( $recurring_order, '_nn_invoice_comments', $novalnet_comments . PHP_EOL . $next_payment_date ); + update_post_meta( $recurring_order, '_payment_method', $recurring_method ); + update_post_meta( $recurring_order, '_nn_version', NOVALNET_VERSION ); + edd_insert_payment_note( $recurring_order, $novalnet_comments . $callback_comments . $next_payment_date ); + if(!empty($request_param['next_subs_cycle'])) { + $wpdb->update( + $wpdb->prefix . 'novalnet_subscription_details', + array( + 'next_payment_date' => date('Y-m-d',strtotime( $request_param['next_subs_cycle'] )), + ), + array( + 'order_no' => $order_reference['order_no'], + ) + ); + } // db call ok; no-cache ok. + // Set the renewal order status. + $final_order_status = 'edd_subscription'; + + $exist_comments = $wpdb->get_var( $wpdb->prepare( "SELECT post_excerpt FROM {$wpdb->posts} where ID =%s", $recurring_order ) ); // db call ok; no-cache ok. + + $add_comments = $exist_comments . PHP_EOL . $novalnet_comments . PHP_EOL; + EDD()->session->set( 'novalnet_transaction_comments', $add_comments ); + $nn_order_notes = array( + 'ID' => $recurring_order, + 'post_excerpt' => $exist_comments . PHP_EOL . $novalnet_comments . PHP_EOL . $callback_comments . PHP_EOL . $next_payment_date, + ); + $novalnet_comments = str_replace( '\n', '', $nn_order_notes ); + wp_update_post( $novalnet_comments ); + if ( 'publish' !== $final_order_status ) { + edd_trigger_purchase_receipt( $recurring_order ); + } + $edd_recurring_version = preg_replace( '/[^0-9.].*/', '', get_option( 'edd_recurring_version' ) ); + $get_times_billed = ( version_compare($edd_recurring_version, '2.6', '<') ) ? $subscription->get_total_payments() : $subscription->get_times_billed(); + if ( $get_times_billed === $subscription->bill_times && '0' !== $subscription->bill_times ) { + // Cancel subscription in Novalnet server. + $this->perform_subscription_cancel( $request_param ); + $wpdb->update( + $wpdb->prefix . 'novalnet_subscription_details', + array( + 'termination_reason' => 'Others', + 'termination_at' => gmdate( 'Y-m-d H:i:s' ), + ), + array( + 'order_no' => $subscription->parent_payment_id, + ) + ); // db call ok; no-cache ok. + } + EDD()->session->set( 'novalnet_transaction_comments', $nn_order_notes['post_excerpt'] ); + + edd_update_payment_status( $recurring_order, $final_order_status ); + + $this->send_notify_mail( array( 'comments' => $callback_comments . PHP_EOL . $next_payment_date ) ); + } else { + self::debug_error( sprintf( __( 'The subscription has been already stopped or cancelled', 'edd-novalnet' ) ) ); + }// End if. + } + + /** + * Process Recurring subscription order id + * + * @since 1.0.2 + * @param array $subscription Get child payment count. + */ + public function get_recurring_order( $subscription ) { + foreach ( $subscription->get_child_payments() as $value ) { + return $value->ID; + } + } + + /** + * Process subscription cancel + * + * @since 1.0.2 + * @access public + * @param array $request_param Get post params to be processed. + */ + public function perform_subscription_cancel( $request_param ) { + global $wpdb; + $trans_details = $wpdb->get_row( $wpdb->prepare( "SELECT auth_code,product_id,tariff_id,payment_id FROM {$wpdb->prefix}novalnet_transaction_detail WHERE tid=%s", $request_param ['shop_tid'] ), ARRAY_A ); // db call ok; no-cache ok. + $cancel_request = array( + 'vendor' => $request_param ['vendor_id'], + 'auth_code' => $trans_details ['auth_code'], + 'product' => $trans_details ['product_id'], + 'tariff' => $trans_details ['tariff_id'], + 'key' => $trans_details ['payment_id'], + 'tid' => $request_param ['shop_tid'], + 'cancel_sub' => 1, + 'cancel_reason' => __( 'Other', 'edd-novalnet' ), + 'lang' => novalnet_shop_language(), + 'remote_ip' => novalnet_server_addr(), + ); + novalnet_submit_request( $cancel_request ); + } + + /** + * Process subscription cancel + * + * @since 1.0.2 + * @access public + * @param array $request_param Get post params to be processed. + */ + public function perform_subscription_stop_request( $request_param ) { + global $wpdb, $order_reference; + $sub_billing = !empty($request_param['subs_billing']) ? $request_param['subs_billing'] : '0'; + $subs_billing_check = ( '1' == $sub_billing || '0' == $sub_billing); + + if ( ( $subs_billing_check && in_array( $request_param ['payment_type'], array( 'SUBSCRIPTION_STOP', 'TRANSACTION_CANCELLATION' ), true ) ) || ( $subs_billing_check && '100' !== $request_param['status'] && in_array( $request_param ['payment_type'], array( 'SUBSCRIPTION_STOP', 'TRANSACTION_CANCELLATION' ), true )) ) { + + /* translators: %1$s: tid, %2$s: date, %3$s: reason */ + if($request_param ['payment_type'] == 'TRANSACTION_CANCELLATION') + { + $request_param['callback_comments'] = PHP_EOL . sprintf( __( 'The transaction has been canceled on %1$s.', 'edd-novalnet' ),date_i18n( get_option( 'date_format' ), strtotime( gmdate( 'Y-m-d' ) ) ) ) . PHP_EOL; + edd_update_payment_status( $order_reference['order_no'], 'abandoned' ); + } + else + { + $request_param['callback_comments'] = PHP_EOL . sprintf( __( 'Subscription has been stopped for the TID: %1$s on %2$s.', 'edd-novalnet' ), $request_param['signup_tid'], date_i18n( get_option( 'date_format' ), strtotime( gmdate( 'Y-m-d' ) ) ) ) . PHP_EOL; + } + // subscription cancel reason + $cancel_reason = ''; + if(!empty($request_param['termination_reason'])) + { + $cancel_reason = PHP_EOL . sprintf( __('Subscription has been canceled due to: %1$s'),$request_param['termination_reason']).PHP_EOL; + $request_param['callback_comments'] .= $cancel_reason; + } + edd_insert_payment_note( $order_reference['order_no'], $request_param['callback_comments'] ); + $exist_comments = $wpdb->get_var( $wpdb->prepare( "SELECT post_excerpt FROM $wpdb->posts where ID =%s", $order_reference['order_no'] ) ); // db call ok; no-cache ok. + + $nn_order_notes = array( + 'ID' => $order_reference['order_no'], + 'post_excerpt' => $exist_comments . $request_param['callback_comments'], + ); + $wpdb->update( + $wpdb->prefix . 'novalnet_subscription_details', + array( + 'termination_reason' => $cancel_reason, + 'termination_at' => gmdate( 'Y-m-d H:i:s' ), + ), + array( + 'order_no' => $order_reference['order_no'], + ) + ); // db call ok; no-cache ok. + + wp_update_post( $nn_order_notes ); + $subscription_details = get_subscription_details( $order_reference['order_no'] ); + if ( isset( $subscription_details['subs_plugin_enabled'] ) ) { + $subscription = new EDD_Subscription( $subscription_details['subs_id'] ); + $subscription->cancel(); + } + EDD()->session->set( 'novalnet_transaction_comments', $request_param['callback_comments'] ); + // Cancel subscription in Novalnet server. + $this->send_notify_mail( array( 'comments' => $request_param['callback_comments'] ) ); + $this->debug_error( $request_param['callback_comments'] ); + } + } + + /** + * Process subscription cancel + * + * @since 1.1.3 + * @param array $request_param Get post params to be processed. + */ + public function perform_subscription_reactivation_request( $request_param ) { + + global $wpdb, $order_reference, $edd_options, $payment_gateway; + $subscription_details = get_subscription_details( $order_reference['order_no'] ); + if ( isset( $subscription_details['subs_plugin_enabled'] ) ) { + $subscription = new EDD_Subscription( $subscription_details['subs_id'] ); + } + if ( 'SUBSCRIPTION_REACTIVATE' === $request_param['payment_type'] && ('100' === $request_param['status'] || ( '100' !== $request_param['status'] && ! empty( $request_param['subs_billing'] ) ) )) { + $wpdb->update( + $wpdb->prefix . 'novalnet_subscription_details', + array( + 'termination_reason' => '', + 'termination_at' => '', + ), + array( + 'order_no' => $order_reference['order_no'], + ) + ); + $next_payment_date = ! empty( $request_param['next_subs_cycle'] ) ? $request_param['next_subs_cycle'] : $request_param['paid_until']; + /* translators: %1$s: tid, %2$s: date, %3$s: date */ + $request_param['callback_comments'] = PHP_EOL . sprintf( __( 'Subscription has been reactivated for the TID: %1$s on %2$s.', 'edd-novalnet' ), $request_param['signup_tid'], date_i18n( get_option( 'date_format' ), strtotime( gmdate( 'Y-m-d' ) ) ) ) . PHP_EOL; + $wpdb->update( + $wpdb->prefix . 'edd_subscriptions', + array( + 'status' => 'active', + 'expiration' => $next_payment_date, + ), + array( + 'parent_payment_id' => $subscription->parent_payment_id, + ) + ); // db call ok; no-cache ok. + edd_insert_payment_note( $order_reference['order_no'], $request_param['callback_comments'] ); + $exist_comments = $wpdb->get_var( $wpdb->prepare( "SELECT post_excerpt FROM $wpdb->posts where ID =%s", $order_reference['order_no'] ) ); + $nn_order_notes = array( + 'ID' => $order_reference['order_no'], + 'post_excerpt' => $exist_comments . $request_param['callback_comments'], + ); + EDD()->session->set( 'novalnet_transaction_comments', $request_param['callback_comments'] ); + // Reactive subscription in Novalnet server. + edd_update_payment_status( $order_reference['order_no'], $edd_options[ $payment_gateway . '_order_completion_status' ] ); + wp_update_post( $nn_order_notes ); + $this->send_notify_mail( array( 'comments' => $request_param['callback_comments'] ) ); + $this->debug_error( $request_param['callback_comments'] ); + } + } + + /** + * Initial level process + * + * @since 1.0.2 + * @param array $request_param Get post params to be processed. + */ + public function zero_level_process( $request_param ) { + global $wpdb, $edd_options, $payment_gateway, $order_reference, $callback_amount, $org_amount, $payment_level; + + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options[ $payment_gateway . '_test_mode' ] ) || ! empty( $this->ary_request_params['test_mode'] ) ); + + if ( 0 === $payment_level ) { + // Process recurring order for the parent order. + if ( ! empty( $request_param['subs_billing'] ) && '1' === $request_param['subs_billing'] ) { + $subscription_details = get_subscription_details( $order_reference['order_no'] ); + if ( isset( $subscription_details['subs_plugin_enabled'] ) ) { + $response = $this->recurring_order_creation( $subscription_details['subs_id'], $request_param ); + $this->debug_error( $response ); + } + } elseif ( in_array( $request_param['payment_type'], array( 'GUARANTEED_INVOICE', 'INVOICE_START', 'DIRECT_DEBIT_SEPA', 'GUARANTEED_DIRECT_DEBIT_SEPA', 'CREDITCARD', 'PAYPAL' ), true ) && in_array( $request_param['tid_status'], array( '100', '91', '99' ), true ) && '100' === $request_param['status'] && in_array( $order_reference['gateway_status'], array( '75', '91', '99', '85', '98' ), true ) && $request_param['tid_status'] !== $order_reference['gateway_status'] ) { + /* translators: %1$s: date */ + $request_param['message'] = PHP_EOL . sprintf( __( 'The transaction has been confirmed on %1$s', 'edd-novalnet' ), edd_novalnet_formatted_date() ) . PHP_EOL; + $order_status = ( 'GUARANTEED_INVOICE' === $request_param['payment_type'] ) ? $edd_options[ $payment_gateway . '_order_callback_status' ] : $edd_options[ $payment_gateway . '_order_completion_status' ]; + if ( '75' === $order_reference['gateway_status'] && in_array( $request_param['tid_status'], array( '91', '99' ), true ) ) { + $order_status = $edd_options['novalnet_onhold_success_status']; + /* translators: %1$s: tid, %2$s: date */ + $request_param['message'] = PHP_EOL . sprintf( __( 'The transaction status has been changed from pending to on-hold for the TID: %1$s on %2$s.', 'edd-novalnet' ), $request_param['tid'], edd_novalnet_formatted_date() ) . PHP_EOL; + } + if ( in_array( $request_param['payment_type'], array( 'INVOICE_START', 'GUARANTEED_INVOICE' ), true ) && in_array( $order_reference['gateway_status'], array( '75', '91' ), true ) && in_array( $request_param['tid_status'], array( '91', '100' ) ) ) { + $request_param['order_no'] = $order_reference['order_no']; + $request_param['message'] .= novalnet_get_invoice_comments( $request_param, $payment_gateway, $org_amount, '', true, true ); + } + $wpdb->update( + $wpdb->prefix . 'novalnet_transaction_detail', + array( + 'gateway_status' => $request_param['tid_status'], + ), + array( + 'order_no' => $order_reference['order_no'], + ) + ); // db call ok; no-cache ok. + EDD()->session->set( 'novalnet_transaction_comments', $request_param['message'] ); + edd_update_payment_status( $order_reference['order_no'], $order_status ); + + $this->update_comments( $order_reference, $request_param['message'] ); + + $this->send_notify_mail( array( 'comments' => $request_param['message'] ) ); + } else if ( in_array( $request_param['payment_type'], array( 'PAYPAL', 'PRZELEWY24' ), true ) && ( '100' === $request_param['tid_status'] ) ) { + + if ( $callback_amount < $org_amount ) { + update_post_meta( $order_reference['order_no'], '_nn_callback_amount', $org_amount ); + /* translators: %1$s: tid, %2$s: amount, %3$s: date */ + $request_param['message'] = PHP_EOL . sprintf( __( 'Transaction updated successfully for the TID: %1$s on %2$s.', 'edd-novalnet' ), $request_param['shop_tid'], gmdate( 'Y-m-d H:i:s' ) ) . PHP_EOL; + $wpdb->update( + $wpdb->prefix . 'novalnet_transaction_detail', + array( + 'gateway_status' => '100', + ), + array( + 'order_no' => $order_reference['order_no'], + ) + ); // db call ok; no-cache ok. + + $status = ( ( '90' === $request_param['tid_status'] || '85' === $request_param['tid_status'] ) ? $edd_options[ $payment_gateway . '_order_pending_status' ] : ( ( '100' === $request_param['tid_status'] ) ? $edd_options[ $payment_gateway . '_order_completion_status' ] : '' ) ); + EDD()->session->set( 'novalnet_transaction_comments', $request_param['message'] ); + edd_update_payment_status( $order_reference['order_no'], $status ); + $this->update_comments( $order_reference, $request_param['message'] ); + + $this->send_notify_mail( array( 'comments' => $request_param['message'] ) ); + } else { + $this->debug_error( 'Order already Paid.' ); + } + } elseif ( 'PRZELEWY24' === $request_param['payment_type'] && ( '100' !== $request_param['tid_status'] || '100' !== $request_param['status'] ) ) { + // Przelewy24 cancel. + if ( '86' === $request_param['tid_status'] ) { + $this->debug_error( 'Payment type ( ' . $request_param['payment_type'] . ' ) is not applicable for this process!' ); + } + $cancellation_msg = get_status_desc( $request_param ); + /* translators: %s: reason */ + $request_param['message'] = PHP_EOL . sprintf( __( 'The transaction has been canceled due to: %s', 'edd-novalnet' ), $cancellation_msg ) . PHP_EOL; + + $wpdb->update( + $wpdb->prefix . 'novalnet_transaction_detail', + array( + 'gateway_status' => $request_param['tid_status'], + ), + array( + 'order_no' => $order_reference['order_no'], + ) + ); // db call ok; no-cache ok. + EDD()->session->set( 'novalnet_transaction_comments', $request_param['message'] ); + edd_update_payment_status( $order_reference['order_no'], 'abandoned' ); + $this->update_comments( $order_reference, $request_param['message'] ); + + $this->send_notify_mail( array( 'comments' => $request_param['message'] ) ); + } else { + $this->debug_error( 'Payment type ( ' . $request_param['payment_type'] . ' ) is not applicable for this process!' ); + }// End if. + }// End if. + } + + /** + * First level process + * + * @since 1.0.2 + * @param array $request_param Get post params to be processed. + */ + public function first_level_process( $request_param ) { + global $order_reference, $payment_level; + + if ( 1 === $payment_level && '100' === $request_param['status'] && '100' === $request_param['tid_status'] ) { + + if ( in_array( $request_param['payment_type'], array( 'CREDITCARD_BOOKBACK', 'GUARANTEED_INVOICE_BOOKBACK', 'GUARANTEED_SEPA_BOOKBACK', 'PAYPAL_BOOKBACK', 'REFUND_BY_BANK_TRANSFER_EU', 'PRZELEWY24_REFUND', 'CASHPAYMENT_REFUND' ), true ) ) { + /* translators: %1$s: parent tid, %2$s: amount, %3$s: tid */ + $request_param['message'] = PHP_EOL . sprintf( __( 'Refund has been initiated for the TID: %1$s with the amount %2$s. New TID: %3$s.', 'edd-novalnet' ), $request_param['shop_tid'], edd_currency_filter( edd_format_amount( $request_param ['amount'] / 100 ) ), $request_param['tid'] ) . PHP_EOL; + } else if ( 'RETURN_DEBIT_SEPA' === $request_param['payment_type'] ) { + /* translators: %1$s: parent tid, %2$s: amount, %3$s: date, %4$s: tid */ + $request_param['message'] = PHP_EOL . sprintf( __( 'Chargeback executed for return debit of TID:%1$s with the amount %2$s on %3$s. The subsequent TID: %4$s.', 'edd-novalnet' ),$request_param['shop_tid'], edd_currency_filter( edd_format_amount( $request_param ['amount'] / 100 ) ), gmdate( 'Y-m-d H:i:s' ), $request_param['tid'] ) . PHP_EOL; + } else if ( 'REVERSAL' === $request_param['payment_type'] ) { + /* translators: %1$s: parent tid, %2$s: amount, %3$s: date, %4$s: tid */ + $request_param['message'] = PHP_EOL . sprintf( __( 'Chargeback executed for reversal of TID: %1$s with the amount %2$s on %3$s. The subsequent TID: %4$s.', 'edd-novalnet' ), $request_param['shop_tid'], edd_currency_filter( edd_format_amount( $request_param ['amount'] / 100 ) ), gmdate( 'Y-m-d H:i:s' ), $request_param['tid'] ) . PHP_EOL; + } else { + /* translators: %1$s: parent tid, %2$s: amount, %3$s: date, %4$s: tid */ + $request_param['message'] = PHP_EOL . sprintf( __( 'Chargeback executed successfully for the TID: %1$s amount: %2$s on %3$s. The subsequent TID: %4$s.', 'edd-novalnet' ), $request_param['shop_tid'], edd_currency_filter( edd_format_amount( $request_param ['amount'] / 100 ) ), gmdate( 'Y-m-d H:i:s' ), $request_param['tid'] ) . PHP_EOL; + } + + edd_update_payment_status( $order_reference['order_no'], 'refunded' ); + $this->update_comments( $order_reference, $request_param['message'] ); + $this->send_notify_mail( array( 'comments' => $request_param['message'] ) ); + } + } + + /** + * Second level process + * + * @since 1.0.2 + * @param array $request_param Get post params to be processed. + */ + public function second_level_process( $request_param ) { + global $wpdb, $order_reference, $payment_level, $callback_amount, $org_amount, $sum_amount, $payment_gateway, $edd_options; + + if ( 2 === $payment_level && '100' === $request_param['status'] && '100' === $request_param['tid_status'] ) { + + $novalnet_comments = ''; + if ( in_array( $request_param['payment_type'], array( 'INVOICE_CREDIT', 'CASHPAYMENT_CREDIT', 'ONLINE_TRANSFER_CREDIT' ) ) ) { + if ( $callback_amount < $org_amount ) { + /* translators: %1$s: parent tid, %2$s: amount, %3$s: date, %4$s: tid */ + $request_param['message'] = PHP_EOL . sprintf( __( 'Credit has been successfully received for the TID: %1$s with amount %2$s on %3$s . Please refer PAID order details in our Novalnet Admin Portal for the TID: %4$s ', 'edd-novalnet' ), $request_param['shop_tid'], edd_currency_filter( edd_format_amount( $request_param ['amount'] / 100 ) ), gmdate( 'Y-m-d H:i:s' ), $request_param['tid'] ) . PHP_EOL; + + if ( 'ONLINE_TRANSFER_CREDIT' === $request_param['payment_type'] ) { + $request_param['message'] = PHP_EOL . sprintf( __( 'Credit has been successfully received for the TID: %1$s with amount %2$s on %3$s . Please refer PAID order details in our Novalnet Admin Portal for the TID: %4$s ', 'edd-novalnet' ), $request_param['shop_tid'], edd_currency_filter( edd_format_amount( $request_param ['amount'] / 100 ) ), gmdate( 'Y-m-d H:i:s' ), $request_param['tid'] ) . PHP_EOL; + } + + update_post_meta( $order_reference['order_no'], '_nn_callback_amount', $sum_amount ); + $wpdb->update( + $wpdb->prefix . 'novalnet_transaction_detail', + array( + 'callback_amount' => $sum_amount, + ), + array( + 'order_no' => $order_reference['order_no'], + ) + ); // db call ok; no-cache ok. + + $this->update_comments( $order_reference, $request_param['message'] ); + if ( $sum_amount >= (int) $org_amount ) { + EDD()->session->set( 'novalnet_transaction_comments', $request_param['message'] ); + edd_update_payment_status( $order_reference['order_no'], $edd_options[ $payment_gateway . '_order_callback_status' ] ); + } + $this->send_notify_mail( array( 'comments' => $request_param['message'] ) ); + }// End if. + $this->debug_error( 'Callback script executed already. Refer order: ' . $order_reference['order_no'] ); + }// End if. + else { + /* translators: %1$s: parent tid, %2$s: amount, %3$s: date, %4$s: tid */ + $request_param['message'] = PHP_EOL . sprintf( __( 'Credit has been successfully received for the TID: %1$s with amount %2$s on %3$s . Please refer PAID order details in our Novalnet Admin Portal for the TID: %4$s ', 'edd-novalnet' ), $request_param['shop_tid'], edd_currency_filter( edd_format_amount( $request_param ['amount'] / 100 ) ), gmdate( 'Y-m-d H:i:s' ), $request_param['tid'] ) . PHP_EOL; + // Update order comments. + $this->update_comments( $order_reference, $request_param['message'] ); + // Send notification mail to the configured E-mail. + $this->send_notify_mail( array( 'comments' => $request_param['message'] ) ); + } + $this->debug_error( 'Payment type ( ' . $request_param['payment_type'] . ') is not applicable for this process!' ); + }// End if. + } + + /** + * Update comments + * + * @since 1.0.2 + * @param array $order_reference Get post id. + * @param array $message Get message form payment processed. + * @param string $insert_payment_note Insert payment note. + */ + public function update_comments( $order_reference, $message, $insert_payment_note = true ) { + global $wpdb; + if ( $insert_payment_note ) { + edd_insert_payment_note( $order_reference['order_no'], $message ); + } + $comments = $wpdb->get_var( $wpdb->prepare( "SELECT post_excerpt FROM {$wpdb->posts} where ID =%s", $order_reference['order_no'] ) ); // db call ok; no-cache ok. + + $order_notes = array( + 'ID' => $order_reference['order_no'], + 'post_excerpt' => $comments . $message, + ); + wp_update_post( $order_notes ); + } + + /** + * Update comments + * + * @since 1.0.2 + * @param array $request_param Get all post params. + * @param array $order_reference Get post id. + */ + public function get_payment_data( &$request_param, $order_reference ) { + + $payment_gateway = get_novalnet_payment( $order_reference ); + $request_param['currency'] = isset( $request_param['currency'] ) ? edd_currency_symbol( strtoupper( $request_param['currency'] ) ) : edd_get_currency(); + $callback_amount = get_post_meta( $order_reference, '_nn_callback_amount', true ); + $sum_amount = ( isset( $request_param['amount'] ) && ! empty( $request_param['amount'] ) ? (int)$request_param['amount'] : '0' ) + (int)$callback_amount; + $org_amount = round( get_post_meta( $order_reference, '_edd_payment_total', true ), 2 ) * 100; + $payment_level = $this->get_payment_type_level(); + return array( + $payment_gateway, + $callback_amount, + $sum_amount, + $org_amount, + $payment_level, + ); + } +} diff --git a/includes/class-novalnet-subscriptions.php b/includes/class-novalnet-subscriptions.php new file mode 100755 index 0000000..81d2dfb --- /dev/null +++ b/includes/class-novalnet-subscriptions.php @@ -0,0 +1,440 @@ +query_params = wp_unslash( $_REQUEST ); // Input var okay. + + // transction id and profile id are processed in back-end subscription order details. + add_action( 'edd_recurring_post_create_payment_profiles', array( $this, 'novalnet_create_payment_profiles' ) ); + + // cancel of a subscription product and sends request to server. + add_action( 'edd_cancel_subscription', array( $this, 'novalnet_process_cancellation' ) ); + + // status when not cancelled to be appear. + add_filter( 'edd_subscription_can_cancel', array( $this, 'novalnet_can_cancel' ), 10, 2 ); + + // Update payment method. + add_filter( 'edd_subscription_can_update', array( $this, 'can_update' ), 10, 2 ); + add_action( 'edd_recurring_update_payment_form', array( $this, 'update_payment_method_form' ), 10, 2 ); + add_action( 'edd_recurring_update_subscription_payment_method', array( $this, 'process_novalnet_payment_method_update' ), 10, 3 ); + + // adds custom url to both front-end and back-end. + add_filter( 'edd_subscription_cancel_url', array( $this, 'novalnet_cancel_url' ), 10, 2 ); + + // Subscription script access to cancel order and hide details in subscription order back-end. + add_action( 'wp_enqueue_scripts', array( $this, 'novalnet_subscription_enqueue_scripts' ), 10 ); + add_action( 'admin_enqueue_scripts', array( $this, 'novalnet_subscription_enqueue_scripts' ), 10 ); + + // Error notice to be displayed in back-end. + add_action( 'admin_notices', array( $this, 'novalnet_subscription_notices' ) ); + } + + /** + * Update payment method for subscription in Novalnet payments + * + * @param boolean $ret Show update payment option. + * @param object $subscription The subscription object. + * @return bool + */ + public function can_update( $ret, $subscription ) { + + global $wpdb; + + $order_data = $wpdb->get_row( $wpdb->prepare( "SELECT payment_id FROM {$wpdb->prefix}novalnet_transaction_detail WHERE order_no=%s", $subscription->parent_payment_id ), ARRAY_A ); // db call ok; no-cache ok. + + if ( ! $ret && novalnet_check_string( $subscription->gateway ) && edd_is_gateway_active( $subscription->gateway ) && ! empty( $subscription->profile_id ) && in_array( $subscription->status, array( 'active', 'trialling' ), true ) && ( isset($order_data['payment_id']) && ! in_array( $order_data['payment_id'], array( '41', '40' ), true ) ) ) { + return true; + } + return $ret; + } + + /** + * Display the payment form for update payment method + * + * @param object $subscription The subscription object. + * @return void + */ + public function update_payment_method_form( $subscription ) { + + global $edd_options; + + if ( novalnet_check_string( $subscription->gateway ) ) { + if ( in_array( $subscription->gateway, array( 'novalnet_invoice', 'novalnet_sepa', 'novalnet_prepayment', 'novalnet_cc', 'novalnet_paypal' ), true ) ) { + $class_name = ucwords( $subscription->gateway, '_' ); + $payment_obj = new $class_name(); + $payment_obj->display_form( true ); + } + EDD()->session->set( 'novalnet_update_payment_method', NULL ); + } + } + + /** + * Process the update payment form + * + * @param int $user_id User ID. + * @param int $subscription_id Subscription ID. + * @param bool $verified Sanity check that the request to update is coming from a verified source. + * @return void + */ + public function process_novalnet_payment_method_update( $user_id, $subscription_id, $verified ) { + + global $edd_options, $wpdb; + + $request = wp_unslash( $_POST ); + $subscription = new EDD_Subscription( $subscription_id ); + $subscriber = new EDD_Recurring_Subscriber( $subscription->customer_id ); + + if ( 1 !== $verified || empty( $subscription->id ) || empty( $subscriber->id ) || ( $user_id != $subscriber->user_id ) ) { + wp_die( __( 'Invalid subscription id', 'edd-novalnet' ) ); + } + if ( novalnet_check_string( $subscription->gateway ) ) { + + $customer_details = get_user_meta( $subscription->customer_id ); + $billing_details = isset( $customer_details['_edd_user_address'] ) ? unserialize( $customer_details['_edd_user_address'][0] ) : ''; + + // Update the customer details + add_filter( 'edd_purchase_form_required_fields', array( $this, 'purchase_form_required_fields' ), 10, 1 ); + $valid_data = edd_purchase_form_validate_fields(); + $customer_data = edd_get_purchase_form_user($valid_data); + + $subs_id = $wpdb->get_var( $wpdb->prepare( "SELECT subs_id FROM {$wpdb->prefix}novalnet_subscription_details WHERE order_no='%s'", $subscription->parent_payment_id ) ); + + $customer_id = get_post_meta( $subscription->parent_payment_id, '_nn_customer_id', true); + + if ( !empty($customer_id) ) { + $customer_id = $customer_id; + } else { + $customer_id = $subscription->customer_id; + } + + $params = array( + 'amount' => 0, + 'gender' => 'u', + 'customer_no' => $customer_id, + 'first_name' => $customer_data['user_first'], + 'last_name' => $customer_data['user_last'], + 'email' => $subscription->customer->email, + 'street' => ! empty( $customer_data['address']['line1'] ) ? $customer_data['address']['line1'] : $billing_details['line1'], + 'city' => ! empty( $customer_data['address']['city'] ) ? $customer_data['address']['city'] : $billing_details['city'], + 'zip' => ! empty( $customer_data['address']['zip'] ) ? $customer_data['address']['zip'] : $billing_details['zip'], + 'country_code' => ! empty( $customer_data['address']['country'] ) ? $customer_data['address']['country'] : $billing_details['country'], + 'country' => ! empty( $customer_data['address']['country'] ) ? $customer_data['address']['country'] : $billing_details['country'], + 'search_in_street' => 1, + 'create_payment_ref' => 1, + 'subs_py_update' => $subs_id, + 'order_no' => $subscription->parent_payment_id, + 'test_mode' => (int) ( edd_is_test_mode() || ! empty( $edd_options[ $subscription->gateway . '_test_mode' ] ) ), + ); + $params = array_merge( get_merchant_details( $subscription->gateway ), $params, novalnet_get_system_data() ); + + if ( in_array( $subscription->gateway, array( 'novalnet_invoice', 'novalnet_prepayment' ), true ) ) { + if ( 'novalnet_invoice' === $subscription->gateway ) { + $params['invoice_type'] = 'INVOICE'; + } else { + $params['invoice_type'] = 'PREPAYMENT'; + } + $params['invoice_ref'] = 'BNR-' . $params['product'] . '-' . $subscription->parent_payment_id; + } elseif ( 'novalnet_sepa' === $subscription->gateway ) { + if ( empty($request['novalnet_sepa_holder']) || empty($request['novalnet_sepa_iban']) ) { + edd_set_error( 'edd_recurring_novalnet', __( 'Your account details are invalid', 'edd-novalnet' ) ); + wp_safe_redirect( $subscription->get_update_url() ); + die(); + } + $params['bank_account_holder'] = $request['novalnet_sepa_holder']; + $params['iban'] = $request['novalnet_sepa_iban']; + } elseif ( 'novalnet_cc' === $subscription->gateway ) { + if ( empty( $request['novalnet_cc_hash'] ) || empty( $request['novalnet_cc_uniqueid'] ) ) { + edd_set_error( 'edd_recurring_novalnet', $request['novalnet_cc_error'] ); + wp_safe_redirect( $subscription->get_update_url() ); + die(); + } + $params['pan_hash'] = $request['novalnet_cc_hash']; + $params['unique_id'] = $request['novalnet_cc_uniqueid']; + } + + if ( ( 'novalnet_cc' === $subscription->gateway && 1 == $request['novalnet_cc_do_redirect'] )|| 'novalnet_paypal' === $subscription->gateway ) { + $paygate_url = ''; + if ( 'novalnet_cc' === $subscription->gateway) { + $paygate_url = 'https://payport.novalnet.de/pci_payport'; + if ( isset($edd_options['novalnet_cc_enforced_3d']) && $edd_options['novalnet_cc_enforced_3d'] == 'yes' ) { + $params['enforce_3d'] = 1; + } + } elseif ( 'novalnet_paypal' === $subscription->gateway ) { + $paygate_url = 'https://payport.novalnet.de/paypal_payport'; + } + + $home_url = wp_parse_url( home_url() ); + $current_uri = "{$home_url['scheme']}://{$home_url['host']}" . add_query_arg( NULL, NULL ); + + EDD()->session->set( 'novalnet_update_payment_method', true ); + $subs_update = array( 'update_payment' => true, + 'return_url' => $current_uri + ); + $redirect_params = novalnet_get_redirect_param( $subscription->gateway, $params, $subs_update ); + $params = array_merge( $params, $redirect_params ); + + // Redirect to the paygate url. + novalnet_get_redirect( $paygate_url, $params ); + } + + // Send the transaction request to the novalnet server. + $response = novalnet_submit_request( $params ); + + // Update the novalnet response to the shop. + novalnet_check_response( $response, true ); + } + } + + /** + * Validate required customer details + * + * @return array + */ + public function purchase_form_required_fields( $required_fields ) { + if ( ! empty( $required_fields ) ) { + unset( $required_fields['edd_email'], $required_fields['edd_first'] ); + } + return $required_fields; + } + + /** + * Subscription error notice + * + * @since 1.1.0 + */ + public function novalnet_subscription_notices() { + $get_error = wp_unslash( $_GET ); + if ( ( isset( $get_error['novalnet-message'] ) && ! empty( $get_error['novalnet-message'] ) ) || ( isset( $get_error['novalnet-error'] ) && ! empty( $get_error['novalnet-error'] ) ) ) { // Input var okay. + $message = ! empty( $get_error['novalnet-message'] ) ? $get_error['novalnet-message'] : $get_error['novalnet-error']; // Input var okay. + $code = ! empty( $get_error['novalnet-message'] ) ? 'updated' : 'error'; // Input var okay. + echo '' . esc_attr( $message ) . ''; + } + } + + /** + * Adding subscription script + * + * @since 1.1.0 + */ + public function novalnet_subscription_enqueue_scripts() { + + // Enqueue style & script. + wp_enqueue_script( 'edd-novalnet-subscription-script', NOVALNET_PLUGIN_URL . 'assets/js/novalnet-subscription.js', array( 'jquery' ), NOVALNET_VERSION, true ); + wp_enqueue_style( 'edd-novalnet-subscription-script', NOVALNET_PLUGIN_URL . 'assets/css/novalnet-checkout.css', array(), NOVALNET_VERSION, true ); + $params = array( + 'reason_list' => $this->novalnet_subscription_cancel_form(), // Display Subscription cancel reason. + 'admin' => is_admin(), + 'error_message' => __( 'Please select the reason for subscription cancellation', 'edd-novalnet' ), + 'novalnet_subs_cancel' => __( 'The subscription has been already stopped or cancelled', 'edd-novalnet' ), + ); + if ( is_admin() && ( ! empty( $_REQUEST['page'] ) && 'edd-subscriptions' === $_REQUEST['page'] && ! empty( $_REQUEST['id'] ) ) ) { // Input var okay. + $novalnet_subs = new EDD_Subscription( absint( $_REQUEST['id'] ) ); // Input var okay. + $params ['hide_backend_details'] = novalnet_check_string( $novalnet_subs->gateway ); + $params ['can_update'] = ( novalnet_check_string( $novalnet_subs->gateway ) && in_array( $novalnet_subs->status, array( 'cancelled', 'completed', 'expired', 'failing' ) ) ) ? 'true' : 'false'; + } + wp_localize_script( 'edd-novalnet-subscription-script', 'novalnet_subscription', $params ); + } + + /** + * Subscription cancellation reason form + * + * @since 1.1.0 + * @return string + */ + public function novalnet_subscription_cancel_form() { + $form = ' '; + + // Append subscription cancel reasons. + $form .= '' . __( '--Select--', 'edd-novalnet' ) . ''; + foreach ( novalnet_subscription_cancel_list() as $reason ) { + $form .= '' . $reason . ''; + } + $form .= ''; + return $form; + } + + /** + * Add novalnet values to subscription params + * + * @since 1.1.0 + * @param array $subscriptions Creates subscription details in core ID's. + */ + public function novalnet_create_payment_profiles( $subscriptions ) { + // Gateways loop through each download and creates a payment profile and then sets the profile ID. + $purchase_key = $subscriptions->purchase_data['purchase_key']; + $user_id = $subscriptions->purchase_data['user_info']['id']; + if ( novalnet_check_string( $subscriptions->purchase_data['gateway'] ) ) { + $subscriptions->offsite = true; + foreach ( $subscriptions->subscriptions as $key => $val ) { + $subscriptions->subscriptions[ $key ]['profile_id'] = md5( $purchase_key . $user_id ); + } + } + } + + /** + * Cancel process of a subscription + * + * @since 1.1.0 + * @param array $data Allows subscription params to form object. + */ + public function novalnet_process_cancellation( $data ) { + global $wpdb; + + $subscription = new EDD_Subscription( absint( $data['sub_id'] ) ); + if ( 'cancelled' !== $subscription->status ) { + $reason_id = isset( $this->query_params['novalnet_subscription_cancel_reason'] ) ? $this->query_params['novalnet_subscription_cancel_reason'] : 'Other'; + $result_set = $wpdb->get_row( $wpdb->prepare( "SELECT vendor_id, auth_code, product_id, tariff_id, payment_id,tid FROM {$wpdb->prefix}novalnet_transaction_detail WHERE order_no=%s ORDER BY id DESC", $subscription->parent_payment_id ), ARRAY_A ); // db call ok; no-cache ok. + $cancel_request = array( + 'vendor' => $result_set['vendor_id'], + 'auth_code' => $result_set['auth_code'], + 'product' => $result_set['product_id'], + 'tariff' => $result_set['tariff_id'], + 'tid' => $result_set['tid'], + 'key' => $result_set['payment_id'], + 'cancel_sub' => 1, + 'cancel_reason' => $reason_id, + 'lang' => novalnet_shop_language(), + ); + $cancel_response = novalnet_submit_request( $cancel_request ); + if ( '100' === $cancel_response['status'] ) { + /* translators: %s: Cancel reason */ + $cancel_msg = "\n" . sprintf( __( 'Subscription has been canceled due to: %s', 'edd-novalnet' ), $cancel_request['cancel_reason'] ); + edd_update_payment_status( $subscription->parent_payment_id, 'abandoned' ); + $wpdb->update( + $wpdb->prefix . 'novalnet_subscription_details', + array( + 'termination_reason' => $cancel_request['cancel_reason'], + 'termination_at' => gmdate( 'Y-m-d H:i:s' ), + ), + array( + 'order_no' => $subscription->parent_payment_id, + ) + ); // db call ok; no-cache ok. + $subscription->cancel(); + if ( is_admin() ) { + $url = add_query_arg( + array( + 'novalnet-message' => $cancel_request['cancel_reason'], + 'id' => $subscription->id, + ), + admin_url( 'edit.php?post_type=download&page=edd-subscriptions' ) + ); + } + } else { + $cancel_msg = ( isset( $cancel_response['status_text'] ) ? $cancel_response['status_text'] : ( isset( $cancel_response['status_desc'] ) ? $cancel_response['status_desc'] : '' ) ); + if ( is_admin() ) { + $url = add_query_arg( + array( + 'novalnet-error' => $cancel_msg, + 'id' => $subscription->id, + ), + admin_url( 'edit.php?post_type=download&page=edd-subscriptions' ) + ); + } + } + $result = $wpdb->get_results( $wpdb->prepare( "SELECT post_excerpt FROM {$wpdb->posts} where ID =%s", $subscription->parent_payment_id ) ); // db call ok; no-cache ok. + $exist_comments = $result[0]->post_excerpt; + $nn_order_notes = array( + 'ID' => $subscription->parent_payment_id, + 'post_excerpt' => $exist_comments . $cancel_msg, + ); + wp_update_post( $nn_order_notes ); + edd_insert_payment_note( $subscription->parent_payment_id, $cancel_msg ); + if ( isset( $cancel_msg ) && is_admin() ) { + echo '' . esc_html( $cancel_msg ) . ''; + } + }// End if(). + if ( is_admin() ) { + wp_safe_redirect( $url ); + exit; + } else { + wp_safe_redirect( + remove_query_arg( + array( '_wpnonce', 'edd_action', 'sub_id' ), + add_query_arg( + array( + 'edd-message' => 'cancelled', + ) + ) + ) + ); + exit; + } + } + + /** + * Cancel of a subscription based on status and Novalnet payments + * + * @since 1.1.0 + * @param string $can_cancel Show cancel option other than cancel status. + * @param array $subscriptions Params to cancel a subscription. + */ + public function novalnet_can_cancel( $can_cancel, $subscriptions ) { + $edd_recurring_version = preg_replace( '/[^0-9.].*/', '', get_option( 'edd_recurring_version' ) ); + $get_times_billed = ( version_compare($edd_recurring_version, '2.6', '<') ) ? $subscriptions->get_total_payments() : $subscriptions->get_times_billed(); + // Back-end cancel subscription show based on status for Novalnet Payment. + return ( novalnet_check_string( $subscriptions->gateway ) && ( ! in_array($subscriptions->status, array( 'cancelled', 'completed', 'expired', 'failing' ), true ) && $get_times_billed !== $subscriptions->bill_times ) ) ? true : $can_cancel; + } + + /** + * Append custom value to both front-end and back-end of a cancel process + * + * @since 1.1.0 + * @param string $url Gets subscription url. + * @param array $subscriptions Params to cancel a subscription. + * @return $url + */ + public function novalnet_cancel_url( $url, $subscriptions ) { + + // Back-end cancel subscription show based on status for Novalnet Payment. + if ( novalnet_check_string( $subscriptions->gateway ) ) { + if ( false !== strpos( $url, 'edit.php' ) ) { + $url_array = explode( 'edit.php?', $url ); + $url = $url_array['0'] . 'edit.php?novalnet_subscription=true&' . $url_array['1']; + } else { + $url = $url . '&novalnet_subscription=true'; + } + } + return $url; + } +} +new Novalnet_Subscriptions(); diff --git a/includes/gateways/class-novalnet-cashpayment.php b/includes/gateways/class-novalnet-cashpayment.php new file mode 100755 index 0000000..6172989 --- /dev/null +++ b/includes/gateways/class-novalnet-cashpayment.php @@ -0,0 +1,234 @@ + array( + 'admin_label' => __( 'Novalnet Barzahlen/viacash', 'edd-novalnet' ), + 'checkout_label' => __( 'Barzahlen/viacash ', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_cashpayment = apply_filters( 'edd_register_novalnet_cashpayment_gateway', $novalnet_cashpayment ); + $gateways = array_merge( $gateways, $novalnet_cashpayment ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + */ + public function display_form() { + global $edd_options; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_cashpayment_test_mode'] ) ); + $information = isset( $edd_options['novalnet_cashpayment_information'] ) ? trim( $edd_options['novalnet_cashpayment_information'] ) : ''; + $payment_method_name = __( 'Barzahlen/viacash', 'edd-novalnet' ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 'novalnet_cashpayment_settings', + 'name' => ' ' . __( 'Novalnet Barzahlen/viacash', 'edd-novalnet' ) . ' ', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_cashpayment_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_cashpayment_slip_date', + 'name' => __( 'Slip expiry date (in days)', 'edd-novalnet' ), + 'type' => 'number', + 'size' => 'regular', + 'min' => 1, + 'tooltip_title' => __( 'Slip expiry date (in days)', 'edd-novalnet' ), + 'tooltip_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. ', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_cashpayment_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'processing', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_cashpayment_order_callback_status', + 'name' => __( 'Callback / Webhook order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Callback / Webhook order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used when callback script is executed for payment received by Novalnet.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_cashpayment_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + ); + $novalnet_cashpayment = apply_filters( 'edd_novalnet_cashpayment_settings', $novalnet_cashpayment ); + $gateway_settings['novalnet_cashpayment'] = $novalnet_cashpayment; + return $gateway_settings; + } +} +new Novalnet_Cashpayment(); +?> diff --git a/includes/gateways/class-novalnet-cc.php b/includes/gateways/class-novalnet-cc.php new file mode 100755 index 0000000..b9751aa --- /dev/null +++ b/includes/gateways/class-novalnet-cc.php @@ -0,0 +1,408 @@ + $billing_details['line1'], + 'city' => $billing_details['city'], + 'zip' => $billing_details['zip'], + 'country_code' => $billing_details['country'] + ); + } + + // Enqueue style. + wp_enqueue_style( 'edd-novalnet-cc-style', NOVALNET_PLUGIN_URL . 'assets/css/novalnet-checkout.css' ); + + // Enqueue script. + wp_enqueue_script( 'edd-novalnetutility-cc-script', 'https://cdn.novalnet.de/js/v2/NovalnetUtility.js', array( 'jquery' ), NOVALNET_VERSION, true ); + wp_enqueue_script( 'edd-novalnet-cc-script', NOVALNET_PLUGIN_URL . 'assets/js/novalnet-cc.js', array( 'jquery' ), NOVALNET_VERSION, true ); + wp_localize_script( + 'edd-novalnet-cc-script', + 'novalnet_cc', + array_merge($billing_address, + array( + 'card_holder_label' => __( 'Card holder name', 'edd-novalnet' ), + 'card_holder_input' => __( 'Name on card', 'edd-novalnet' ), + 'card_number_label' => __( 'Card number', 'edd-novalnet' ), + 'card_number_input' => __( 'XXXX XXXX XXXX XXXX', 'edd-novalnet' ), + 'card_expiry_label' => __( 'Expiry date', 'edd-novalnet' ), + 'card_cvc_label' => __( 'CVC/CVV/CID', 'edd-novalnet' ), + 'card_cvc_input' => __( 'XXX', 'edd-novalnet' ), + 'card_error_text' => __( 'Your credit card details are invalid', 'edd-novalnet' ), + 'common_label_style' => ! empty( $edd_options['novalnet_common_label_style'] ) ? trim( $edd_options['novalnet_common_label_style'] ) : '', + 'common_field_style' => ! empty( $edd_options['novalnet_common_field_style'] ) ? trim( $edd_options['novalnet_common_field_style'] ) : '', + 'common_style_text' => ! empty( $edd_options['novalnet_common_style_text'] ) ? trim( $edd_options['novalnet_common_style_text'] ) : '', + 'client_key' => isset( $edd_options['novalnet_client_key'] ) ? $edd_options['novalnet_client_key'] : '', + 'test_mode' => (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_cc_test_mode'] ) ), + 'first_name' => !empty($user_data) ? $user_data['first_name'][0] : '', + 'last_name' => !empty($user_data) ? $user_data['last_name'][0] : '', + 'amount' => edd_get_cart_total() * 100, + 'currency' => edd_get_currency(), + 'lang' => novalnet_shop_language(), + 'enforce_3d' => ( isset($edd_options['novalnet_cc_enforced_3d']) && $edd_options['novalnet_cc_enforced_3d'] == 'yes' ) ? 1 : 0, + ) + ) + ); + } + + /** + * Update the registered payment settings while saving + * + * @since 1.1.0 + * @access public + */ + public static function update_novalnet_settings() { + // Update creditcard configuraion fields. + update_option( self::register_novalnet_cc_settings() ); + } + + /** + * Register the payment gateways setting section + * + * @since 1.1.0 + * @access public + * @param array $gateway_sections Get CC payment to append in default gateways. + * @return array $gateway_sections Returns CC in along with gateway payments. + */ + public function register_novalnet_cc_gateway( $gateway_sections ) { + if ( edd_is_gateway_active( 'novalnet_cc' ) ) { + $gateway_sections['novalnet_cc'] = __( 'Novalnet Credit/Debit Cards', 'edd-novalnet' ); + } + return $gateway_sections; + } + + /** + * Register the gateway payment for cc + * + * @since 1.0.1 + * @param array $gateways Allows payment details. + * @return array $gateways Show CC payment in front-end and back-end. + */ + public function register_novalnet_cc( $gateways ) { + + $novalnet_cc = array( + 'novalnet_cc' => array( + 'admin_label' => __( 'Novalnet Credit/Debit Cards', 'edd-novalnet' ), + 'checkout_label' => __( 'Credit/Debit Cards', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_cc = apply_filters( 'edd_register_novalnet_cc_gateway', $novalnet_cc ); + $gateways = array_merge( $gateways, $novalnet_cc ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.1.0 + */ + public function display_form() { + global $edd_options; + + $language = get_bloginfo( 'language' ); + $language = substr( $language, 0, 2 ); + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_cc_test_mode'] ) ); + $information = ! empty( $edd_options['novalnet_cc_information'] ) ? trim( $edd_options['novalnet_cc_information'] ) : ''; + $payment_method_name = __( 'Credit/Debit Cards', 'edd-novalnet' ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + novalnet_get_credit_card_data(); + // Get system data. + $system_data = novalnet_get_system_data(); + $params = array_merge( $payment_data, $card_data, $customer_data, $system_data ); + $params['nn_it'] = 'iframe'; + // Process the onhold product. + if (isset($edd_options['novalnet_invoice_manual_limit']) && 'authorize' === $edd_options['novalnet_cc_manual_limit'] ) { + if ( isset( $edd_options['novalnet_cc_manual_check'] ) ) { + $payment_data['amount'] = ( novalnet_digits_check( $edd_options['novalnet_cc_manual_check'] ) ) ? $payment_data['amount'] : 0; + if ( $payment_data['amount'] >= $edd_options['novalnet_cc_manual_check'] ) { + $params['on_hold'] = 1; + } + } else { + $params['on_hold'] = 1; + } + } + + if ( isset($_REQUEST['novalnet_cc_do_redirect']) && $_REQUEST['novalnet_cc_do_redirect'] == 1 ) { + EDD()->session->set( 'novalnet_cc_do_redirect', $_REQUEST['novalnet_cc_do_redirect'] ); + $paygate_url = 'https://payport.novalnet.de/pci_payport'; + if ( isset($edd_options['novalnet_cc_enforced_3d']) && $edd_options['novalnet_cc_enforced_3d'] == 'yes' ) { + $params['enforce_3d'] = 1; + } + // Get redirect payment data. + $redirect_param = novalnet_get_redirect_param( $purchase_data['gateway'], $payment_data ); + $params = array_merge( $params, $redirect_param ); + + // Create the subscription order for the subscription product. + + novalnet_check_subscription( $purchase_data, $params ); + // Redirect to the paygate url. + novalnet_get_redirect( $paygate_url, $params ); + + } else { + + // Create the subscription order for the subscription product + novalnet_check_subscription( $purchase_data, $params ); + // Send the transaction request to the novalnet server + $parsed_response = novalnet_submit_request( $params ); + if ( '100' === $parsed_response['status'] ) { + novalnet_check_response( $parsed_response ); + } else { + novalnet_transaction_failure( $parsed_response ); + } + } + + } + + /** Get Credit Card values + * + * @since 1.0.1 + */ + public function novalnet_get_credit_card_data() { + $request = $_REQUEST; // Input var okay. + if ( ! empty( $request['novalnet_cc_hash'] ) && ! empty( $request['novalnet_cc_uniqueid'] ) ) { + return array( + 'pan_hash' => sanitize_key( $request['novalnet_cc_hash'] ), + 'unique_id' => sanitize_key( $request['novalnet_cc_uniqueid'] ), + ); + } elseif ( ! empty( $request['novalnet_cc_error'] ) ) { + edd_set_error( 'basic_validation', $request['novalnet_cc_error'] ); + edd_send_back_to_checkout( '?payment-mode=novalnet_cc' ); + } else { + edd_set_error( 'basic_validation', __( 'Your credit card details are invalid', 'edd-novalnet' ) ); + edd_send_back_to_checkout( '?payment-mode=novalnet_cc' ); + } + } + + /** + * Adds the settings of the Novalnet Credit Card section + * + * @since 1.1.0 + * @param array $gateway_settings Back-end configuration list. + * @return array $gateway_settings Save back-end configuration's. + */ + public function register_novalnet_cc_settings( $gateway_settings ) { + + $novalnet_cc = array( + array( + 'id' => 'novalnet_cc_settings', + 'name' => '' . __( 'Novalnet Credit/Debit Cards', 'edd-novalnet' ) . ' ', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_cc_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_cc_manual_limit', + 'name' => __( 'Payment action', 'edd-novalnet' ), + 'type' => 'select', + 'std' => 'capture', + 'tooltip_title' => __( 'Payment action', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Choose whether or not the payment should be charged immediately. Capture completes the transaction by transferring the funds from buyer account to merchant account. Authorize verifies payment details and reserves funds to capture it later, giving time for the merchant to decide on the order.', 'edd-novalnet' ), + 'options' => array( + 'capture' => __( 'Capture', 'edd-novalnet' ), + 'authorize' => __( 'Authorize', 'edd-novalnet' ), + ), + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_cc_manual_check', + 'name' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'type' => 'number', + 'size' => 'regular', + 'desc' => __( '(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)', 'edd-novalnet' ), + 'tooltip_title' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'tooltip_desc' => __( 'In case the order amount exceeds the mentioned limit, the transaction will be set on-hold till your confirmation of the transaction. You can leave the field empty if you wish to process all the transactions as on-hold.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_cc_enforced_3d', + 'name' => __( 'Enforce 3D secure payment outside EU', 'edd-novalnet' ), + 'type' => 'select', + 'tooltip_title' => __( 'Enforce 3D secure payment outside EU', 'edd-novalnet' ), + 'tooltip_desc' => __( 'By enabling this option, all payments from cards issued outside the EU will be authenticated via 3DS 2.0 SCA', 'edd-novalnet' ), + 'options' => array( + 'yes' => __( 'Yes', 'edd-novalnet' ), + 'no' => __( 'No', 'edd-novalnet' ), + ), + 'std' => 'no', + ), + array( + 'id' => 'novalnet_cc_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_cc_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + array( + 'name' => '' . __( 'Custom CSS settings', 'edd-novalnet' ) . ' ', + 'type' => 'header', + 'id' => 'novalnet_css_main_settings', + ), + array( + 'name' => '' . __( 'CSS settings for iframe form', 'edd-novalnet' ) . ' ', + 'type' => 'header', + 'id' => 'novalnet_css_settings', + ), + array( + 'id' => 'novalnet_common_label_style', + 'name' => __( 'Label', 'edd-novalnet' ), + 'desc' => __( 'E.g: color:#999999; background-color:#FFFFFF;', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'std' => 'font-weight: 700;display: block;position: relative;line-height: 100%;font-size: 114%;font-family: NonBreakingSpaceOverride, "Hoefler Text", Garamond, "Times New Roman", serif;letter-spacing: normal;', + ), + array( + 'id' => 'novalnet_common_field_style', + 'name' => __( 'Input', 'edd-novalnet' ), + 'desc' => __( 'E.g: color:#999999; background-color:#FFFFFF;', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'std' => '.input{padding: 4px 6px;display: inline-block;width: 100%;}', + ), + array( + 'id' => 'novalnet_common_style_text', + 'name' => __( 'CSS Text', 'edd-novalnet' ), + 'desc' => __( 'E.g: #idselector{color:#999999;}.classSelector{color:#000000}', 'edd-novalnet' ), + 'type' => 'textarea', + 'allow_blank' => false, + 'std' => 'body{color: #141412; line-height: 1.5; margin: 0;} html, button, input, select, textarea{font-family: "Source Sans Pro",Helvetica,sans-serif;color: #000;}html{font-size: 100%;}', + ), + ); + $novalnet_cc = apply_filters( 'edd_novalnet_cc_settings', $novalnet_cc ); + $gateway_settings['novalnet_cc'] = $novalnet_cc; + return $gateway_settings; + } +} +new Novalnet_Cc(); +?> diff --git a/includes/gateways/class-novalnet-eps.php b/includes/gateways/class-novalnet-eps.php new file mode 100755 index 0000000..af89cc0 --- /dev/null +++ b/includes/gateways/class-novalnet-eps.php @@ -0,0 +1,213 @@ + array( + 'admin_label' => __( 'Novalnet eps', 'edd-novalnet' ), + 'checkout_label' => __( 'eps', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_eps = apply_filters( 'edd_register_novalnet_eps_gateway', $novalnet_eps ); + $gateways = array_merge( $gateways, $novalnet_eps ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + * @return void + */ + public function display_form() { + global $edd_options; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_eps_test_mode'] ) ); + $information = isset( $edd_options['novalnet_eps_information'] ) ? trim( $edd_options['novalnet_eps_information'] ) : ''; + $payment_method_name = __( 'eps', 'edd-novalnet' ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 'novalnet_eps_settings', + 'name' => ' ' . __( 'Novalnet eps', 'edd-novalnet' ) . ' ', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_eps_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_eps_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_eps_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + ); + $novalnet_eps = apply_filters( 'edd_novalnet_eps_settings', $novalnet_eps ); + $gateway_settings['novalnet_eps'] = $novalnet_eps; + return $gateway_settings; + } +} +new Novalnet_EPS(); +?> diff --git a/includes/gateways/class-novalnet-giropay.php b/includes/gateways/class-novalnet-giropay.php new file mode 100755 index 0000000..2beae6d --- /dev/null +++ b/includes/gateways/class-novalnet-giropay.php @@ -0,0 +1,213 @@ + array( + 'admin_label' => __( 'Novalnet giropay', 'edd-novalnet' ), + 'checkout_label' => __( 'giropay', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_giropay = apply_filters( 'edd_register_novalnet_giropay_gateway', $novalnet_giropay ); + $gateways = array_merge( $gateways, $novalnet_giropay ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + */ + public function display_form() { + global $edd_options; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_giropay_test_mode'] ) ); + $information = isset( $edd_options['novalnet_giropay_information'] ) ? trim( $edd_options['novalnet_giropay_information'] ) : ''; + $payment_method_name = __( 'giropay', 'edd-novalnet' ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 'novalnet_giropay_settings', + 'name' => ' ' . __( 'Novalnet giropay', 'edd-novalnet' ) . ' ', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_giropay_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_giropay_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_giropay_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + ); + $novalnet_giropay = apply_filters( 'edd_novalnet_giropay_settings', $novalnet_giropay ); + $gateway_settings['novalnet_giropay'] = $novalnet_giropay; + return $gateway_settings; + } +} +new Novalnet_Giropay(); +?> diff --git a/includes/gateways/class-novalnet-ideal.php b/includes/gateways/class-novalnet-ideal.php new file mode 100755 index 0000000..c91c9bf --- /dev/null +++ b/includes/gateways/class-novalnet-ideal.php @@ -0,0 +1,213 @@ + array( + 'admin_label' => __( 'Novalnet iDEAL', 'edd-novalnet' ), + 'checkout_label' => __( 'iDEAL', 'edd-novalnet' ), + ), + ); + $novalnet_ideal = apply_filters( 'edd_register_novalnet_ideal_gateway', $novalnet_ideal ); + $gateways = array_merge( $gateways, $novalnet_ideal ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + */ + public function display_form() { + global $edd_options; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_ideal_test_mode'] ) ); + $information = isset( $edd_options['novalnet_ideal_information'] ) ? trim( $edd_options['novalnet_ideal_information'] ) : ''; + $payment_method_name = __( 'iDEAL', 'edd-novalnet' ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 'novalnet_ideal_settings', + 'name' => ' ' . __( 'Novalnet iDEAL', 'edd-novalnet' ) . ' ', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_ideal_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_ideal_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_ideal_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + ); + $novalnet_ideal = apply_filters( 'edd_novalnet_ideal_settings', $novalnet_ideal ); + $gateway_settings['novalnet_ideal'] = $novalnet_ideal; + return $gateway_settings; + } +} +new Novalnet_Ideal(); +?> diff --git a/includes/gateways/class-novalnet-instantbank.php b/includes/gateways/class-novalnet-instantbank.php new file mode 100755 index 0000000..b68a7df --- /dev/null +++ b/includes/gateways/class-novalnet-instantbank.php @@ -0,0 +1,212 @@ + array( + 'admin_label' => __( 'Novalnet Sofort', 'edd-novalnet' ), + 'checkout_label' => __( 'Sofort', 'edd-novalnet' ), + ), + ); + $novalnet_instantbank = apply_filters( 'edd_register_novalnet_instantbank_gateway', $novalnet_instantbank ); + $gateways = array_merge( $gateways, $novalnet_instantbank ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + */ + public function display_form() { + global $edd_options; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_instantbank_test_mode'] ) ); + $information = isset( $edd_options['novalnet_instantbank_information'] ) ? trim( $edd_options['novalnet_instantbank_information'] ) : ''; + $payment_method_name = __( 'Sofort', 'edd-novalnet' ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 'novalnet_instantbank_settings', + 'name' => ' ' . __( 'Novalnet Sofort', 'edd-novalnet' ) . ' ', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_instantbank_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_instantbank_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_instantbank_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + ); + $novalnet_instantbank = apply_filters( 'edd_novalnet_instantbank_settings', $novalnet_instantbank ); + $gateway_settings['novalnet_instantbank'] = $novalnet_instantbank; + return $gateway_settings; + } +} +new Novalnet_Instantbank(); +?> diff --git a/includes/gateways/class-novalnet-invoice.php b/includes/gateways/class-novalnet-invoice.php new file mode 100755 index 0000000..be640c5 --- /dev/null +++ b/includes/gateways/class-novalnet-invoice.php @@ -0,0 +1,367 @@ + array( + 'admin_label' => __( 'Novalnet Invoice', 'edd-novalnet' ), + 'checkout_label' => __( 'Invoice', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_invoice = apply_filters( 'edd_register_novalnet_invoice_gateway', $novalnet_invoice ); + $gateways = array_merge( $gateways, $novalnet_invoice ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + */ + public function display_form( $is_update_payment_method = false ) { + + global $edd_options; + + $update_payment = $is_update_payment_method; + + $user_data = get_user_meta( get_current_user_id() ); + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_invoice_test_mode'] ) ); + $information = isset( $edd_options['novalnet_invoice_information'] ) ? trim( $edd_options['novalnet_invoice_information'] ) : ''; + $payment_method_name = __( 'Invoice', 'edd-novalnet' ); + $payment_name = 'novalnet_invoice'; + + include_once NOVALNET_PLUGIN_DIR . 'templates/invoice-template.php'; + + do_action( 'edd_after_cc_fields' ); + } + + /** + * Register the action to initiate and process the payment + * + * @since 1.0.1 + * @param array $purchase_data Get customer details to payment. + * @return array $params to acknowledge status call. + */ + public function novalnet_invoice_process_payment( $purchase_data ) { + + global $edd_options; + $invoice_details = array_map( 'trim', $_POST ); + $payment_name = 'novalnet_invoice'; + $params = array(); + $trial_product = '0'; + if ( isset( $purchase_data['downloads'] ) && !empty( $purchase_data['downloads'] ) ) { + foreach ( $purchase_data['downloads'] as $purchase_key => $purchase_val ) { + if ( ! empty( $purchase_val['options']['recurring']['trial_period'] ) ) { + $trial_product = '1'; + } + } + } + if ( isset( $edd_options['novalnet_invoice_guarantee_enable'] ) ) { + novalnet_guarantee_payment_validation( $purchase_data, $payment_name,$trial_product ); + } + // Guarantee requirement validations + if ( ( isset( $edd_options['novalnet_invoice_guarantee_enable'] ) && ! empty( EDD()->session->get( 'novalnet_invoice_guarantee_payment_error' ) ) && isset ($edd_options['novalnet_invoice_force_normal_payment']) && $edd_options['novalnet_invoice_force_normal_payment'] == 'no') ) { + $error = EDD()->session->get( 'novalnet_invoice_guarantee_payment_error' ); + $error_msg = sprintf( __( 'The payment cannot be processed, because the basic requirements for the payment guarantee are not met ( %s ) ', 'edd-novalnet' ), $error ); + edd_set_error( 'guarantee_validation', __( $error_msg, 'edd-novalnet' ) ); + edd_send_back_to_checkout( '?payment-mode=novalnet_invoice' ); + } + // Date validation for guarantee payment + if ( isset( $edd_options['novalnet_invoice_guarantee_enable']) && $trial_product == '0') { + + $day = isset( $invoice_details['novalnet_invoice_day'] ) ? $invoice_details['novalnet_invoice_day'] : ''; + $month = isset( $invoice_details['novalnet_invoice_month'] ) ? $invoice_details['novalnet_invoice_month'] : ''; + $year = isset( $invoice_details['novalnet_invoice_year'] ) ? $invoice_details['novalnet_invoice_year'] : ''; + + $error = check_guarantee_payment( $day, $month, $year, 'novalnet_invoice' ); + $date_check = EDD()->session->get( 'novalnet_invoice_dob' ); + + if ( ! empty( $error ) && isset($edd_options['novalnet_invoice_force_normal_payment']) && $edd_options['novalnet_invoice_force_normal_payment'] == 'no') { + edd_set_error( 'guarantee_validation', __( $error, 'edd-novalnet' ) ); + edd_send_back_to_checkout( '?payment-mode=novalnet_invoice' ); + } elseif ( ! empty( $date_check ) ) { + $params ['birth_date'] = gmdate( 'Y-m-d', strtotime( $date_check ) ); + } + } + + if ( isset( $edd_options['novalnet_invoice_guarantee_enable'] ) && empty( EDD()->session->get( 'novalnet_invoice_guarantee_payment_error' ) ) && empty( EDD()->session->get( 'novalnet_invoice_guarantee_dob_payment_error' ) ) && $trial_product == '0' ) { + $payment_name = 'novalnet_invoice_guarantee'; + } + // Get configuration data. + $payment_data = novalnet_get_merchant_data( $purchase_data, $payment_name ); + $payment_data['invoice_type'] = 'INVOICE'; + // Get customer data. + $customer_data = novalnet_get_customer_data( $purchase_data ); + // Get system data. + $system_data = novalnet_get_system_data(); + + $payment_duration = isset( $edd_options['novalnet_invoice_due_date'] ) ? trim( $edd_options['novalnet_invoice_due_date'] ) : ''; + $payment_data['due_date'] = ( ! empty( $payment_duration ) ) ? gmdate( 'Y-m-d', strtotime( gmdate( 'y-m-d' ) . '+ ' . $payment_duration . ' days' ) ) : gmdate( 'Y-m-d', strtotime( gmdate( 'y-m-d' ) . '+ 14 days' ) ); + + $params = array_merge( $payment_data, $customer_data, $system_data, $params ); + // Process the onhold product. + if (isset($edd_options['novalnet_invoice_manual_limit']) && 'authorize' === $edd_options['novalnet_invoice_manual_limit'] ) { + if ( isset( $edd_options['novalnet_invoice_manual_check'] ) ) { + $payment_data['amount'] = ( novalnet_digits_check( $edd_options['novalnet_invoice_manual_check'] ) ) ? $payment_data['amount'] : 0; + if ( $payment_data['amount'] >= $edd_options['novalnet_invoice_manual_check'] ) { + $params['on_hold'] = 1; + } + } else { + $params['on_hold'] = 1; + } + } + EDD()->session->set( 'trial_product', $trial_product); + // Create the subscription order for the subscription product. + novalnet_check_subscription( $purchase_data, $params ); + + // Send the transaction request to the novalnet server. + $parsed_response = novalnet_submit_request( $params ); + + if ( '100' === $parsed_response['status'] ) { + + novalnet_check_response( $parsed_response ,$trial_product); + } else { + novalnet_transaction_failure( $parsed_response ); + } + + } + + /** + * Add the settings of the Novalnet Invoice + * + * @since 1.0.1 + * @param array $gateway_settings Back-end configuration list. + * @return array $gateway_settings Save back-end configuration's. + */ + public function register_novalnet_invoice_settings( $gateway_settings ) { + // Shop backend configuration. + $novalnet_invoice = array( + array( + 'id' => 'novalnet_invoice_settings', + 'name' => ' ' . __( 'Novalnet Invoice', 'edd-novalnet' ) . ' ', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_invoice_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_invoice_due_date', + 'name' => __( 'Payment due date (in days)', 'edd-novalnet' ), + 'type' => 'number', + 'min' => 7, + 'size' => 'regular', + 'tooltip_title' => __( 'Payment due date (in days)', 'edd-novalnet' ), + 'tooltip_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. ', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_invoice_manual_limit', + 'name' => __( 'Payment action', 'edd-novalnet' ), + 'type' => 'select', + 'std' => 'capture', + 'tooltip_title' => __( 'Payment action', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Choose whether or not the payment should be charged immediately. Capture completes the transaction by transferring the funds from buyer account to merchant account. Authorize verifies payment details and reserves funds to capture it later, giving time for the merchant to decide on the order.', 'edd-novalnet' ), + 'options' => array( + 'capture' => __( 'Capture', 'edd-novalnet' ), + 'authorize' => __( 'Authorize', 'edd-novalnet' ), + ), + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_invoice_manual_check', + 'name' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'type' => 'number', + 'size' => 'regular', + 'desc' => __( '(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)', 'edd-novalnet' ), + 'tooltip_title' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'tooltip_desc' => __( 'When the order amount exceeds the mentioned limit, the transaction will be set on-hold till you confirm it. You can leave the field empty if you wish to process all transactions as on-hold transactions. ', 'edd-novalnet' ), + ), + + array( + 'id' => 'novalnet_invoice_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'processing', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_invoice_order_callback_status', + 'name' => __( 'Callback / Webhook order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Callback / Webhook order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used when callback script is executed for payment received by Novalnet.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_invoice_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + + ), + array( + 'id' => 'novalnet_guarantee_settings', + 'name' => ' ' . __( 'Payment guarantee configuration', 'edd-novalnet' ) . ' ', + 'type' => 'header', + ), + array( + 'id' => 'novalnet_invoice_guarantee_settings', + 'name' => sprintf( + ' + %1$s + %2$s + %3$s + %4$s + %5$s + %6$s + ', + __( 'Payment guarantee requirements: ', 'edd-novalnet' ), + __( 'Allowed countries: DE, AT, CH', 'edd-novalnet' ), + __( 'Allowed currency: EUR', 'edd-novalnet' ), + __( 'Minimum order amount: 9,99 EUR or more', 'edd-novalnet' ), + __( 'Age limit: 18 years or more', 'edd-novalnet' ), + __( 'The billing address must be the same as the shipping address', 'edd-novalnet' ) + ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_invoice_guarantee_enable', + 'name' => __( 'Enable payment guarantee', 'edd-novalnet' ), + 'type' => 'checkbox', + ), + array( + 'id' => 'novalnet_invoice_order_pending_status', + 'name' => __( 'Payment status for the pending payment', 'edd-novalnet' ), + 'type' => 'select', + 'std' => 'pending', + 'options' => edd_get_payment_statuses(), + 'tooltip_title' => __( 'Payment status for the pending payment', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for pending transactions.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_invoice_guarantee_minimum_order_amount', + 'name' => __( 'Minimum order amount for payment guarantee', 'edd-novalnet' ), + 'type' => 'number', + 'min' => 999, + 'tooltip_title' => __( 'Minimum order amount for payment guarantee', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Enter the minimum amount (in cents) for the transaction to be processed with payment guarantee. For example, enter 100 which is equal to 1,00. By default, the amount will be 9,99 EUR.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_invoice_force_normal_payment', + 'name' => __( 'Force Non-Guarantee payment', 'edd-novalnet' ), + 'type' => 'select', + 'options' => array( + 'no' => __( 'No', 'edd-novalnet' ), + 'yes' => __( 'Yes', 'edd-novalnet' ), + ), + 'std' => 'yes', + 'tooltip_title' => __( 'Force Non-Guarantee payment', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Even if payment guarantee is enabled, payments will still be processed as non-guarantee payments if the payment guarantee requirements are not met. Review the requirements under \'Enable Payment Guarantee\' in the Installation Guide. ', 'edd-novalnet' ), + ), + ); + $novalnet_invoice = apply_filters( 'edd_novalnet_invoice_settings', $novalnet_invoice ); + $gateway_settings['novalnet_invoice'] = $novalnet_invoice; + return $gateway_settings; + } +} +new Novalnet_Invoice(); + diff --git a/includes/gateways/class-novalnet-paypal.php b/includes/gateways/class-novalnet-paypal.php new file mode 100755 index 0000000..b2a79bb --- /dev/null +++ b/includes/gateways/class-novalnet-paypal.php @@ -0,0 +1,259 @@ + array( + 'admin_label' => __( 'Novalnet PayPal', 'edd-novalnet' ), + 'checkout_label' => __( 'PayPal', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_paypal = apply_filters( 'edd_register_novalnet_paypal_gateway', $novalnet_paypal ); + $gateways = array_merge( $gateways, $novalnet_paypal ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + */ + public function display_form() { + global $edd_options; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_paypal_test_mode'] ) ); + $information = isset( $edd_options['novalnet_paypal_information'] ) ? trim( $edd_options['novalnet_paypal_information'] ) : ''; + $payment_method_name = __( 'PayPal', 'edd-novalnet' ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = $edd_options['novalnet_paypal_manual_check'] ) { + $params['on_hold'] = 1; + } + } else { + $params['on_hold'] = 1; + } + } + + // Create the subscription order for the subscription product. + novalnet_check_subscription( $purchase_data, $params ); + // Redirect to the paygate url. + novalnet_get_redirect( $paygate_url, $params ); + } + + /** + * Add the settings of the Novalnet PayPal + * + * @since 1.0.1 + * @param array $gateway_settings Back-end configuration list. + * @return array $gateway_settings Save back-end configuration's. + */ + public function register_novalnet_paypal_settings( $gateway_settings ) { + $admin_url = 'https://admin.novalnet.de/'; + $novalnet_paypal = array( + array( + 'id' => 'novalnet_paypal_settings', + /* translators: %s: admin URL */ + 'name' => ' ' . __( 'Novalnet PayPal', 'edd-novalnet' ) . ' ' . sprintf( __( 'To accept PayPal transactions, configure your PayPal API info in the Novalnet Admin Portal: > PROJECT > Choose your project > Payment Methods > Paypal > Configure.', 'edd-novalnet' ), $admin_url ) . '', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_paypal_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_paypal_manual_limit', + 'name' => __( 'Payment action', 'edd-novalnet' ), + 'type' => 'select', + 'std' => 'capture', + 'tooltip_title' => __( 'Payment action', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Choose whether or not the payment should be charged immediately. Capture completes the transaction by transferring the funds from buyer account to merchant account. Authorize verifies payment details and reserves funds to capture it later, giving time for the merchant to decide on the order.', 'edd-novalnet' ), + 'options' => array( + 'capture' => __( 'Capture', 'edd-novalnet' ), + 'authorize' => __( 'Authorize', 'edd-novalnet' ), + ), + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_paypal_manual_check', + 'name' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'type' => 'number', + 'size' => 'regular', + 'desc' => __( '(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)', 'edd-novalnet' ), + 'tooltip_title' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'tooltip_desc' => __( 'In case the order amount exceeds the mentioned limit, the transaction will be set on-hold till your confirmation of the transaction. You can leave the field empty if you wish to process all the transactions as on-hold.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_paypal_order_pending_status', + 'name' => __( 'Payment status for the pending payment', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'pending', + 'tooltip_title' => __( 'Payment status for the pending payment', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for pending transactions.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_paypal_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_paypal_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + ); + $novalnet_paypal = apply_filters( 'edd_novalnet_paypal_settings', $novalnet_paypal ); + $gateway_settings['novalnet_paypal'] = $novalnet_paypal; + return $gateway_settings; + } +} +new Novalnet_Paypal(); +?> diff --git a/includes/gateways/class-novalnet-prepayment.php b/includes/gateways/class-novalnet-prepayment.php new file mode 100755 index 0000000..0bc17fd --- /dev/null +++ b/includes/gateways/class-novalnet-prepayment.php @@ -0,0 +1,246 @@ + array( + 'admin_label' => __( 'Novalnet Prepayment', 'edd-novalnet' ), + 'checkout_label' => __( 'Prepayment', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_prepayment = apply_filters( 'edd_register_novalnet_prepayment_gateway', $novalnet_prepayment ); + $gateways = array_merge( $gateways, $novalnet_prepayment ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + */ + public function display_form() { + global $edd_options; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_prepayment_test_mode'] ) ); + $information = isset( $edd_options['novalnet_prepayment_information'] ) ? trim( $edd_options['novalnet_prepayment_information'] ) : ''; + $payment_method_name = __( 'Prepayment', 'edd-novalnet' ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $purchase_val ) { + if ( ! empty( $purchase_val['options']['recurring']['trial_period'] ) ) { + $trial_product = '1'; + } + } + } + // Get configuration data. + $payment_data = novalnet_get_merchant_data( $purchase_data, 'novalnet_prepayment' ); + $payment_data['invoice_type'] = 'PREPAYMENT'; + + $payment_duration = isset( $edd_options['novalnet_prepayment_due_date'] ) ? trim( $edd_options['novalnet_prepayment_due_date'] ) : ''; + $payment_data['due_date'] = ( ! empty( $payment_duration ) ) ? gmdate( 'Y-m-d', strtotime( gmdate( 'y-m-d' ) . '+ ' . $payment_duration . ' days' ) ) : gmdate( 'Y-m-d', strtotime( gmdate( 'y-m-d' ) . '+ 14 days' ) ); + // Get customer data. + $customer_data = novalnet_get_customer_data( $purchase_data ); + // Get system data. + $system_data = novalnet_get_system_data(); + $params = array_merge( $payment_data, $customer_data, $system_data ); + EDD()->session->set( 'trial_product', $trial_product); + // Create the subscription order for the subscription product. + novalnet_check_subscription( $purchase_data, $params ); + + // Send the transaction request to the novalnet server. + $parsed_response = novalnet_submit_request( $params ); + if ( '100' === $parsed_response['status'] ) { + novalnet_check_response( $parsed_response ); + } else { + novalnet_transaction_failure( $parsed_response ); + } + } + + /** + * Add the settings of the Novalnet Prepayment + * + * @since 1.0.1 + * @param array $gateway_settings Back-end configuration list. + * @return array $gateway_settings Save back-end configuration's. + */ + public function register_novalnet_prepayment_settings( $gateway_settings ) { + $novalnet_prepayment = array( + array( + 'id' => 'novalnet_prepayment_settings', + 'name' => ' ' . __( 'Novalnet Prepayment', 'edd-novalnet' ) . ' ', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_prepayment_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_prepayment_due_date', + 'name' => __( 'Payment due date (in days)', 'edd-novalnet' ), + 'type' => 'number', + 'min' => 7, + 'max' => 28, + 'size' => 'regular', + 'tooltip_title' => __( 'Payment due date (in days)', 'edd-novalnet' ), + 'tooltip_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. ', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_prepayment_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'processing', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_prepayment_order_callback_status', + 'name' => __( 'Callback / Webhook order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Callback / Webhook order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used when callback script is executed for payment received by Novalnet.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_prepayment_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + ); + $novalnet_prepayment = apply_filters( 'edd_novalnet_prepayment_settings', $novalnet_prepayment ); + $gateway_settings['novalnet_prepayment'] = $novalnet_prepayment; + return $gateway_settings; + } +} +new Novalnet_Prepayment(); +?> diff --git a/includes/gateways/class-novalnet-przelewy24.php b/includes/gateways/class-novalnet-przelewy24.php new file mode 100755 index 0000000..04111f2 --- /dev/null +++ b/includes/gateways/class-novalnet-przelewy24.php @@ -0,0 +1,226 @@ + array( + 'admin_label' => __( 'Novalnet Przelewy24', 'edd-novalnet' ), + 'checkout_label' => __( 'Przelewy24', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_przelewy24 = apply_filters( 'edd_register_novalnet_przelewy24_gateway', $novalnet_przelewy24 ); + $gateways = array_merge( $gateways, $novalnet_przelewy24 ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + */ + public function display_form() { + global $edd_options; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_przelewy24_test_mode'] ) ); + $information = isset( $edd_options['novalnet_przelewy24_information'] ) ? trim( $edd_options['novalnet_przelewy24_information'] ) : ''; + $payment_method_name = __( 'Przelewy24', 'edd-novalnet' ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 'novalnet_przelewy24_settings', + 'name' => ' ' . __( 'Novalnet Przelewy24', 'edd-novalnet' ) . ' ', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_przelewy24_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_przelewy24_order_pending_status', + 'name' => __( 'Payment status for the pending payment', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'pending', + 'tooltip_title' => __( 'Payment status for the pending payment', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for pending transactions.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_przelewy24_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_przelewy24_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + ); + $novalnet_przelewy24 = apply_filters( 'edd_novalnet_przelewy24_settings', $novalnet_przelewy24 ); + $gateway_settings['novalnet_przelewy24'] = $novalnet_przelewy24; + return $gateway_settings; + } +} +new Novalnet_Przelewy24(); +?> diff --git a/includes/gateways/class-novalnet-sepa.php b/includes/gateways/class-novalnet-sepa.php new file mode 100755 index 0000000..22f467f --- /dev/null +++ b/includes/gateways/class-novalnet-sepa.php @@ -0,0 +1,385 @@ + array( + 'admin_label' => __( 'Novalnet Direct Debit SEPA', 'edd-novalnet' ), + 'checkout_label' => __( 'Direct Debit SEPA', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_sepa = apply_filters( 'edd_register_novalnet_sepa_gateway', $novalnet_sepa ); + $gateways = array_merge( $gateways, $novalnet_sepa ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + */ + public function display_form( $is_update_payment_method = false ) { + + global $edd_options; + + $update_payment = $is_update_payment_method; + + $user_data = get_user_meta( get_current_user_id() ); + $account_holder = !empty($user_data) ? $user_data['first_name'][0] . ' ' . $user_data['last_name'][0] : ''; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_sepa_test_mode'] ) ); + $information = isset( $edd_options['novalnet_sepa_information'] ) ? trim( $edd_options['novalnet_sepa_information'] ) : ''; + $payment_method_name = __( 'Direct Debit SEPA', 'edd-novalnet' ); + $payment_name = 'novalnet_sepa'; + + include_once NOVALNET_PLUGIN_DIR . 'templates/sepa-template.php'; + + do_action( 'edd_after_cc_fields' ); + } + + /** + * Register the action to initiate and process the Payment + * + * @since 1.0.1 + * @param array $purchase_data Get customer details to payment. + * @return array $params to acknowledge status call. + */ + public function novalnet_sepa_process_payment( $purchase_data ) { + + global $edd_options; + + // Get payment data. + $trial_product = '0'; + if ( isset( $purchase_data['downloads'] ) && !empty( $purchase_data['downloads'] ) ) { + foreach ( $purchase_data['downloads'] as $purchase_key => $purchase_val ) { + if ( ! empty( $purchase_val['options']['recurring']['trial_period'] ) ) { + $trial_product = '1'; + } + } + } + $params = $this->novalnet_get_sepa_bank_data($trial_product); + $payment_name = 'novalnet_sepa'; + + if ( isset( $edd_options['novalnet_sepa_guarantee_enable'] ) ) { + novalnet_guarantee_payment_validation( $purchase_data, $payment_name,$trial_product ); + } + + if ( isset( $edd_options['novalnet_sepa_guarantee_enable'] ) && empty( EDD()->session->get( 'novalnet_sepa_guarantee_payment_error' ) ) && empty( EDD()->session->get( 'novalnet_sepa_guarantee_dob_payment_error' ) ) && $trial_product == '0' ) { + $payment_name = 'novalnet_sepa_guarantee'; + } + // Get configuration data. + $payment_data = novalnet_get_merchant_data( $purchase_data, $payment_name ); + // Get customer data. + $customer_data = novalnet_get_customer_data( $purchase_data ); + // Get system data. + $system_data = novalnet_get_system_data(); + $params = array_merge( $payment_data, $customer_data, $system_data, $params ); + // Process the onhold product. + if ( isset($edd_options['novalnet_invoice_manual_limit']) &&'authorize' === $edd_options['novalnet_sepa_manual_limit'] ) { + if ( isset( $edd_options['novalnet_sepa_manual_check'] ) ) { + $payment_data['amount'] = ( novalnet_digits_check( $edd_options['novalnet_sepa_manual_check'] ) ) ? $payment_data['amount'] : 0; + if ( $payment_data['amount'] >= $edd_options['novalnet_sepa_manual_check'] ) { + $params['on_hold'] = 1; + } + } else { + $params['on_hold'] = 1; + } + } + // Due date validations. + $sepa_payment_duration = isset( $edd_options['novalnet_sepa_due_date'] ) ? trim( $edd_options['novalnet_sepa_due_date'] ) : ''; + if ( ! empty( $sepa_payment_duration ) ) { + $params['sepa_due_date'] = gmdate( 'Y-m-d', strtotime( gmdate( 'y-m-d' ) . '+ ' . $sepa_payment_duration . ' days' ) ); + } + // Create the subscription order for the subscription product. + novalnet_check_subscription( $purchase_data, $params ); + // Send the transaction request to the novalnet server. + $parsed_response = novalnet_submit_request( $params ); + if ( '100' === $parsed_response['status'] ) { + novalnet_check_response( $parsed_response ,$trail_period ); + } else { + novalnet_transaction_failure( $parsed_response ); + } + } + + /** + * Get SEPA Account details + * + * @since 1.0.1 + * @param array $params Get required param to acknowledge Novalnet server to respond. + */ + public function novalnet_get_sepa_bank_data($trial_product) { + + global $edd_options; + $sepa_details = array_map( 'trim', $_POST ); // Input var okay. + + if ( preg_match( '/[#%\^<>@$=*!]+/i', $sepa_details['novalnet_sepa_holder'] ) || empty( $sepa_details['novalnet_sepa_holder'] ) || empty( $sepa_details['novalnet_sepa_iban'] ) ) { + edd_set_error( 'account_validation', __( 'Your account details are invalid', 'edd-novalnet' ) ); + edd_send_back_to_checkout( '?payment-mode=novalnet_sepa' ); + } + // Guarantee requirement validations + if ( ( isset( $edd_options['novalnet_sepa_guarantee_enable'] ) && ! empty( EDD()->session->get( 'novalnet_sepa_guarantee_payment_error' ) ) && isset($edd_options['novalnet_sepa_force_normal_payment']) && $edd_options['novalnet_sepa_force_normal_payment'] == 'no' && $trial_product == '0' )) { + $error = EDD()->session->get( 'novalnet_sepa_guarantee_payment_error' ); + $error_msg = sprintf( __( 'The payment cannot be processed, because the basic requirements for the payment guarantee are not met ( %s ) ', 'edd-novalnet' ), $error ); + edd_set_error( 'guarantee_validation', __( $error_msg, 'edd-novalnet' ) ); + edd_send_back_to_checkout( '?payment-mode=novalnet_sepa' ); + } + // Date validation for guarantee payment + if ( isset( $edd_options['novalnet_sepa_guarantee_enable'] ) && $trial_product == '0' ) { + $day = isset( $sepa_details['novalnet_sepa_day'] ) ? $sepa_details['novalnet_sepa_day'] : ''; + $month = isset( $sepa_details['novalnet_sepa_month'] ) ? $sepa_details['novalnet_sepa_month'] : ''; + $year = isset( $sepa_details['novalnet_sepa_year'] ) ? $sepa_details['novalnet_sepa_year'] : ''; + + $error = check_guarantee_payment( $day, $month, $year, 'novalnet_sepa' ); + $date_check = EDD()->session->get( 'novalnet_sepa_dob' ); + + if ( ! empty( $error ) && isset($edd_options['novalnet_sepa_force_normal_payment']) && $edd_options['novalnet_sepa_force_normal_payment'] == 'no') { + edd_set_error( 'guarantee_validation', __( $error, 'edd-novalnet' ) ); + edd_send_back_to_checkout( '?payment-mode=novalnet_sepa' ); + } elseif ( ! empty( $date_check ) ) { + $params ['birth_date'] = gmdate( 'Y-m-d', strtotime( $date_check ) ); + } + } + + // Payment data. + $params ['bank_account_holder'] = $sepa_details['novalnet_sepa_holder']; + $params ['iban'] = $sepa_details['novalnet_sepa_iban']; + + return $params; + } + /** + * Adds the settings of the Novalnet sepa payment + * + * @since 1.0.1 + * @access public + * @param array $gateway_settings Back-end configuration list. + * @return array $gateway_settings Save back-end configuration's. + */ + public function register_novalnet_sepa_settings( $gateway_settings ) { + + $novalnet_sepa = array( + array( + 'id' => 'novalnet_sepa_settings', + 'name' => ' ' . __( 'Novalnet Direct Debit SEPA', 'edd-novalnet' ) . ' ', + 'desc' => __( 'Configure the gateway settings', 'edd-novalnet' ), + 'type' => 'header', + ), + array( + 'id' => 'novalnet_sepa_test_mode', + 'name' => __( 'Enable test mode', 'edd-novalnet' ), + 'type' => 'checkbox', + 'tooltip_title' => __( 'Enable test mode', 'edd-novalnet' ), + 'tooltip_desc' => __( 'The payment will be processed in the test mode therefore amount for this transaction will not be charged', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_sepa_due_date', + 'name' => __( 'Payment due date (in days)', 'edd-novalnet' ), + 'type' => 'number', + 'size' => 'regular', + 'min' => 2, + 'max' => 14, + 'placeholder' => 'test', + 'tooltip_title' => __( 'Payment due date (in days)', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Number of days after which the payment is debited (must be between 2 and 14 days).', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_sepa_manual_limit', + 'name' => __( 'Payment action', 'edd-novalnet' ), + 'type' => 'select', + 'std' => 'capture', + 'tooltip_title' => __( 'Payment action', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Choose whether or not the payment should be charged immediately. Capture completes the transaction by transferring the funds from buyer account to merchant account. Authorize verifies payment details and reserves funds to capture it later, giving time for the merchant to decide on the order.', 'edd-novalnet' ), + 'options' => array( + 'capture' => __( 'Capture', 'edd-novalnet' ), + 'authorize' => __( 'Authorize', 'edd-novalnet' ), + ), + 'size' => 'regular', + ), + array( + 'id' => 'novalnet_sepa_manual_check', + 'name' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'type' => 'number', + 'size' => 'regular', + 'desc' => __( '(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)', 'edd-novalnet' ), + 'tooltip_title' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'tooltip_desc' => __( 'In case the order amount exceeds the mentioned limit, the transaction will be set on-hold till your confirmation of the transaction. You can leave the field empty if you wish to process all the transactions as on-hold.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_sepa_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_sepa_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_guarantee_settings', + 'name' => ' ' . __( 'Payment guarantee configuration', 'edd-novalnet' ) . '', + 'type' => 'header', + ), + array( + 'id' => 'novalnet_sepa_guarantee_settings', + 'name' => sprintf( + ' + %1$s + %2$s + %3$s + %4$s + %5$s + %6$s + ', + __( 'Payment guarantee requirements: ', 'edd-novalnet' ), + __( 'Allowed countries: DE, AT, CH', 'edd-novalnet' ), + __( 'Allowed currency: EUR', 'edd-novalnet' ), + __( 'Minimum order amount: 9,99 EUR or more', 'edd-novalnet' ), + __( 'Age limit: 18 years or more', 'edd-novalnet' ), + __( 'The billing address must be the same as the shipping address', 'edd-novalnet' ) + ), + 'type' => 'header', + + ), + array( + 'id' => 'novalnet_sepa_guarantee_enable', + 'name' => __( 'Enable payment guarantee', 'edd-novalnet' ), + 'type' => 'checkbox', + ), + array( + 'id' => 'novalnet_sepa_order_pending_status', + 'name' => __( 'Payment status for the pending payment', 'edd-novalnet' ), + 'type' => 'select', + 'std' => 'pending', + 'options' => edd_get_payment_statuses(), + 'tooltip_title' => __( 'Payment status for the pending payment', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for pending transactions.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_sepa_guarantee_minimum_order_amount', + 'name' => __( 'Minimum order amount for payment guarantee', 'edd-novalnet' ), + 'type' => 'number', + 'desc' => __( '(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)', 'edd-novalnet' ), + 'min' => 999, + 'tooltip_title' => __( 'Minimum order amount for payment guarantee', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Enter the minimum amount (in cents) for the transaction to be processed with payment guarantee. For example, enter 100 which is equal to 1,00. By default, the amount will be 9,99 EUR.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_sepa_force_normal_payment', + 'name' => __( 'Force Non-Guarantee payment', 'edd-novalnet' ), + 'type' => 'select', + 'options' => array( + 'no' => __( 'No', 'edd-novalnet' ), + 'yes' => __( 'Yes', 'edd-novalnet' ), + ), + 'std' => 'yes', + 'tooltip_title' => __( 'Force Non-Guarantee payment', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Even if payment guarantee is enabled, payments will still be processed as non-guarantee payments if the payment guarantee requirements are not met. Review the requirements under \'Enable Payment Guarantee\' in the Installation Guide. ', 'edd-novalnet' ), + ), + ); + + $novalnet_sepa = apply_filters( 'edd_novalnet_sepa_settings', $novalnet_sepa ); + $gateway_settings['novalnet_sepa'] = $novalnet_sepa; + return $gateway_settings; + } +} +new Novalnet_SEPA(); + diff --git a/includes/novalnet-functions.php b/includes/novalnet-functions.php new file mode 100755 index 0000000..7363322 --- /dev/null +++ b/includes/novalnet-functions.php @@ -0,0 +1,1816 @@ +session->get( $item->purchase_data['gateway'] . '_subscription' ); + + if ( ! empty( $params ) && novalnet_check_string( $item->purchase_data['gateway'] ) ) { + + $novalnet_cc_do_redirect = EDD()->session->get( 'novalnet_cc_do_redirect' ); + + EDD()->session->set( $item->purchase_data['gateway'] . '_subscription', null ); + EDD()->session->set( 'novalnet_cc_do_redirect' , null ); + if ( ! empty( $args['parent_payment_id'] ) ) { + $params['order_no'] = $args['parent_payment_id']; + } + + if ( ( 'novalnet_paypal' === $item->purchase_data['gateway'] ) || ('novalnet_cc' === $item->purchase_data['gateway'] && 1 == $novalnet_cc_do_redirect ) ) { + EDD()->session->set( 'novalnet_redirect_params', $params ); + } else { + $parsed_response = novalnet_submit_request( $params ); + EDD()->session->set( 'novalnet_response', $parsed_response ); + } + EDD()->session->set( 'novalnet_subscription_process', true ); + } + if ( 'pending' === $args['status'] ) { + $args['status'] = 'active'; + } + + return $args; +} + +/** + * Actions to initialize Vendor script + * + * @since 1.1.1 + * @param array $accepted Get request and form $data. + * @return array + */ +function novalnet_add_api_mode( $accepted ) { + $accepted [] = 'novalnet_callback'; + $accepted [] = 'novalnet_redirect_response'; + $accepted [] = 'novalnet_update_payment_method'; + return $accepted; +} + +/** + * Actions to settings configuration in admin plugin + * + * @since 1.0.1 + * @param string $links Gets to Novalnet admin portal. + * @return string $links Login to see merchant credentials. + */ +function novalnet_action_links( $links ) { + + // Add configuration link in plugin page. + $links [] = '' . __( 'Configuration', 'edd-novalnet' ) . ''; + return $links; +} + +/** + * Actions to initialize api handler + * + * @since 1.0.1 + * @param array $data Get request and form $data. + */ +function novalnet_handle_api( $data ) { + switch ( $data['edd-api'] ) { + case 'products': + case 'novalnet_redirect_response': + case 'novalnet_update_payment_method': + if ( in_array( $data['edd-api'], array( 'novalnet_redirect_response', 'products' ), true) ) { + $order_data = EDD()->session->get( 'edd_purchase' ); + $return_url = edd_get_checkout_uri(); + } elseif ( 'novalnet_update_payment_method' === $data['edd-api'] ) { + $order_data = EDD()->session->get( 'novalnet_update_payment_method' ); + $return_url = $data['return_url']; + } + if ( empty( $order_data ) ) { + header_remove( 'Set-Cookie' ); + $redirect = array(); + $redirect['edd-api'] = $data['edd-api']; + $redirect = array_merge( $redirect, $data ); + $redirect_url = add_query_arg( $redirect, $return_url ); + header( 'Location: ' . $redirect_url ); + die(); + } else { + if ( in_array( $data['edd-api'], array( 'novalnet_redirect_response', 'products' ), true) ) { + novalnet_get_redirect_response(); + } elseif ( 'novalnet_update_payment_method' === $data['edd-api'] ) { + novalnet_get_redirect_response( true ); + } + } + break; + case 'novalnet_callback': + // Include the callback script files. + include_once NOVALNET_PLUGIN_DIR . '/includes/api/class-novalnet-callback-api.php'; + // Initiate the callback function. + novalnet_callback_api_process(); + break; + } +} + +/** + * Update status message + * + * @since 1.1.3 + * @param array $request Get all post params. + */ +function get_status_desc( $request ) { + if ( ! empty( $request['status_text'] ) ) { + return $request['status_text']; + } elseif ( ! empty( $request['status_desc'] ) ) { + return $request['status_desc']; + } elseif ( ! empty( $request['status_message'] ) ) { + return $request['status_message']; + } else { + return __( 'Payment was not successful. An error occurred.', 'edd-novalnet' ); + } +} + +/** + * Actions to show the barzahlen overlay + * + * @since 1.1.3 + * @param object $post Get the order object. + */ +function novalnet_barzahlen_scripts( $post ) { + global $wpdb; + if ( 'novalnet_cashpayment' === get_post_meta( $post->ID, '_edd_payment_gateway', true ) ) { + $transaction_id = get_post_meta( $post->ID, '_nn_order_tid', true ); + $result = $wpdb->get_row( $wpdb->prepare( "SELECT test_mode FROM {$wpdb->prefix}novalnet_transaction_detail WHERE tid=%s ORDER BY id DESC", $transaction_id ), ARRAY_A ); + $url = ( '1' === $result['test_mode'] ) ? 'https://cdn.barzahlen.de/js/v2/checkout-sandbox.js' : 'https://cdn.barzahlen.de/js/v2/checkout.js'; + $token = EDD()->session->get( 'cp_checkout_token' ); + echo "" . esc_html( __( 'Pay now with Barzahlen/viacash', 'edd-novalnet' ) ) . ''; + } +} + +/** + * Actions to perform once on Plug-in deactivation + * + * @since 1.0.1 + */ +function novalnet_deactivate_plugin() { + + global $wpdb; + $config_settings = get_option( 'edd_settings' ); + $config_settings['gateways'] = isset( $config_settings['gateways'] ) ? $config_settings['gateways'] : array(); + $config_tmp = array_merge( $config_settings, $config_settings['gateways'] ); + + foreach ( $config_tmp as $key => $value ) { + if ( novalnet_check_string( $key ) ) { + if ( isset( $config_settings[ $key ] ) ) { + unset( $config_settings[ $key ] ); + } else { + unset( $config_settings['gateways'][ $key ] ); + } + } + } + $wpdb->query( "delete from {$wpdb->options} where option_name like '%novalnet%'" ); // db call ok; no-cache ok. + update_option( 'edd_settings', $config_settings ); +} + +/** + * When reloading the page after install. + * + * @since 1.1.1 + */ +function novalnet_update_action() { + + $current_db_version = get_option( 'novalnet_db_version' ); + $show_update_page = get_option( 'novalnet_version_update' ); + if ( ! empty( $current_db_version ) && version_compare( $current_db_version, NOVALNET_VERSION, '!=' ) ) { + // Redirect to updated information page. + novalnet_activation_process(); + } elseif ( $show_update_page ) { + delete_option( 'novalnet_version_update' ); + wp_safe_redirect( admin_url( 'edit.php?post_type=download&page=edd-settings&tab=gateways§ion=novalnet_global_config' ) ); + exit(); + } +} + +/** + * To get remote/server Ip address + * + * @param string $type get the ipaddress type. + * @return mixed + */ +function novalnet_server_addr( $type = 'REMOTE_ADDR' ) { + // Check to determine the IP address type. + if ( 'SERVER_ADDR' === $type ) { + if ( empty( $_SERVER['SERVER_ADDR'] ) ) { + // Handled for IIS server. + $ip_address = gethostbyname( $_SERVER['SERVER_NAME'] ); + } else { + $ip_address = $_SERVER['SERVER_ADDR']; + } + } else { + // For remote address. + $ip_address = get_remote_address(); + return $ip_address; + } + return $ip_address; +} + +/** + * To get remote IP address + * + * @return mixed + */ +function get_remote_address() { + foreach ( array( 'HTTP_X_FORWARDED_HOST', 'HTTP_CLIENT_IP', 'HTTP_X_REAL_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR' ) as $key ) { + if ( array_key_exists( $key, $_SERVER ) === true ) { + foreach ( explode( ',', $_SERVER[ $key ] ) as $ip ) { + return trim( $ip ); + } + } + } +} + +/** + * Checks for the given string in given text + * + * @since 1.1.0 + * @param string $string Check given string contains name as novalnet. + * @param string $data Get payment method name to avoid other payment's. + * @return boolean + */ +function novalnet_check_string( $string, $data = 'novalnet' ) { + return ( false !== strpos( $string, $data ) ); +} + +/** + * Throws admin side empty value in global configuration of Novalnet payment + * + * @since 1.0.1 + */ +function novalnet_admin_global_config_error() { + global $edd_options; + + // Check for Global configuration. + if ( empty( $edd_options['novalnet_merchant_id'] ) || ! novalnet_digits_check( $edd_options['novalnet_merchant_id'] ) || empty( $edd_options['novalnet_product_id'] ) || ! novalnet_digits_check( $edd_options['novalnet_product_id'] ) || empty( $edd_options['novalnet_tariff_id'] ) || ! novalnet_digits_check( $edd_options['novalnet_tariff_id'] ) || empty( $edd_options['novalnet_auth_code'] ) || empty( $edd_options['novalnet_access_key'] ) || ( isset( $edd_options['novalnet_subs_enable_option'] ) && ( empty( $edd_options['novalnet_subs_tariff_id'] ) || ! novalnet_digits_check( $edd_options['novalnet_subs_tariff_id'] ) ) ) ) { + echo '' . esc_html( __( 'Please fill in all the mandatory fields', 'edd-novalnet' ) ) . ''; + } +} + +/** + * Get Merchant details and payment details + * + * @param string $payment_method payment method name. + * @return array. + */ +function get_merchant_details( $payment_method ) { + + global $edd_options; + + $payment_key = get_payment_key( $payment_method ); + $config_data['key'] = $payment_key['key']; + $config_data['payment_type'] = $payment_key['payment_type']; + $config_data['vendor'] = trim( $edd_options['novalnet_merchant_id'] ); + $config_data['auth_code'] = trim( $edd_options['novalnet_auth_code'] ); + $config_data['product'] = trim( $edd_options['novalnet_product_id'] ); + $config_data['tariff'] = trim( $edd_options['novalnet_tariff_id'] ); + $config_data['notify_url'] = ! empty( $edd_options['novalnet_merchant_notify_url'] ) ? trim( $edd_options['novalnet_merchant_notify_url'] ) : ''; + + return $config_data; +} + +/** + * Form Novalnet gateway configuration data + * + * @since 1.0.1 + * @param array $purchase_data Get customer detail. + * @param string $payment_method Allow payment to process. + * @return array. + */ +function novalnet_get_merchant_data( $purchase_data, $payment_method ) { + + global $edd_options; + + $config_data = get_merchant_details($payment_method); + $config_data['amount'] = sprintf( '%0.2f', $purchase_data['price'] ) * 100; // convert amount euro to cents. + $config_data['test_mode'] = ( ( edd_is_test_mode() ) ? 1 : ( isset( $edd_options[ $payment_method . '_test_mode' ] ) ? 1 : 0 ) ); + EDD()->session->set( 'edd_purchase_key', $config_data['key'] ); + + if ( preg_match( '/[^\d\.]/', $config_data['amount'] ) ) { + edd_set_error( 'amount_validation', __( 'The amount is invalid', 'edd-novalnet' ) ); + edd_send_back_to_checkout( '?payment-mode=' . $payment_method ); + } + + $recuring_product = 0; + foreach ( $purchase_data['downloads'] as $value ) { + if ( ! empty( $value ['options']['recurring'] ) ) { + $recuring_product++; + } + } + if ( $recuring_product > 1 ) { + edd_set_error( 'basic_validation', __( 'Multiple subscription can not be purchased at the same time ', 'edd-novalnet' ) ); + edd_send_back_to_checkout( '?payment-mode=' . $payment_method ); + } + if ( class_exists( 'EDD_Recurring' ) && ( ! empty( $edd_options['novalnet_subs_tariff_id'] ) && novalnet_digits_check( $edd_options['novalnet_subs_tariff_id'] ) ) && ( isset( $edd_options['novalnet_subs_enable_option'] ) && ! empty( $edd_options['novalnet_subs_tariff_id'] ) ) && ( isset( $purchase_data['downloads'][0]['options']['recurring'] ) || isset( $purchase_data['downloads'][1]['options']['recurring'] ) || isset( $purchase_data['downloads'][2]['options']['recurring'] ) ) ) { + if ( in_array( $payment_method, array( 'novalnet_cc', 'novalnet_sepa', 'novalnet_paypal', 'novalnet_invoice', 'novalnet_prepayment', 'novalnet_invoice_guarantee', 'novalnet_sepa_guarantee' ), true ) ) { + $config_data['tariff'] = trim( $edd_options['novalnet_subs_tariff_id'] ); + $tariff_period = false; + $trial_period = ''; + foreach ( $purchase_data['downloads'] as $purchase_key => $purchase_val ) { + if ( ! empty( $purchase_val['options']['recurring'] ) && ( empty( $purchase_val['options']['recurring']['trial_period'] ) && 1 === $purchase_val['options']['recurring']['times'] ) ) { + $config_data['tariff'] = $edd_options['novalnet_tariff_id']; + } else { + if ( ! empty( $purchase_val['options']['recurring'] ) ) { + $subs_product_id = $purchase_key; + $recurring = $purchase_val['options']['recurring']; + $tariff_times = ( ( 'quarter' === $recurring['period'] ) ? 3 : ( ( 'semi-year' === $recurring['period'] ) ? 6 : 1 ) ); + + if ( ! empty( $recurring['trial_period'] ) ) { + $trial_period = substr( $recurring['trial_period']['unit'], 0, 1 ); + if ( 'q' === $trial_period || 's' === $trial_period ) { + $trial_period = 'm'; + } + $config_data['amount'] = 0; + if ( isset($recurring['signup_fee']) && !empty($recurring['signup_fee']) ) { + $config_data['amount'] = $config_data['amount'] + ($recurring['signup_fee']); + } + if ( !empty($edd_options['prices_include_tax']) && 'yes' === $edd_options['prices_include_tax'] ) { + $config_data['amount'] = $config_data['amount'] + $purchase_data['tax']; + } else { + $config_data['amount'] = ( ! empty( $purchase_data['tax_rate'] ) && ! empty( $purchase_data['cart_details'][ $subs_product_id ]['tax'] ) ) ? ( $config_data['amount'] + ( round( $config_data['amount'] * $purchase_data['tax_rate'], 2 ) ) ): $config_data['amount'] ; + } + $config_data['amount'] = $config_data['amount'] * 100; + } + $tariff_period = substr( $recurring['period'], 0, 1 ); + if ( 'q' === $tariff_period || 's' === $tariff_period ) { + $tariff_period = 'm'; + } + } + } + } + if ( $tariff_period ) { + + $subs_product_amt = $purchase_data['cart_details'][ $subs_product_id ]['price'] * 100; + if ( 'w' === $tariff_period ) { + $tariff_period = 'd'; + $tariff_times = 1 * 7; + } + if ( 'w' === $trial_period ) { + $trial_period = 'd'; + $recurring['trial_period']['quantity'] = $recurring['trial_period']['quantity'] * 7; + } + $config_data['tariff_period'] = ( ! empty( $trial_period ) ) ? $recurring['trial_period']['quantity'] . $trial_period : $tariff_times . $tariff_period; + $config_data['tariff_period2'] = $tariff_times . $tariff_period; + + $recurring_one_time_discounts = edd_get_option( 'recurring_one_time_discounts' ) ? true : false; + if ( ! empty( $recurring['trial_period']['unit'] ) && ! empty( $recurring['trial_period']['quantity'] ) ) { + $recurring_one_time_discounts = false; + } + + if ( $purchase_data['cart_details'][ $subs_product_id ]['discount'] ) { + if ( $recurring_one_time_discounts ) { + if ( !empty($edd_options['prices_include_tax']) && 'yes' === $edd_options['prices_include_tax'] ) { + $config_data['tariff_period2_amount'] = $purchase_data['cart_details'][ $subs_product_id ]['subtotal'] * 100 + $purchase_data['tax'] * 100; + } else { + $config_data['tariff_period2_amount'] = ( ! empty( $purchase_data['tax_rate'] ) && ! empty( $purchase_data['cart_details'][ $subs_product_id ]['tax'] ) ) ? ( $purchase_data['cart_details'][ $subs_product_id ]['subtotal'] + ( round( $purchase_data['cart_details'][ $subs_product_id ]['subtotal'] * $purchase_data['tax_rate'], 2 ) ) ) * 100 : $purchase_data['cart_details'][ $subs_product_id ]['subtotal'] * 100; + } + } else { + $config_data['tariff_period2_amount'] = $subs_product_amt; + } + } else { + $config_data['tariff_period2_amount'] = $subs_product_amt; + } + } + } else { + $config_data['tariff'] = $edd_options['novalnet_tariff_id']; + }// End if. + }// End if. + return $config_data; +} + +/** + * Get payment details + * + * @param string $payment_type Allow payment to process. + * @return array. + */ +function get_payment_key( $payment_type ) { + $payment_key = array( + 'novalnet_cc' => array( + 'key' => 6, + 'payment_type' => 'CREDITCARD', + ), + 'novalnet_sepa' => array( + 'key' => 37, + 'payment_type' => 'DIRECT_DEBIT_SEPA', + ), + 'novalnet_invoice' => array( + 'key' => 27, + 'payment_type' => 'INVOICE_START', + ), + 'novalnet_prepayment' => array( + 'key' => 27, + 'payment_type' => 'PREPAYMENT', + ), + 'novalnet_instantbank' => array( + 'key' => 33, + 'payment_type' => 'ONLINE_TRANSFER', + ), + 'novalnet_paypal' => array( + 'key' => 34, + 'payment_type' => 'PAYPAL', + ), + 'novalnet_ideal' => array( + 'key' => 49, + 'payment_type' => 'IDEAL', + ), + 'novalnet_eps' => array( + 'key' => 50, + 'payment_type' => 'EPS', + ), + 'novalnet_giropay' => array( + 'key' => 69, + 'payment_type' => 'GIROPAY', + ), + 'novalnet_przelewy24' => array( + 'key' => 78, + 'payment_type' => 'PRZELEWY24', + ), + 'novalnet_cashpayment' => array( + 'key' => 59, + 'payment_type' => 'CASHPAYMENT', + ), + 'novalnet_sepa_guarantee' => array( + 'key' => 40, + 'payment_type' => 'GUARANTEED_DIRECT_DEBIT_SEPA', + ), + 'novalnet_invoice_guarantee' => array( + 'key' => 41, + 'payment_type' => 'GUARANTEED_INVOICE', + ), + ); + return $payment_key[ $payment_type ]; +} + +/** + * Get order number + * + * @param array $purchase_data Get purchase data from shop. + * @return string + */ +function get_novalnet_transaction_order( $purchase_data ) { + + global $edd_options; + + $payment_data = array( + 'price' => $purchase_data['price'], + 'date' => $purchase_data['date'], + 'user_email' => $purchase_data['user_email'], + 'purchase_key' => $purchase_data['purchase_key'], + 'currency' => edd_get_currency(), + 'downloads' => $purchase_data['downloads'], + 'cart_details' => $purchase_data['cart_details'], + 'user_info' => $purchase_data['user_info'], + 'gateway' => $purchase_data['gateway'], + ); + + $nn_order_no = edd_insert_payment( $payment_data ); + return $nn_order_no; +} + +/** + * Get customer details + * + * @since 1.0.1 + * @param array $purchase_data Get purchase data from shop. + * @return array + */ +function novalnet_get_customer_data( $purchase_data ) { + + global $edd_options; + + $name = novalnet_retrieve_name( + array( + $purchase_data['user_info']['first_name'], + $purchase_data['user_info']['last_name'], + ) + ); + // Returns customer details. + $customer_data = array_map( 'trim', + array( + 'gender' => 'u', + 'customer_no' => $purchase_data['user_info']['id'] > 0 ? trim( $edd_options['novalnet_product_id'] ) . '-' . $purchase_data['user_info']['id'] : 'guest', + 'first_name' => $name['0'], + 'last_name' => $name['1'], + 'email' => isset( $purchase_data['user_email'] ) ? $purchase_data['user_email'] : $purchase_data['user_info']['email'], + 'street' => ( ! empty( $purchase_data['user_info']['address']['line1'] ) ) ? $purchase_data['user_info']['address']['line1'] . ', ' . $purchase_data['user_info']['address']['line2'] : $purchase_data['user_info']['address']['line1'], + 'search_in_street' => 1, + 'city' => $purchase_data['user_info']['address']['city'], + 'zip' => $purchase_data['user_info']['address']['zip'], + 'country_code' => $purchase_data['user_info']['address']['country'], + 'country' => $purchase_data['user_info']['address']['country'], + + + ) + ); + if ( ! empty( $purchase_data['user_info']['company'] ) ) { + $customer_data['company'] = $purchase_data['user_info']['company']; + } + + if ( empty( $customer_data['first_name'] ) || empty( $customer_data['last_name'] ) || empty( $customer_data['email'] ) ) { + edd_set_error( 'customer_validation', __( 'Customer name/email fields are not valid', 'edd-novalnet' ) ); + edd_send_back_to_checkout( '?payment-mode=' . $purchase_data['gateway'] ); + } elseif ( empty( $customer_data['city'] ) || empty( $customer_data['zip'] ) || empty( $customer_data['country'] ) || empty( $customer_data['street'] ) ) { + edd_set_error( 'customer_validation', __( 'Please fill in all the mandatory fields', 'edd-novalnet' ) ); + edd_send_back_to_checkout( '?payment-mode=' . $purchase_data['gateway'] ); + } + return $customer_data; +} + +/** + * Get system details + * + * @since 1.0.1 + * @return array + */ +function novalnet_get_system_data() { + + $system_data = array( + 'currency' => edd_get_currency(), + 'remote_ip' => novalnet_server_addr(), + 'lang' => novalnet_shop_language(), + 'system_ip' => novalnet_server_addr( 'SERVER_ADDR' ), + 'system_name' => 'wordpress-easydigitaldownloads', + 'system_version' => get_bloginfo( 'version' ) . '-' . EDD_VERSION . '-NN-' . NOVALNET_VERSION, + 'system_url' => site_url(), + ); + return $system_data; +} + +/** + * Validates the given input data is numeric or not + * + * @since 1.0.1 + * @param integer $input Check to allow only numbers. + * @return boolean + */ +function novalnet_digits_check( $input ) { + return ( preg_match( '/^[0-9]+$/', trim( $input ) ) ); +} + +/** + * Redirect to Novalnet paygate for re-direction payments + * + * @since 1.0.1 + * @param string $paygate_url Redirect URL is passed in shop. + * @param array $params Formed parameter with redirection param is passed. + */ +function novalnet_get_redirect( $paygate_url, $params ) { + // Re-directs to third party. + $form = ''; + foreach ( $params as $k => $v ) { + $form .= '' . "\n"; + } + $form .= html_entity_decode( __( 'You are now redirected automatically', 'edd-novalnet' ) ) . ' '; + $form .= ''; + echo wp_unslash( $form ); + exit(); +} + +/** + * Check Novalnet response + * + * @since 1.0.1 + * @param array $response Get response from server. + * @param array $update_payment check if it is update payment response. + */ +function novalnet_check_response( $response, $update_payment = false ,$trial_product = '0') { + + if ( isset( $response['status'] ) && '100' === $response['status'] ) { + if ( ! empty( $response['subs_id'] ) ) { + // To restrict empty mail sending from edd-recurring. + add_action( 'edd_pre_complete_purchase', 'novalnet_restrict_mail', 10, 1 ); + } + novalnet_success( $response, $update_payment ,$trial_product ); + } else { + novalnet_transaction_failure( $response, false, $update_payment ); + } +} + +/** + * Restrict subscription mail which is sent at first due to process checkout function in edd-recurring + * + * @since 1.1.0 + * @param boolean $return Contains mail process. + * @return boolean + */ +function novalnet_restrict_mail( $return ) { + if ( ( ( ! empty( $_REQUEST['payment-mode'] ) && novalnet_check_string( $_REQUEST['payment-mode'] ) ) && ( ! empty( $_REQUEST['edd-gateway'] ) && novalnet_check_string( $_REQUEST['edd-gateway'] ) ) ) || ( ! empty( $_REQUEST['tid'] ) && ( ! empty( $_REQUEST['payment_method'] ) && in_array( $_REQUEST['payment_method'], array( 'novalnet_paypal', 'novalnet_cc' ), true ) ) ) ) { // Input var okay. + remove_action( 'edd_complete_purchase', 'edd_trigger_purchase_receipt', 999 ); + return false; + } + return $return; +} + +/** + * Pass session values in url + * + * @since 1.1.0 + * @param string $url Subscription URL. + * @return string + */ +function novalnet_subscription_url( $url ) { + + // Here Getting the payment transaction details in order confirmation page. + if ( EDD()->session->get( 'novalnet_subscription_process' ) ) { + + $redirect_param = EDD()->session->get( 'novalnet_redirect_params' ); + + EDD()->session->set( 'novalnet_subscription_process', null ); + EDD()->session->set( 'novalnet_redirect_params', null ); + + if ( ! empty( $redirect_param ) && 'PAYPAL' === $redirect_param['payment_type'] ) { + novalnet_get_redirect( 'https://payport.novalnet.de/paypal_payport', $redirect_param ); + } elseif ( ! empty( $redirect_param ) && 'CREDITCARD' === $redirect_param['payment_type'] ) { + novalnet_get_redirect( 'https://payport.novalnet.de/pci_payport', $redirect_param ); + } + novalnet_check_response( EDD()->session->get( 'novalnet_response' ) ); + } + return $url; +} + +/** + * Update and insert Novalnet Transaction details in database and payment note for Payment success + * + * @since 1.0.1 + * @param array $response Server response. + * @param array $update_payment Check response for update payment. + */ +function novalnet_success( $response, $update_payment ,$trial_product ) { + + global $edd_options, $wpdb; + $trial_product = !empty(EDD()->session->get( 'trial_product')) ? EDD()->session->get( 'trial_product') : $trial_product; + + EDD()->session->set( 'trial_product', null); + + if ( $update_payment ) { + $subs_details = get_subscription_details( $response['order_no'] ); + $subscription = new EDD_Subscription( $subs_details['subs_id'] ); + $payment_name = get_novalnet_payment( $response['order_no'] ); + + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options[ $payment_name . '_test_mode' ] ) || ! empty( $response['test_mode'] ) ); + + $exist_comments = $wpdb->get_var( $wpdb->prepare( "SELECT post_excerpt FROM {$wpdb->posts} where ID =%s", $response['order_no'] ) ); + $comments = novalnet_form_transaction_details( $response, $test_mode ); + /* translators: %s: Date */ + $comments .= sprintf( __( 'Successfully updated the payment and customer billing details for upcoming subscriptions on date: %s', 'edd-novalnet' ), date_i18n( get_option( 'date_format' ), strtotime( gmdate( 'Y-m-d H:i:s' ) ) ) ) . PHP_EOL; + edd_insert_payment_note( $response['order_no'], $comments ); + + $wpdb->update( + $wpdb->prefix . 'novalnet_subscription_details', + array( + 'recurring_tid' => $response['tid'], + ), + array( + 'order_no' => $subscription->parent_payment_id, + ) + ); // db call ok; no-cache ok. + + // Update Novalnet Transaction comments into shop database. + wp_update_post( + array( + 'ID' => $response['order_no'], + 'post_excerpt' => $exist_comments . $comments, + ) + ); + $return_url = wp_parse_url( $subscription->get_update_url() ); + wp_safe_redirect( add_query_arg( array( 'updated' => true ), $return_url['path'] ) ); + exit(); + } + + $novalnet_comments = ''; + + EDD()->session->set( 'novalnet_subscription_process', null ); + EDD()->session->set( 'novalnet_response', null ); + EDD()->session->set( 'novalnet_purchase_data', null ); + + $payment_gateways = EDD()->session->get( 'edd_purchase' ); + + update_post_meta( $response['order_no'], '_edd_payment_gateway', $payment_gateways['gateway'] ); + update_post_meta( $response['order_no'], '_nn_order_tid', $response['tid'] ); + + $invoice_payments = array( 'novalnet_invoice', 'novalnet_prepayment' ); + $amount = ( isset( $payment_gateways['gateway'] ) && in_array( $payment_gateways['gateway'], array( 'novalnet_invoice', 'novalnet_prepayment', 'novalnet_sepa' ), true ) ) ? str_replace( ',', '', sprintf( '%0.2f', $response['amount'] ) ) * 100 : str_replace( ',', '', sprintf( '%0.2f', $response['amount'] ) ); + + if ( in_array( $payment_gateways['gateway'], $invoice_payments, true ) || ( 'novalnet_paypal' === $payment_gateways['gateway'] && ( '90' === $response['tid_status'] || '85' === $response['tid_status'] ) ) || ( 'novalnet_przelewy24' === $payment_gateways['gateway'] && '86' === $response['tid_status'] ) || ( 'novalnet_cashpayment' === $payment_gateways['gateway'] ) ) { + update_post_meta( $response['order_no'], '_nn_callback_amount', 0 ); + } else { + // Set the purchase to complete. + update_post_meta( $response['order_no'], '_nn_callback_amount', get_post_meta( $response['order_no'], '_edd_payment_total', true ) * 100 ); + } + + if ( in_array( $response['tid_status'], array( '91', '99', '98', '85' ), true ) ) { + $final_order_status = $edd_options['novalnet_onhold_success_status']; + } elseif ( in_array( $response['tid_status'], array( '75', '90', '86' ), true ) ) { + $final_order_status = $edd_options[ $payment_gateways['gateway'] . '_order_pending_status' ]; + } else { + $final_order_status = $edd_options[ $payment_gateways['gateway'] . '_order_completion_status' ]; + if ( '41' === $response['key'] ) { + $final_order_status = $edd_options[ $payment_gateways['gateway'] . '_order_callback_status' ]; + } + } + + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options[ $payment_gateways['gateway'] . '_test_mode' ] ) || ! empty( $response['test_mode'] ) ); + $novalnet_comments = ''; + $novalnet_comments .= novalnet_form_transaction_details( $response, $test_mode ); + if ( in_array( $payment_gateways['gateway'], $invoice_payments, true ) && $trial_product == '0' ) { + $novalnet_comments = novalnet_get_invoice_comments( $response, $payment_gateways, $amount, $novalnet_comments); + } + + if ( 'novalnet_cashpayment' === $payment_gateways['gateway'] ) { + $novalnet_comments .= cashpayment_order_comments( $response ); + EDD()->session->set( 'cp_checkout_token', $response['cp_checkout_token'] ); + } + + update_transaction_details( $response, $payment_gateways['gateway'] ); + + $novalnet_comments = html_entity_decode( $novalnet_comments, ENT_QUOTES, 'UTF-8' ); + // Update Novalnet Transaction details into payment note. + $post_comments = get_post( $edd_options ); + $post_comments->post_excerpt .= $novalnet_comments; + // Update Novalnet Transaction details into shop database. + wp_update_post( + array( + 'ID' => $response['order_no'], + 'post_excerpt' => $novalnet_comments, + ) + ); + + EDD()->session->set( 'novalnet_transaction_comments', $novalnet_comments ); + edd_update_payment_status( $response['order_no'], $final_order_status ); + edd_insert_payment_note( $response['order_no'], $novalnet_comments ); + if ( 'publish' !== $final_order_status || ! empty( $response['subs_id'] ) ) { + edd_trigger_purchase_receipt( $response['order_no'] ); + } + + // Empty the shopping cart. + edd_empty_cart(); + + // Go to the Success page. + edd_send_to_success_page(); + +} + +/** + * Update the transaction details into the novalnet table + * + * @param array $response Server response. + * @param string $payment_gateway payment name. + */ +function update_transaction_details( $response, $payment_gateway ) { + global $wpdb, $edd_options; + + $payment = get_novalnet_payment( $response['order_no'] ); + $payment = ! empty( $payment_gateway ) ? $payment_gateway : $payment; + + $subscription_details = get_subscription_details( $response['order_no'] ); + + if ( ! empty( $response['tariff_period'] ) || ! empty( $response['subs_id'] ) || ! empty( $subscription_details['subs_id'] ) ) { + $wpdb->update( + $wpdb->prefix . 'edd_subscriptions', + array( + 'transaction_id' => $response['tid'], + ), + array( + 'parent_payment_id' => $response['order_no'], + ) + ); + $subscription = new EDD_Subscription( $subscription_details['subs_id'] ); + if ( '100' !== $response['status'] ) { + $subscription->cancel(); + } + } + + $invoice_payments = array( 'novalnet_invoice', 'novalnet_prepayment' ); + $test_mode = (int) ( edd_is_test_mode() || ! empty( $payment . '_test_mode' ) || ! empty( $response['test_mode'] ) ); + $amount = str_replace( ',', '', sprintf( '%0.2f', $response['amount'] ) ) * 100; + + $customer_id = edd_get_payment_user_id( $response['order_no'] ); + + update_post_meta( $response['order_no'], '_nn_customer_id', $edd_options['novalnet_product_id'] . '-' . $customer_id ); + + $wpdb->insert( + "{$wpdb->prefix}novalnet_transaction_detail", + array( + 'order_no' => $response['order_no'], + 'vendor_id' => trim( $edd_options['novalnet_merchant_id'] ), + 'auth_code' => trim( $edd_options['novalnet_auth_code'] ), + 'product_id' => trim( $edd_options['novalnet_product_id'] ), + 'tariff_id' => trim( $edd_options['novalnet_tariff_id'] ), + 'subs_id' => ! empty( $response['subs_id'] ) ? $response['subs_id'] : '', + 'payment_id' => ( isset( $response['key'] ) && !empty( $response['key'] ) ) ? $response['key'] : !empty($response['payment_id']) ? $response['payment_id'] :'', + 'payment_type' => $payment, + 'tid' => $response['tid'], + 'gateway_status' => ! empty( $response['tid_status'] ) ? $response['tid_status'] : '', + 'amount' => $amount, + 'callback_amount' => ( ! in_array( $payment, $invoice_payments, true ) ) ? $amount : 0, + 'currency' => edd_get_currency(), + 'test_mode' => $test_mode, + 'customer_id' => $customer_id, + 'customer_email' => edd_get_payment_user_email( $response['order_no'] ), + 'date' => gmdate( 'Y-m-d H:i:s' ), + ) + ); // db call ok; no-cache ok. + + if ( ! empty( $response['subs_id'] ) ) { + + $total_length = $subscription->bill_times; + + $wpdb->insert( + "{$wpdb->prefix}novalnet_subscription_details", + array( + 'order_no' => $response['order_no'], + 'payment_type' => $payment, + 'recurring_payment_type' => $payment, + 'recurring_amount' => $amount, + 'recurring_tid' => $response['tid'], + 'tid' => $response['tid'], + 'signup_date' => gmdate( 'Y-m-d H:i:s' ), + 'subs_id' => $response['subs_id'], + 'next_payment_date' => ! empty( $response['next_subs_cycle'] ) ? $response['next_subs_cycle'] : $response['paid_until'], + 'subscription_length' => ! empty( $total_length ) ? $total_length : 0, + ) + ); // db call ok; no-cache ok. + } + +} + +/** + * Update the failure transaction in shop backend + * + * @param array $response Server response. + * @param boolean $hash Check the hash error + */ +function novalnet_transaction_failure( $response, $hash = false, $update_payment = false ) { + + global $edd_options, $wpdb; + + if ( $update_payment ) { + $subs_details = get_subscription_details( $response['order_no'] ); + $subscription = new EDD_Subscription( $subs_details['subs_id'] ); + $return_url = wp_parse_url( $subscription->get_update_url() ); + if ( $hash ) { + edd_set_error( 'server_direct_validation', __( 'While redirecting some data has been changed. The hash check failed', 'edd-novalnet' ) ); + wp_safe_redirect( add_query_arg( array( 'action' => 'update', + 'subscription_id' => $subscription->id ), $return_url['path'] ) ); + die(); + } + $exist_comments = $wpdb->get_var( $wpdb->prepare( "SELECT post_excerpt FROM {$wpdb->posts} where ID =%s", $response['order_no'] ) ); + $error_msg = get_status_desc( $response ); + + // Update failure comments to order note + $comments = PHP_EOL . sprintf( __( 'Recurring change payment method has been failed due to %s', 'edd-novalnet' ), $error_msg ); + edd_insert_payment_note( $response['order_no'], $comments ); + + // Update Novalnet Transaction comments into shop database. + wp_update_post( + array( + 'ID' => $response['order_no'], + 'post_excerpt' => $exist_comments . $comments, + ) + ); + + edd_set_error( 'edd_recurring_novalnet', $error_msg ); + wp_safe_redirect( add_query_arg( array( 'action' => 'update', 'subscription_id' => $subscription->id ), $return_url['path'] ) ); + die(); + } + + EDD()->session->set( 'novalnet_subscription_process', null ); + EDD()->session->set( 'novalnet_response', null ); + EDD()->session->set( 'novalnet_purchase_data', null ); + + $payment_gateways = EDD()->session->get( 'edd_purchase' ); + + update_post_meta( $response['order_no'], '_edd_payment_gateway', $payment_gateways['gateway'] ); + update_post_meta( $response['order_no'], '_nn_order_tid', $response['tid'] ); + + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options[ $payment_gateways['gateway'] . '_test_mode' ] ) || ! empty( $response['test_mode'] ) ); + $novalnet_comments = ''; + $novalnet_comments .= novalnet_form_transaction_details( $response, $test_mode ); + $novalnet_comments .= ( isset( $response['status_text'] ) ? $response['status_text'] : ( isset( $response['status_desc'] ) ? $response['status_desc'] : $response['status_message'] ) ); + + update_transaction_details( $response, $payment_gateways['gateway'] ); + + $novalnet_comments = html_entity_decode( $novalnet_comments, ENT_QUOTES, 'UTF-8' ); + // Update Novalnet Transaction details into payment note. + $post_comments = get_post( $edd_options ); + $post_comments->post_excerpt .= $novalnet_comments; + // Update Novalnet Transaction details into shop database. + wp_update_post( + array( + 'ID' => $response['order_no'], + 'post_excerpt' => $novalnet_comments, + ) + ); + edd_update_payment_status( $response['order_no'], 'abandoned' ); + edd_insert_payment_note( $response['order_no'], $novalnet_comments ); + + edd_set_error( 'server_direct_validation', get_status_desc( $response ) ); + if ( $hash ) { + edd_set_error( 'server_direct_validation', __( 'While redirecting some data has been changed. The hash check failed', 'edd-novalnet' ) ); + } + + edd_send_back_to_checkout( '?payment-mode='. $payment_gateways['gateway'] ); +} + +/** + * Fetch subscription details + * + * @param integer $post_id Get relevant subscription post_id. + * @return array $subs_details Subscription details are taken from core table. + */ +function get_subscription_details( $post_id ) { + global $wpdb; + + $subs_details = array(); + + if ( class_exists( 'EDD_Recurring' ) ) { + $subs_details['subs_plugin_enabled'] = true; + $subs_details['subs_id'] = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}edd_subscriptions WHERE parent_payment_id='%s'", $post_id ) ); // db call ok; no-cache ok. + } + return $subs_details; +} + + /** + * Retrieves the Novalnet subscription cancel reasons + * + * @since 1.1.0 + * @return array + */ +function novalnet_subscription_cancel_list() { + return array( + __( 'Product is costly', 'edd-novalnet' ), + __( 'Cheating', 'edd-novalnet' ), + __( 'Partner interfered', 'edd-novalnet' ), + __( 'Financial problem', 'edd-novalnet' ), + __( 'Content does not match my likes', 'edd-novalnet' ), + __( 'Content is not enough', 'edd-novalnet' ), + __( 'Interested only for a trial', 'edd-novalnet' ), + __( 'Page is very slow', 'edd-novalnet' ), + __( 'Satisfied customer', 'edd-novalnet' ), + __( 'Logging in problems', 'edd-novalnet' ), + __( 'Other', 'edd-novalnet' ), + ); +} + + /** + * Novalnet subscription cancel action performs + * + * @since 1.1.0 + * @param object $subscription The Subscription object. + * @return array + */ +function novalnet_subs_cancel_perform( $subscription ) { + global $wpdb; + $result_set = $wpdb->get_row( $wpdb->prepare( "SELECT vendor_id, auth_code, product_id, tariff_id, payment_id,tid FROM {$wpdb->prefix}novalnet_transaction_detail WHERE order_no=%s ORDER BY id DESC", $subscription->parent_payment_id ), ARRAY_A ); // db call ok; no-cache ok. + $termination_reason = $wpdb->get_row( $wpdb->prepare( "SELECT termination_reason FROM {$wpdb->prefix}novalnet_subscription_details WHERE order_no=%s ORDER BY id DESC", $subscription->parent_payment_id ), ARRAY_A ); // db call ok; no-cache ok. + $language = novalnet_shop_language(); + if ( empty( $termination_reason['termination_reason'] ) ) { + $cancel_request = array( + 'vendor' => $result_set['vendor_id'], + 'auth_code' => $result_set['auth_code'], + 'product' => $result_set['product_id'], + 'tariff' => $result_set['tariff_id'], + 'tid' => $result_set['tid'], + 'key' => $result_set['payment_id'], + 'cancel_sub' => 1, + 'cancel_reason' => 'Other', + 'lang' => $language, + ); + $wpdb->update( + $wpdb->prefix . 'novalnet_subscription_details', + array( + 'termination_reason' => isset( $cancel_request['cancel_reason'] ) ? $cancel_request['cancel_reason'] : 'Other', + 'termination_at' => gmdate( 'Y-m-d H:i:s' ), + ), + array( + 'order_no' => $subscription->parent_payment_id, + ) + ); // db call ok; no-cache ok. + return novalnet_submit_request( $cancel_request ); + } else { + echo 'The subscription has been already stopped or cancelled. '; + } + return array(); +} + +/** + * Get transaction details in order success page + * + * @since 1.0.1 + * @param boolean $post_comments Get DB post comments. + */ +function novalnet_transaction_detail_checkout( $post_comments ) { + EDD()->session->set( 'novalnet', null ); + $nn_post_id = get_post( $post_comments ); + $payment_name = get_novalnet_payment( $nn_post_id->ID ); + if ( novalnet_check_string( $payment_name ) ) { + echo wpautop( edd_get_gateway_checkout_label( $payment_name ) . $nn_post_id->post_excerpt ); + } +} + +/** + * Receive Novalnet response for redirection payments + * + * @since 1.0.1 + * @param boolean $update_payment Check for update payment. + */ +function novalnet_get_redirect_response( $update_payment = false ) { + + global $wpdb; + $redirect_response = wp_unslash( $_REQUEST ); // Input var okay. + $order_ref = array(); + if ( isset($redirect_response['order_no']) && !empty($redirect_response['order_no']) ) { + $order_ref = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}novalnet_transaction_detail WHERE order_no=%s", $redirect_response['order_no'] ) ); + } + + if ( empty($order_ref) || ( ! empty($order_ref) && $update_payment ) ) { + + // Decode the redirect response. + $redirect_response = decode_paygate_response( $redirect_response ); + + if ( isset( $redirect_response['tid_status'] ) && ( in_array( $redirect_response['tid_status'], array( '98', '85', '86', '90', '100' ), true ) ) && isset( $redirect_response['tid'] ) ) { + if ( ! novalnet_check_hash( $redirect_response ) ) { + novalnet_transaction_failure( $redirect_response, true, $update_payment ); + } else { + novalnet_check_response( $redirect_response, $update_payment ); + } + } elseif ( ! empty( $redirect_response['status'] ) && '100' !== $redirect_response['status'] ) { + novalnet_transaction_failure( $redirect_response, false, $update_payment ); + } + } else { + edd_send_back_to_checkout(); + } +} + +/** + * Perform the decoding paygate response process for redirection payment methods + * + * @param array $datas This is array of transaction data. + * + * @return string + */ +function decode_paygate_response( $datas ) { + $result = array(); + + $data['auth_code'] = $datas['auth_code']; + $data['tariff'] = $datas['tariff']; + $data['product'] = $datas['product']; + $data['amount'] = $datas['amount']; + $data['test_mode'] = $datas['test_mode']; + $data['uniqid'] = $datas['uniqid']; + + foreach ( $data as $key => $value ) { + $result[ $key ] = generate_decode( $value, $data['uniqid'] ); // Decode process. + } + return array_merge( $datas, $result ); +} + +/** + * Perform the decoding process for redirection payment methods + * + * @param $data array The transaction data. + * @param $uniqid string The string value. + * @return string + */ +function generate_decode( $data = '', $uniqid ) { + global $edd_options; + try { + $data = openssl_decrypt( base64_decode( $data ), 'aes-256-cbc', $edd_options['novalnet_access_key'], true, $uniqid ); + } catch ( Exception $e ) { // Error log for the exception. + echo esc_html( 'Error: ' . $e ); + } + return $data; +} + +/** + * Set default payment as chosen payment + * + * @since 1.0.1 + * @return string $set_default_payment Default payment is checked. + */ +function novalnet_set_default_gateway() { + global $edd_options; + $set_default_payment = ''; + $payment_gateways = EDD()->session->get( 'edd_purchase' ); + $current_payment = isset( $payment_gateways['gateway'] ) ? $payment_gateways['gateway'] : ''; + $invalid_pin_count = EDD()->session->get( $current_payment . '_pin_invalid_count' ); + if ( isset( $edd_options['default_gateway'] ) && edd_is_gateway_active( $edd_options['default_gateway'] ) ) { + $set_default_payment = $edd_options['default_gateway']; + } elseif ( isset( $current_payment ) && ! empty( $current_payment ) && ! $invalid_pin_count ) { + $set_default_payment = $current_payment; + } + return $set_default_payment; +} + +/** + * Returns the gateway icon for payment logo. + * + * @since 1.0.1 + * @param string $payment_method Get payment name. + * @param string $payment_method_name Get payment method name. + */ +function novalnet_display_payment_logo( $payment_method, $payment_method_name ) { + global $edd_options; + $icon_html = isset( $edd_options['novalnet_common_payment_logo'] ) ? $edd_options['novalnet_common_payment_logo'] : ''; + if ( $icon_html == 'yes') { + if ( 'novalnet_cc' !== $payment_method ) { ?> + + + + 'POST', + 'timeout' => 240, + 'body' => $urlparam, + ) + ); + + // Check for error. + if ( is_wp_error( $response ) ) { + return 'tid=&status=' . $response->get_error_code() . '&status_message=' . $response->get_error_message(); + } + + // Return the response. + return $response['body']; +} + +/** + * Remove the payment which is not for recurring process + * + * @since 1.0.1 + * @param array $gateway_list Get enabled payment. + * @return array $gateway_list payment are displayed in checkout. + */ +function remove_novalnet_payment( $gateway_list ) { + global $edd_options; + + if ( ! is_admin() && ( empty( $edd_options['novalnet_public_key'] ) || empty( $edd_options['novalnet_tariff_id'] ) ) ) { + foreach ( array_keys( $gateway_list ) as $value ) { + if ( novalnet_check_string( $value ) ) { + unset( $gateway_list [ $value ] ); + } + } + } + if ( ! is_admin() && !isset( $edd_options['novalnet_client_key'] ) ) { + foreach ( array_keys( $gateway_list ) as $value ) { + if ( novalnet_check_string( $value ) ) { + if ( 'novalnet_cc' === $value ) { + unset( $gateway_list [ $value ] ); + } + } + } + } + $recurring = false; + $cart_details = edd_get_cart_content_details(); + foreach ( (array) $cart_details as $cart_val ) { + if ( ! empty( $cart_val ['item_number']['options']['recurring'] ) ) { + $recurring = true; + break; + } + } + + if ( $recurring && isset( $edd_options['novalnet_subs_payments'] ) ) { + foreach ( array_keys( $gateway_list ) as $value ) { + if ( novalnet_check_string( $value ) && ! in_array( $value, $edd_options['novalnet_subs_payments'], true ) && ( !empty($edd_options['novalnet_subs_enable_option']) && '1' === $edd_options['novalnet_subs_enable_option'] ) || ( novalnet_check_string( $value ) && empty( $edd_options['novalnet_subs_enable_option'] ) ) ) { + unset( $gateway_list [ $value ] ); + } + } + if ( novalnet_check_string( $edd_options['default_gateway'] ) && isset( $edd_options['default_gateway'] ) && ! in_array( $edd_options['default_gateway'], $edd_options['novalnet_subs_payments'], true ) && ( !empty($edd_options['novalnet_subs_enable_option']) && '1' === $edd_options['novalnet_subs_enable_option'] ) ) { + $subs_payments = $edd_options['novalnet_subs_payments']; + for ( $i = 0; $i < count( $subs_payments ); $i++ ) { + $edd_options['default_gateway'] = $subs_payments[ $i ]; + } + } else if( novalnet_check_string( $edd_options['default_gateway'] ) && !empty($gateway_list) && ! in_array( $edd_options['default_gateway'], array_keys( $gateway_list ), true ) ){ + $available_gateways = array_keys( $gateway_list ); + $edd_options['default_gateway'] = $available_gateways[0]; + } + } + return $gateway_list; +} + +/** + * Check the response hash is equal to request hash + * + * @since 1.0.1 + * @param array $request Get hash value and check. + * @return string + */ +function novalnet_check_hash( $request ) { + return ( $request['hash2'] !== generate_md5_value( $request ) ); +} + + /** + * Submit the given request to the given url + * + * @since 1.1.0 + * @param array $request Get request data. + * @param string $url URL to proceed to Novalnet. + * @return object + */ +function novalnet_submit_request( $request, $url = 'https://payport.novalnet.de/paygate.jsp' ) { + $request = http_build_query( $request ); + $data = novalnet_handle_communication( $url, $request ); + wp_parse_str( $data, $response ); + return $response; +} + +/** + * Get transaction details in mail content + * + * @since 1.0.1 + * @param string $label Append in transaction detail. + * @param array $gateway Check for Novalnet payments. + * @return $label + */ +function novalnet_transaction_detail_email( $label, $gateway ) { + if ( novalnet_check_string( $gateway ) ) { + $label .= EDD()->session->get( 'novalnet_transaction_comments' ); + } + return $label; +} + +/** + * Get transaction details in proper alignment for back-end each order history + * + * @since 1.0.1 + * @param string $comments Post comments in DB. + * @return string $comments Retrieve comments in DB. + */ +function novalnet_backend_comments( $comments ) { + foreach ( $comments as $value ) { + if ( novalnet_check_string( get_post_meta( $value->comment_post_ID, '_edd_payment_gateway', true ) ) ) { + $value->comment_content = nl2br( $value->comment_content ); + } + } + return $comments; +} + +/** + * Get transaction details in proper alignment for back-end each order history + * + * @since 1.0.1 + * @param array $mail_body Get list of mail content. + * @param array $payment_id Get payment order no. + * @return string + */ +function novalnet_sale_notification( $mail_body, $payment_id ) { + if ( ! is_admin() && novalnet_check_string( get_post_meta( $payment_id, '_edd_payment_gateway', true ) ) ) { + EDD()->session->set( 'novalnet_transaction_comments', null ); + } + return $mail_body; +} + +/** + * Add renewal periods in the shop hook as it is not included in shop structure. + * + * @since 1.0.1 + * @param date $expiration Get expire date. + * @param integer $id Get order id to process. + * @param object $subs_db Get subscription details. + * @return array + */ +function novalnet_add_period( $expiration, $id, $subs_db ) { + if ( novalnet_check_string( $subs_db->gateway ) && in_array( $subs_db->period, array( 'quarter', 'semi-year' ), true ) ) { + $expires = $subs_db->get_expiration_time(); + // Determine what date to use as the start for the new expiration calculation. + if ( $expires > current_time( 'timestamp' ) && $subs_db->is_active() ) { + $base_date = $expires; + } else { + $base_date = current_time( 'timestamp' ); + } + if ( 'quarter' === $subs_db->period ) { + $length = '+3'; + $period = 'month'; + } else { + $length = '+6'; + $period = 'month'; + } + $expiration = gmdate( 'Y-m-d H:i:s', strtotime( $length . $period . ' 23:59:59', $base_date ) ); + } + return $expiration; +} + +/** + * Perform serialize data. + * + * @since 1.1.1 + * @param array $response Get server response. + * @param array $payment_gateways List the payment gateways. + * @param integer $amount Order placed amount to be shown in invoice. + * @param array $novalnet_comments Store the comments. + * @param boolean $cond The condition check. + * @param boolean $callback The callback via comments. + * @return array + */ +function novalnet_get_invoice_comments( $response, $payment_gateways, $amount, $novalnet_comments, $cond = true, $callback = false ) { + + global $edd_options, $wpdb; + + $payment_gateways = isset( $payment_gateways['gateway'] ) ? $payment_gateways['gateway'] : $payment_gateways; + $product = isset( $edd_options['novalnet_product_id'] ) ? $edd_options['novalnet_product_id'] : ( isset( $response['product_id'] ) ? $response['product_id'] : $edd_options['novalnet_product_id'] ); + $invoice_referece = 'BNR-' . $product . '-' . $response['order_no']; + $response['invoice_ref'] = $invoice_ref = ( isset( $response['invoice_ref'] ) && ! empty( $response['invoice_ref'] ) ) ? $response['invoice_ref'] : $invoice_referece; + $novalnet_comments .= PHP_EOL; + if ( isset( $response['tid_status'] ) && '75' === $response['tid_status'] && '41' === $response['key'] ) { + $novalnet_comments .= __( '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.', 'edd-novalnet' ); + } elseif ( '100' === $response['tid_status'] || '91' === $response['tid_status'] ) { + $novalnet_comments .= __( 'Please transfer the amount to the below mentioned account.', 'edd-novalnet' ) . PHP_EOL; + if ( '100' === $response['tid_status'] ) { + $due_date = !empty($response['due_date']) ? date_i18n( get_option( 'date_format' ), strtotime( $response['due_date'] ) ) : ''; + $novalnet_comments .= __( 'Due date: ', 'edd-novalnet' ) .$due_date. PHP_EOL; + } + $novalnet_comments .= __( 'Account holder: ', 'edd-novalnet' ) . $response['invoice_account_holder'] . PHP_EOL; + $novalnet_comments .= ' IBAN: ' . $response['invoice_iban'] . PHP_EOL; + $novalnet_comments .= ' BIC: ' . $response['invoice_bic'] . PHP_EOL; + $amount = edd_format_amount( $response['amount'] ); + if ( $callback ) { + $amount = edd_format_amount( $response['amount'] / 100 ); + } + $novalnet_comments .= ' Bank: ' . $response['invoice_bankname'] . ' ' . trim( isset( $response['invoice_bankplace'] ) ? $response['invoice_bankplace'] : '' ) . PHP_EOL; + $novalnet_comments .= __( 'Amount: ', 'edd-novalnet' ) . edd_currency_filter( $amount ) . PHP_EOL; + $increment = 1; + if ( $cond ) { + $novalnet_comments .= PHP_EOL . __( 'Please use the following payment reference for your money transfer, as only through this way your payment is matched and assigned to the order:', 'edd-novalnet' ); + $novalnet_comments .= PHP_EOL; + } + $payment_ref = array( + 'TID ' . $response['tid'] . PHP_EOL, + $invoice_ref . PHP_EOL, + ); + foreach ( $payment_ref as $key ) { + $novalnet_comments .= sprintf( __( 'Payment Reference %s: ', 'edd-novalnet' ), $increment++ ); + $novalnet_comments .= $key; + } + } + return $novalnet_comments; +} + +/** + * To get the order comments for cashpayment + * + * @param string $response get the payment response. + * @return string + */ +function cashpayment_order_comments( $response ) { + $store_count = 1; + foreach ( $response as $key => $value ) { + if ( strpos( $key, 'nearest_store_title' ) !== false ) { + $store_count++; + } + } + $comments = PHP_EOL; + if ( $response['cp_due_date'] ) { + $comments .= __( 'Slip expiry date', 'edd-novalnet' ) . ': ' . $response['cp_due_date']; + } + $comments .= PHP_EOL . PHP_EOL; + $comments .= __( 'Store(s) near you', 'edd-novalnet' ) . PHP_EOL . PHP_EOL; + for ( $i = 1; $i < $store_count; $i++ ) { + $comments .= $response[ 'nearest_store_title_' . $i ] . PHP_EOL; + $comments .= $response[ 'nearest_store_street_' . $i ] . PHP_EOL; + $comments .= $response[ 'nearest_store_city_' . $i ] . PHP_EOL; + $comments .= $response[ 'nearest_store_zipcode_' . $i ] . PHP_EOL; + foreach ( edd_get_country_list() as $country_code => $country ) { + if ( $country_code === $response[ 'nearest_store_country_' . $i ] ) { + $comments .= $country . PHP_EOL . PHP_EOL; + } + } + } + return $comments; +} + +/** + * Perform serialize data. + * + * @since 1.1.1 + * @param array $data The resourse data. + * + * @return string + */ +function novalnet_serialize_data( $data ) { + return ! empty( $data ) ? wp_json_encode( $data ) : ''; +} + +/** + * Returns Wordpress-blog language. + * + * @since 2.0.0 + * @return string + */ +function novalnet_shop_language() { + return strtoupper( substr( get_bloginfo( 'language' ), 0, 2 ) ); +} + +/** + * Formating the date as per the + * shop structure. + * + * @since 2.0.0 + * @param date $date The date value. + * + * @return string + */ +function edd_novalnet_formatted_date( $date = '' ) { + return date_i18n( get_option( 'date_format' ), strtotime( '' === $date ? gmdate( 'Y-m-d H:i:s' ) : $date ) ); +} + +/** + * Returns redirect param + * + * @since 1.1.1 + * @param string $payment_name Get the payment name. + * @param array $payment_data Get the payment data. + * @return array + */ +function novalnet_get_redirect_param( $payment_name, $payment_data = array(), $subs_update = array() ) { + global $edd_options; + + $encode_array = array(); + + if ( ! empty( $payment_data ['tariff_period'] ) && ! empty( $payment_data ['tariff_period2'] ) && ! empty( $payment_data ['tariff_period2_amount'] ) ) { + // Form subscription params to encode. + $encode_array['tariff_period'] = $payment_data ['tariff_period']; + $encode_array['tariff_period2'] = $payment_data ['tariff_period2']; + $encode_array['tariff_period2_amount'] = $payment_data ['tariff_period2_amount']; + } + $encode_array['auth_code'] = $payment_data['auth_code']; + $encode_array['product'] = $payment_data['product']; + $encode_array['tariff'] = $payment_data['tariff']; + $encode_array['test_mode'] = $payment_data['test_mode']; + $encode_array['amount'] = $payment_data ['amount']; + $encode_array['uniqid'] = unique_string(); + + $config_data = generate_hash_value( $encode_array ); + + if ( isset($subs_update['update_payment']) && $subs_update['update_payment'] ) { + + $return_url = isset($subs_update['return_url']) ? $subs_update['return_url'] : ''; + $redirect_url = add_query_arg( array( 'edd-api' => 'novalnet_update_payment_method'), $return_url); + } else { + $redirect_url = add_query_arg( + array( + 'edd-api' => 'novalnet_redirect_response', + ), + edd_get_checkout_uri() + ); + if ( version_compare(EDD_VERSION, '2.5.17', '<=') ) { + $redirect_url = add_query_arg( + array( + 'edd-api' => 'products', + ), + edd_get_checkout_uri() + ); + } + } + + // Form redirect parameters. + $config_data['return_url'] = $redirect_url; + $config_data['return_method'] = 'POST'; + $config_data['error_return_url'] = $redirect_url; + $config_data['error_return_method'] = 'POST'; + $config_data['implementation'] = 'ENC'; + + return $config_data; +} + +/** + * Perform HASH Generation process for redirection payment methods + * + * @param array $datas Get the redirect params. + * @return string + */ +function generate_hash_value( $datas ) { + // Form params to encode. + $encode_array = array( 'auth_code', 'product', 'tariff', 'amount', 'test_mode' ); + if ( ! empty( $datas ['tariff_period'] ) && ! empty( $datas ['tariff_period2'] ) && ! empty( $datas ['tariff_period2_amount'] ) ) { + // Form subscription params to encode. + $encode_array = array_merge( $encode_array, array( 'tariff_period', 'tariff_period2', 'tariff_period2_amount' ) ); + } + foreach ( $encode_array as $key ) { + $datas[ $key ] = generate_encode( $datas[ $key ], $datas['uniqid'] ); // Encoding process. + } + $datas['hash'] = generate_md5_value( $datas ); // Generate hash value. + return $datas; +} + +/* + * Perform the encoding process for redirection payment methods + * + * @param array $data Get the encode data. + * @param string $uniqid Get the unique id. + * + * @return string + */ +function generate_encode( $data = '', $uniqid ) { + global $edd_options; + try { + $data = htmlentities( base64_encode( openssl_encrypt( $data, 'aes-256-cbc', $edd_options['novalnet_access_key'], true, $uniqid ) ) ); + } catch ( Exception $e ) { // Error log for the exception + echo esc_html( 'Error: ' . $e ); + } + return $data; +} + +/** + * Get hash value + * + * @param string $datas Get the encode data. + * @return string + */ +function generate_md5_value( $datas ) { + global $edd_options; + return hash( 'sha256', ( $datas['auth_code'] . $datas['product'] . $datas['tariff'] . $datas['amount'] . $datas['test_mode'] . $datas['uniqid'] . strrev( $edd_options['novalnet_access_key'] ) ) ); +} + +/** + * Generate 30 digit unique string + * + * return string + */ +function unique_string() { + $uniqid = explode( ',', '8,7,6,5,4,3,2,1,9,0,9,7,6,1,2,3,4,5,6,7,8,9,0' ); + shuffle( $uniqid ); + return substr( implode( '', $uniqid ), 0, 16 ); +} + +/** + * Form transaction detail. + * + * @since 1.1.1 + * @param array $response Get response from server. + * @param string $test_mode Form testmode value. + * @param boolean $callback Check response from callback. + * @return array + */ +function novalnet_form_transaction_details( $response, $test_mode, $callback = false ) { + + $tid = ( $callback && !empty( $response['tid_payment'] ) ) ? $response['tid_payment'] : $response['tid']; + $novalnet_comments = ''; + + $payment_name = get_novalnet_payment( $response['order_no'] ); + + if ( '100' === $response['status'] && isset( $response['key'] ) && ( '40' === $response['key'] || '41' === $response['key'] ) ) { + $novalnet_comments .= PHP_EOL . __( 'This is processed as a guarantee payment', 'edd-novalnet' ); + } + $novalnet_comments .= PHP_EOL . sprintf( __( 'Novalnet transaction ID: %s', 'edd-novalnet' ), ! empty( $response ) ? $tid : $response['shop_tid'] ) . PHP_EOL; + + $novalnet_comments .= ( '1' == $test_mode ) ? __( 'Test order', 'edd-novalnet' ) . PHP_EOL : ''; + if ( isset( $response['tid_status'] ) && '75' === $response['tid_status'] && 'novalnet_sepa' === $payment_name ) { + $novalnet_comments .= PHP_EOL . __( 'Your order is under verification and we will soon update you with the order status. Please note that this may take upto 24 hours.', 'edd-novalnet' ); + } + return $novalnet_comments; +} + +/** + * Retrieve the name of the end user. + * + * @since 1.1.1 + * @param string $name The customer name value. + * @return array + */ +function novalnet_retrieve_name( $name ) { + // Retrieve first name and last name from order objects. + if ( empty( $name['0'] ) ) { + $name['0'] = $name['1']; + } + if ( empty( $name['1'] ) ) { + $name['1'] = $name['0']; + } + return $name; +} + +/** + * Basic requirements validation for guarantee payment. + * + * @since 2.0.0 + * @param array $user_data Get users details. + * @param string $payment_name Get payment name. + */ +function novalnet_guarantee_payment_validation( $user_data, $payment_name,$trial_product = '0' ) { + + global $edd_options; + + $order_amount = ( isset( $user_data['price'] ) && !empty( $user_data['price'] ) ) ? sprintf( '%0.2f', $user_data['price'] ) * 100 : sprintf( '%0.2f', edd_get_cart_total() ) * 100; + + // Billing address. + $billing_details = isset( $user_data['_edd_user_address'] ) ? unserialize( $user_data['_edd_user_address'][0] ) : $user_data['user_info']['address']; + + $min_amount = isset( $edd_options[ $payment_name . '_guarantee_minimum_order_amount' ] ) ? $edd_options[ $payment_name . '_guarantee_minimum_order_amount' ] : ''; + $minimum_amount = (trim( $min_amount ) > 999 && novalnet_digits_check( $min_amount ) ) ? $min_amount : 999; + $error_message = ''; + // Payment guarantee process. + if ( '1' === $edd_options[ $payment_name . '_guarantee_enable' ] && $trial_product == '0' ){ + + // Show error on payment field/ checkout. + if ( ! in_array( $billing_details['country'], array( 'AT', 'DE', 'CH' ), true ) ) { + $error_message .= '' . __( 'Only Germany, Austria or Switzerland are allowed', 'edd-novalnet' ); + } + if ( 'EUR' !== edd_get_currency() ) { + $error_message .= '' . __( 'Only EUR currency allowed', 'edd-novalnet' ); + } + if ( $order_amount < $minimum_amount ) { + /* translators: %s: amount */ + $error_message .= '' . sprintf( __( 'Minimum order amount must be %s', 'edd-novalnet' ), edd_currency_filter( edd_format_amount( $minimum_amount / 100 ) ) ); + } + EDD()->session->set( $payment_name . '_guarantee_payment_error', trim( str_replace( '', ', ', $error_message ), ',' ) ); + + if ( ! isset( $edd_options[ $payment_name . '_force_normal_payment' ] ) ) { + return $error_message; + } + } else { + // Process as normal payment. + EDD()->session->set( $payment_name . '_guarantee_payment_error', null ); + } +} + +/** + * Validations for date of birth + * + * @param string $day Get customer birth day. + * @param string $month Get customer birth month. + * @param string $year Get customer birth year. + * @param string $payment_name Get payment name. + * @return string + */ +function check_guarantee_payment( $day, $month, $year, $payment_name ) { + + $message = ''; + $date_check = $day . '.' . $month . '.' . $year; + $total_days = 0; + EDD()->session->set( $payment_name . '_dob', null ); + if ( ! empty( novalnet_digits_check( $month ) ) && ! empty( novalnet_digits_check( $year ) ) ) { + $total_days = cal_days_in_month( CAL_GREGORIAN, $month, $year ); + } + + if ( empty( $day ) && empty( $month ) && empty( $year ) ) { + $message = __( 'Please enter your date of birth', 'edd-novalnet' ); + } elseif ( ( $day > $total_days ) || ( empty( $day ) || empty( $month ) || empty( $year ) ) || ! preg_match( '/^(0[1-9]|[1-2][0-9]|3[0-1]).(0[1-9]|1[0-2]).([0-9]{4})$/', $date_check ) ) { + $message = __( 'The date format is invalid', 'edd-novalnet' ); + } elseif ( time() < strtotime( '+18 years', strtotime( $date_check ) ) ) { + $message = __( 'You need to be at least 18 years old', 'edd-novalnet' ); + } else { + EDD()->session->set( $payment_name . '_dob', $date_check ); + } + EDD()->session->set( $payment_name . '_guarantee_dob_payment_error', $message ); + return $message; +} + +/** + * Get order number for transaction + * + * @param array $purchase_data Get customer detail. + * @param array $params Transaction parameters. + * @return void + */ +function novalnet_check_subscription( $purchase_data, &$params ) { + + if ( ! empty( $params ['tariff_period'] ) && ! empty( $params ['tariff_period2'] ) && ! empty( $params ['tariff_period2_amount'] ) ) { + EDD()->session->set( $purchase_data['gateway'] . '_subscription', $params ); + EDD()->session->set( 'novalnet_purchase_data', $purchase_data ); + $subscription = new EDD_Recurring_Gateway(); + $subscription->process_checkout( $purchase_data ); + } else { + // Get transaction order number. + $edd_order = get_novalnet_transaction_order( $purchase_data ); + $params['order_no'] = $edd_order; + } +} + +/** + * Get payment name + * + * @since 2.0.1 + * @param string $payment_id Get pament name for that id. + */ +function get_novalnet_payment( $payment_id ) { + $payment_name = get_post_meta( $payment_id, '_edd_payment_gateway', true); + return $payment_name; +} diff --git a/languages/edd-novalnet-de_DE.mo b/languages/edd-novalnet-de_DE.mo new file mode 100755 index 0000000..2fa1bec Binary files /dev/null and b/languages/edd-novalnet-de_DE.mo differ diff --git a/languages/edd-novalnet-de_DE.po b/languages/edd-novalnet-de_DE.po new file mode 100755 index 0000000..b1a1853 --- /dev/null +++ b/languages/edd-novalnet-de_DE.po @@ -0,0 +1,1417 @@ +msgid "" +msgstr "" +"Project-Id-Version: Novalnet Payment Gateway for Easy Digital Downloads - " +"Version 2.1.1\n" +"POT-Creation-Date: 2021-11-26 13:17+0530\n" +"PO-Revision-Date: 2021-11-26 13:18+0530\n" +"Last-Translator: novalnet \n" +"Language-Team: Novalnet \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.6\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n" +"X-Poedit-Basepath: .\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-SearchPath-0: /var/www/dev/edd-novalnet-gateway\n" + +#: class-novalnet.php:143 +msgid "" +"Easy Digital Downloads Payment Gateway by Novalnetadd-on requires Easy Digital " +"Downloads plugin. Please install and activate it." +msgstr "" +"Easy Digital Downloads Zahlungsweisen per Novalnetverlangt Easy Digital " +"Downloads Steck-. Installieren Sie bitte und aktivieren Sie es." + +#: class-novalnet.php:143 +msgid "" +"Easy Digital Downloads Payment Gateway by Novalnetrequires PHP CURL. " +"You need to activate the CURL function on your server. Please contact your " +"hosting provider." +msgstr "" +"Easy Digital Downloads Zahlungsweisen per Novalnetverlangt PHP CURL. " +"Sie müssen die CURL-Funktion auf Ihrem Server aktivieren. Bitte wenden Sie " +"sich an Ihren Hosting-Provider." + +#: includes/admin/class-novalnet-global-config.php:74 +#: includes/class-novalnet-subscriptions.php:287 +msgid "--Select--" +msgstr "--Auswählen--" + +#: includes/admin/class-novalnet-global-config.php:99 +msgid "Novalnet Global Configuration" +msgstr "Novalnet Globale Konfiguration" + +#: includes/admin/class-novalnet-global-config.php:141 +msgid "Novalnet API Configuration" +msgstr "Novalnet API-Konfiguration" + +#: includes/admin/class-novalnet-global-config.php:141 +#, php-format +msgid "" +"Please read the Installation Guide before you start and login to the Novalnet Admin Portal using your merchant " +"account. To get a merchant account, mail to sales@novalnet.de or call +49 (089) 923068320." +msgstr "" +"Bevor Sie beginnen, lesen Sie bitte die Installationsanleitung und melden " +"Sie sich mit Ihrem Händlerkonto im Novalnet " +"Admin-Portal an. Um ein Händlerkonto zu erhalten, senden Sie bitte eine " +"E-Mail an sales@novalnet.de oder " +"rufen Sie uns unter +49 89 923068320 an." + +#: includes/admin/class-novalnet-global-config.php:142 +#: includes/gateways/class-novalnet-cashpayment.php:183 +#: includes/gateways/class-novalnet-cc.php:307 +#: includes/gateways/class-novalnet-eps.php:180 +#: includes/gateways/class-novalnet-giropay.php:180 +#: includes/gateways/class-novalnet-ideal.php:180 +#: includes/gateways/class-novalnet-instantbank.php:179 +#: includes/gateways/class-novalnet-invoice.php:233 +#: includes/gateways/class-novalnet-paypal.php:195 +#: includes/gateways/class-novalnet-prepayment.php:194 +#: includes/gateways/class-novalnet-przelewy24.php:184 +#: includes/gateways/class-novalnet-sepa.php:257 +msgid "Configure the gateway settings" +msgstr "Konfigurieren Sie die Gateway-Einstellungen" + +#: includes/admin/class-novalnet-global-config.php:147 +#: includes/admin/class-novalnet-global-config.php:151 +msgid "Product activation key" +msgstr "Aktivierungsschlüssel des Produkts" + +#: includes/admin/class-novalnet-global-config.php:152 +msgid "" +"Your product activation key is a unique token for merchant authentication " +"and payment processing." +msgstr "" +"Bitte geben Sie den Novalnet-Produktaktivierungsschlüssel an. Dieser ist für " +"die Authentifizierung und Zahlungsabwicklung erforderlich." + +#: includes/admin/class-novalnet-global-config.php:154 +#, php-format +msgid "" +"Get your Product activation key from the Novalnet Admin Portal: PROJECT > Choose your project > " +"Shop Parameters > API Signature (Product activation key)" +msgstr "" +"Ihren Produktaktivierungsschlüssel finden Sie im Novalnet Admin-Portal: PROJEKT > Wählen Sie Ihr Projekt > " +"Shop-Parameter > API-Signatur (Produktaktivierungsschlüssel)" + +#: includes/admin/class-novalnet-global-config.php:158 +msgid "Merchant ID " +msgstr "Händler-ID " + +#: includes/admin/class-novalnet-global-config.php:164 +msgid "Authentication code" +msgstr "Authentifizierungscode" + +#: includes/admin/class-novalnet-global-config.php:170 +msgid "Project ID" +msgstr "Projekt-ID" + +#: includes/admin/class-novalnet-global-config.php:176 +#: includes/admin/class-novalnet-global-config.php:177 +msgid "Select Tariff ID" +msgstr "Auswahl der Tarif-ID" + +#: includes/admin/class-novalnet-global-config.php:178 +msgid "" +"Select a Tariff ID to match the preferred tariff plan you created at the " +"Novalnet Admin Portal for this project." +msgstr "" +"Wählen Sie eine Tarif-ID, die dem bevorzugten Tarifplan entspricht, den Sie " +"im Novalnet Admin-Portal \n" +"für dieses Projekt erstellt haben." + +#: includes/admin/class-novalnet-global-config.php:184 +msgid "Payment access key" +msgstr "Zahlungs-Zugriffsschlüssel" + +#: includes/admin/class-novalnet-global-config.php:190 +msgid "Client Key" +msgstr "Schlüsselkunde" + +#: includes/admin/class-novalnet-global-config.php:196 +#: includes/admin/class-novalnet-global-config.php:197 +msgid "Display payment logo" +msgstr "Zahlungslogo anzeigen" + +#: includes/admin/class-novalnet-global-config.php:198 +msgid "The payment method logo(s) will be displayed on the checkout page. " +msgstr "Das Logo der Zahlungsart wird auf der Checkout-Seite angezeigt " + +#: includes/admin/class-novalnet-global-config.php:201 +#: includes/admin/class-novalnet-global-config.php:239 +#: includes/admin/class-novalnet-global-config.php:282 +#: includes/admin/class-novalnet-global-config.php:294 +#: includes/gateways/class-novalnet-cc.php:347 +#: includes/gateways/class-novalnet-invoice.php:353 +#: includes/gateways/class-novalnet-sepa.php:370 +msgid "No" +msgstr "Nein" + +#: includes/admin/class-novalnet-global-config.php:202 +#: includes/admin/class-novalnet-global-config.php:240 +#: includes/admin/class-novalnet-global-config.php:283 +#: includes/admin/class-novalnet-global-config.php:295 +#: includes/gateways/class-novalnet-cc.php:346 +#: includes/gateways/class-novalnet-invoice.php:354 +#: includes/gateways/class-novalnet-sepa.php:371 +msgid "Yes" +msgstr "Ja" + +#: includes/admin/class-novalnet-global-config.php:208 +msgid "Order status management for on-hold transactions" +msgstr "Verwaltung des Bestellstatus für ausgesetzte Zahlungen" + +#: includes/admin/class-novalnet-global-config.php:213 +#: includes/admin/class-novalnet-global-config.php:217 +msgid "On-hold order status" +msgstr "On-hold-Bestellstatus" + +#: includes/admin/class-novalnet-global-config.php:218 +msgid "" +"Status to be used for on-hold orders until the transaction is confirmed or " +"canceled." +msgstr "" +"Wählen Sie, welcher Status für On-hold-Bestellungen verwendet wird, solange " +"diese nicht bestätigt oder storniert worden sind." + +#: includes/admin/class-novalnet-global-config.php:222 +#: includes/admin/class-novalnet-global-config.php:226 +msgid "Canceled order status" +msgstr "Status für stornierte Bestellungen" + +#: includes/admin/class-novalnet-global-config.php:227 +msgid "Status to be used when order is canceled or fully refunded." +msgstr "" +"Wählen Sie, welcher Status für stornierte oder voll erstattete Bestellungen " +"verwendet wird." + +#: includes/admin/class-novalnet-global-config.php:231 +msgid "Dynamic subscription management" +msgstr "Verwaltung dynamischer Abonnements" + +#: includes/admin/class-novalnet-global-config.php:236 +msgid "Enable subscriptions" +msgstr "Abonnement aktivieren" + +#: includes/admin/class-novalnet-global-config.php:245 +msgid "Subscription payments" +msgstr "Abonnement-Zahlungen" + +#: includes/admin/class-novalnet-global-config.php:253 +#: includes/gateways/class-novalnet-cc.php:128 +#: includes/gateways/class-novalnet-cc.php:144 +#: includes/gateways/class-novalnet-cc.php:306 +msgid "Novalnet Credit/Debit Cards" +msgstr "Novalnet Kredit- / Debitkarte" + +#: includes/admin/class-novalnet-global-config.php:254 +#: includes/gateways/class-novalnet-sepa.php:85 +#: includes/gateways/class-novalnet-sepa.php:101 +#: includes/gateways/class-novalnet-sepa.php:256 +msgid "Novalnet Direct Debit SEPA" +msgstr "Novalnet Lastschrift SEPA" + +#: includes/admin/class-novalnet-global-config.php:255 +#: includes/gateways/class-novalnet-invoice.php:81 +#: includes/gateways/class-novalnet-invoice.php:97 +#: includes/gateways/class-novalnet-invoice.php:232 +msgid "Novalnet Invoice" +msgstr "Novalnet Kauf auf Rechnung" + +#: includes/admin/class-novalnet-global-config.php:256 +#: includes/gateways/class-novalnet-prepayment.php:65 +#: includes/gateways/class-novalnet-prepayment.php:81 +#: includes/gateways/class-novalnet-prepayment.php:193 +msgid "Novalnet Prepayment" +msgstr "Novalnet Vorkasse" + +#: includes/admin/class-novalnet-global-config.php:257 +#: includes/gateways/class-novalnet-paypal.php:67 +#: includes/gateways/class-novalnet-paypal.php:83 +#: includes/gateways/class-novalnet-paypal.php:194 +msgid "Novalnet PayPal" +msgstr "Novalnet PayPal" + +#: includes/admin/class-novalnet-global-config.php:264 +#: includes/admin/class-novalnet-global-config.php:265 +msgid "Subscription Tariff ID" +msgstr "Tarif-ID des Abonnements" + +#: includes/admin/class-novalnet-global-config.php:266 +msgid "" +"Select the preferred Novalnet subscription tariff ID available for your " +"project. For more information, please refer the Installation Guide." +msgstr "" +"Wählen Sie Ihre gewünschte Tarif-ID des Abonnements, die für Ihr Projekt " +"verfügbar ist. Weitere Informationen finden Sie in der " +"Installationsanleitung." + +#: includes/admin/class-novalnet-global-config.php:271 +msgid "Notification / Webhook URL Setup" +msgstr "Notifikation & Webhook -URL Einrichten" + +#: includes/admin/class-novalnet-global-config.php:277 +#: includes/admin/class-novalnet-global-config.php:278 +msgid "Allow manual testing of the Notification / Webhook URL" +msgstr "Manuelles Testen der Benachrichtigungs- / Webhook-URL erlauben" + +#: includes/admin/class-novalnet-global-config.php:279 +msgid "" +"Enable this to test the Novalnet Notification / Webhook URL manually. " +"Disable this before setting your shop live to block unauthorized calls from " +"external parties." +msgstr "" +"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." + +#: includes/admin/class-novalnet-global-config.php:289 +#: includes/admin/class-novalnet-global-config.php:290 +msgid "Enable e-mail notification" +msgstr "E-Mail-Benachrichtigungen einschalten" + +#: includes/admin/class-novalnet-global-config.php:291 +msgid "" +"Enable this option to notify the given e-mail address when the " +"Notification / Webhook URL is executed successfully." +msgstr "" +"Aktivieren Sie diese Option, um die angegebene E-Mail-Adresse zu " +"benachrichtigen, wenn die Benachrichtigungs- / Webhook-URL erfolgreich " +"ausgeführt wurde." + +#: includes/admin/class-novalnet-global-config.php:301 +#: includes/admin/class-novalnet-global-config.php:302 +msgid "Send e-mail to" +msgstr "E-Mails senden an" + +#: includes/admin/class-novalnet-global-config.php:303 +msgid "" +"Notification / Webhook URL execution messages will be sent to this e-mail." +msgstr "E-Mail-Benachrichtigungen werden an diese E-Mail-Adresse gesendet." + +#: includes/admin/class-novalnet-global-config.php:309 +msgid "Notification / Webhook URL" +msgstr "Notifikation & Webhook -URL" + +#: includes/admin/class-novalnet-global-config.php:319 +#, php-format +msgid "" +"You must add the following webhook endpoint to your Novalnet Admin Portal . This will allow you to receive " +"notifications about the transaction status." +msgstr "" +"Sie müssen die folgende Webhook-URL im Novalnet Admin-Portalhinzufügen. Dadurch können Sie " +"Benachrichtigungen über den Transaktionsstatus erhalten." + +#: includes/admin/class-novalnet-global-config.php:349 +#, php-format +msgid "" +"You need to configure your outgoing server IP address ( %s ) at Novalnet. " +"Please configure it in Novalnet Admin Portal or contact technic@novalnet.de" +msgstr "" +"Sie müssen die IP-Adresse Ihres Outgoing-Servers ( %s ) abei Novalnet " +"hinterlegen. Bitte hinterlegen Sie diese im Novalnet Admin-Portal oder " +"kontaktieren Sie uns unter technic@novalnet.de" + +#: includes/admin/class-novalnet-global-config.php:355 +#: includes/novalnet-functions.php:321 includes/novalnet-functions.php:589 +msgid "Please fill in all the mandatory fields" +msgstr "Füllen Sie bitte alle Pflichtfelder aus" + +#: includes/api/class-novalnet-callback-api.php:309 +#: includes/api/class-novalnet-callback-api.php:702 +#, php-format +msgid "The transaction has been canceled on %1$s." +msgstr "Die Transaktion wurde am %1$s Uhr storniert." + +#: includes/api/class-novalnet-callback-api.php:587 +msgid "Next charging date: " +msgstr "Nächstes Belastungsdatum: " + +#: includes/api/class-novalnet-callback-api.php:590 +#, php-format +msgid "" +"Subscription has been successfully renewed for the TID: %1$s with the amount " +"%2$s on %3$s. The renewal TID is: %4$s" +msgstr "" +"Chargeback erfolgreich importiert für die TID: %1$s Betrag: %2$s am %3$s " +"Uhr. TID der Folgebuchung: %4$s" + +#: includes/api/class-novalnet-callback-api.php:644 +#: includes/class-novalnet-subscriptions.php:267 +msgid "The subscription has been already stopped or cancelled" +msgstr "Das Abonnement wurde schon beendet oder gekündigt" + +#: includes/api/class-novalnet-callback-api.php:678 +#: includes/novalnet-functions.php:1029 +msgid "Other" +msgstr "Sonstige" + +#: includes/api/class-novalnet-callback-api.php:707 +#, php-format +msgid "Subscription has been stopped for the TID: %1$s on %2$s." +msgstr "Das Abonnement wurde für die TID: %1$s am%2$s." + +#: includes/api/class-novalnet-callback-api.php:713 +#, php-format +msgid "Subscription has been canceled due to: %1$s" +msgstr "Das Abonnement wurde gekündigt wegen: %1$s" + +#: includes/api/class-novalnet-callback-api.php:773 +#, php-format +msgid "Subscription has been reactivated for the TID: %1$s on %2$s." +msgstr "Das Abonnement wurde für die TID: %1$s reaktiviert am%2$s." + +#: includes/api/class-novalnet-callback-api.php:820 +#, php-format +msgid "The transaction has been confirmed on %1$s" +msgstr "Die Buchung wurde am %1$s Uhr bestätigt" + +#: includes/api/class-novalnet-callback-api.php:825 +#, php-format +msgid "" +"The transaction status has been changed from pending to on-hold for the TID: " +"%1$s on %2$s." +msgstr "" +"Der Status der Transaktion mit der TID: %1$s wurde am %2$s Uhr von " +"ausstehend auf ausgesetzt geändert." + +#: includes/api/class-novalnet-callback-api.php:851 +#, php-format +msgid "Transaction updated successfully for the TID: %1$s on %2$s." +msgstr "Transaktion mit TID: %1$s wurde am %2$s erfolgreich aktualisiert." + +#: includes/api/class-novalnet-callback-api.php:878 +#, php-format +msgid "The transaction has been canceled due to: %s" +msgstr "Die Transaktion wurde storniert. Grund: %s" + +#: includes/api/class-novalnet-callback-api.php:913 +#, php-format +msgid "" +"Refund has been initiated for the TID: %1$s with the amount %2$s. New TID: " +"%3$s." +msgstr "" +"Die Rückerstattung für die TID %1$s mit dem Betrag %2$s wurde veranlasst. " +"Neue TID %3$s." + +#: includes/api/class-novalnet-callback-api.php:916 +#, php-format +msgid "" +"Chargeback executed for return debit of TID:%1$s with the amount %2$s on " +"%3$s. The subsequent TID: %4$s." +msgstr "" +"Chargeback für Rücklastschrift mit dem Betrag %2$s am %3$s für TID %1$s " +"ausgeführt. Die neue TID lautet: %4$s." + +#: includes/api/class-novalnet-callback-api.php:919 +#, php-format +msgid "" +"Chargeback executed for reversal of TID: %1$s with the amount %2$s on %3$s. " +"The subsequent TID: %4$s." +msgstr "" +"Chargeback für Rücküberweisung mit dem Betrag %2$s am %3$s für TID %1$s " +"ausgeführt. Die neue TID lautet: %4$s." + +#: includes/api/class-novalnet-callback-api.php:922 +#, php-format +msgid "" +"Chargeback executed successfully for the TID: %1$s amount: %2$s on %3$s. The " +"subsequent TID: %4$s." +msgstr "" +"Chargeback erfolgreich importiert für die TID: %1$s Betrag: %2$s am %3$s " +"Uhr. TID der Folgebuchung: %4$s." + +#: includes/api/class-novalnet-callback-api.php:946 +#: includes/api/class-novalnet-callback-api.php:949 +#: includes/api/class-novalnet-callback-api.php:974 +#, php-format +msgid "" +"Credit has been successfully received for the TID: %1$s with amount %2$s on " +"%3$s . Please refer PAID order details in our Novalnet Admin Portal for the " +"TID: %4$s " +msgstr "" +"Die Gutschrift für die TID ist erfolgreich eingegangen: %1$s mit Betrag %2$s " +"am %3$s . Bitte entnehmen Sie die TID den Einzelheiten der Bestellung bei " +"BEZAHLT in unserem Novalnet Adminportal: %4$s " + +#: includes/class-novalnet-subscriptions.php:127 +msgid "Invalid subscription id" +msgstr "Ungültig Abonnement" + +#: includes/class-novalnet-subscriptions.php:178 +#: includes/gateways/class-novalnet-sepa.php:210 +msgid "Your account details are invalid" +msgstr "Ihre Kontodaten sind ungültig" + +#: includes/class-novalnet-subscriptions.php:266 +msgid "Please select the reason for subscription cancellation" +msgstr "Bitte wählen Sie den Grund für die Kündigung des Abonnements" + +#: includes/class-novalnet-subscriptions.php:291 +msgid "Cancel" +msgstr "Stornieren" + +#: includes/class-novalnet-subscriptions.php:340 +#, php-format +msgid "Subscription has been canceled due to: %s" +msgstr "Das Abonnement wurde gekündigt wegen: %s" + +#: includes/gateways/class-novalnet-cashpayment.php:64 +#: includes/gateways/class-novalnet-cashpayment.php:79 +#: includes/gateways/class-novalnet-cashpayment.php:182 +msgid "Novalnet Barzahlen/viacash" +msgstr "Novalnet Barzahlen/viacash" + +#: includes/gateways/class-novalnet-cashpayment.php:80 +msgid "Barzahlen/viacash " +msgstr "Barzahlen/viacash " + +#: includes/gateways/class-novalnet-cashpayment.php:98 +msgid "Barzahlen/viacash" +msgstr "Barzahlen/viacash" + +#: includes/gateways/class-novalnet-cashpayment.php:110 +msgid "" +"On successful checkout, you will receive a payment slip/SMS to pay your " +"online purchase at one of our retail partners (e.g. supermarket)." +msgstr "" +"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." + +#: includes/gateways/class-novalnet-cashpayment.php:128 +#: includes/gateways/class-novalnet-cashpayment.php:191 +#: includes/gateways/class-novalnet-cc.php:194 +#: includes/gateways/class-novalnet-cc.php:315 +#: includes/gateways/class-novalnet-eps.php:130 +#: includes/gateways/class-novalnet-eps.php:188 +#: includes/gateways/class-novalnet-giropay.php:131 +#: includes/gateways/class-novalnet-giropay.php:188 +#: includes/gateways/class-novalnet-ideal.php:130 +#: includes/gateways/class-novalnet-ideal.php:188 +#: includes/gateways/class-novalnet-instantbank.php:129 +#: includes/gateways/class-novalnet-instantbank.php:187 +#: includes/gateways/class-novalnet-invoice.php:241 +#: includes/gateways/class-novalnet-paypal.php:132 +#: includes/gateways/class-novalnet-paypal.php:203 +#: includes/gateways/class-novalnet-prepayment.php:130 +#: includes/gateways/class-novalnet-prepayment.php:202 +#: includes/gateways/class-novalnet-przelewy24.php:132 +#: includes/gateways/class-novalnet-przelewy24.php:192 +#: includes/gateways/class-novalnet-sepa.php:265 +#: templates/invoice-template.php:50 templates/sepa-template.php:50 +msgid "" +"The payment will be processed in the test mode therefore amount for this " +"transaction will not be charged" +msgstr "" +"Die Zahlung wird im Testmodus durchgeführt, daher wird der Betrag für diese " +"Transaktion nicht eingezogen" + +#: includes/gateways/class-novalnet-cashpayment.php:188 +#: includes/gateways/class-novalnet-cashpayment.php:190 +#: includes/gateways/class-novalnet-cc.php:312 +#: includes/gateways/class-novalnet-cc.php:314 +#: includes/gateways/class-novalnet-eps.php:185 +#: includes/gateways/class-novalnet-eps.php:187 +#: includes/gateways/class-novalnet-giropay.php:185 +#: includes/gateways/class-novalnet-giropay.php:187 +#: includes/gateways/class-novalnet-ideal.php:185 +#: includes/gateways/class-novalnet-ideal.php:187 +#: includes/gateways/class-novalnet-instantbank.php:184 +#: includes/gateways/class-novalnet-instantbank.php:186 +#: includes/gateways/class-novalnet-invoice.php:238 +#: includes/gateways/class-novalnet-invoice.php:240 +#: includes/gateways/class-novalnet-paypal.php:200 +#: includes/gateways/class-novalnet-paypal.php:202 +#: includes/gateways/class-novalnet-prepayment.php:199 +#: includes/gateways/class-novalnet-prepayment.php:201 +#: includes/gateways/class-novalnet-przelewy24.php:189 +#: includes/gateways/class-novalnet-przelewy24.php:191 +#: includes/gateways/class-novalnet-sepa.php:262 +#: includes/gateways/class-novalnet-sepa.php:264 +msgid "Enable test mode" +msgstr "Testmodus aktivieren" + +#: includes/gateways/class-novalnet-cashpayment.php:195 +#: includes/gateways/class-novalnet-cashpayment.php:199 +msgid "Slip expiry date (in days)" +msgstr "Verfallsdatum des Zahlscheins (in Tagen)" + +#: includes/gateways/class-novalnet-cashpayment.php:200 +msgid "" +"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. " +msgstr "" +"Anzahl der Tage, die der Käufer Zeit hat, um den Betrag in einer Filiale zu " +"bezahlen. Wenn Sie dieses Feld leer lassen, ist der Zahlschein standardmäßig " +"14 Tage lang gültig. " + +#: includes/gateways/class-novalnet-cashpayment.php:204 +#: includes/gateways/class-novalnet-cashpayment.php:208 +#: includes/gateways/class-novalnet-cc.php:353 +#: includes/gateways/class-novalnet-cc.php:357 +#: includes/gateways/class-novalnet-eps.php:192 +#: includes/gateways/class-novalnet-eps.php:196 +#: includes/gateways/class-novalnet-giropay.php:192 +#: includes/gateways/class-novalnet-giropay.php:196 +#: includes/gateways/class-novalnet-ideal.php:192 +#: includes/gateways/class-novalnet-ideal.php:196 +#: includes/gateways/class-novalnet-instantbank.php:191 +#: includes/gateways/class-novalnet-instantbank.php:195 +#: includes/gateways/class-novalnet-invoice.php:277 +#: includes/gateways/class-novalnet-invoice.php:281 +#: includes/gateways/class-novalnet-paypal.php:238 +#: includes/gateways/class-novalnet-paypal.php:242 +#: includes/gateways/class-novalnet-prepayment.php:216 +#: includes/gateways/class-novalnet-prepayment.php:220 +#: includes/gateways/class-novalnet-przelewy24.php:205 +#: includes/gateways/class-novalnet-przelewy24.php:209 +#: includes/gateways/class-novalnet-sepa.php:302 +#: includes/gateways/class-novalnet-sepa.php:306 +msgid "Completed order status" +msgstr "Status für erfolgreichen Auftragsabschluss" + +#: includes/gateways/class-novalnet-cashpayment.php:209 +#: includes/gateways/class-novalnet-cc.php:358 +#: includes/gateways/class-novalnet-eps.php:197 +#: includes/gateways/class-novalnet-giropay.php:197 +#: includes/gateways/class-novalnet-ideal.php:197 +#: includes/gateways/class-novalnet-instantbank.php:196 +#: includes/gateways/class-novalnet-invoice.php:282 +#: includes/gateways/class-novalnet-paypal.php:243 +#: includes/gateways/class-novalnet-prepayment.php:221 +#: includes/gateways/class-novalnet-przelewy24.php:210 +#: includes/gateways/class-novalnet-sepa.php:307 +msgid "Status to be used for successful orders." +msgstr "" +"Wählen Sie, welcher Status für erfolgreich abgeschlossene Bestellungen " +"verwendet wird." + +#: includes/gateways/class-novalnet-cashpayment.php:213 +#: includes/gateways/class-novalnet-cashpayment.php:217 +#: includes/gateways/class-novalnet-invoice.php:286 +#: includes/gateways/class-novalnet-invoice.php:290 +#: includes/gateways/class-novalnet-prepayment.php:225 +#: includes/gateways/class-novalnet-prepayment.php:229 +msgid "Callback / Webhook order status" +msgstr "Callback / Webhook Bestellstatus" + +#: includes/gateways/class-novalnet-cashpayment.php:218 +#: includes/gateways/class-novalnet-invoice.php:291 +#: includes/gateways/class-novalnet-prepayment.php:230 +msgid "" +"Status to be used when callback script is executed for payment received by " +"Novalnet." +msgstr "" +"Status, der zu verwendet wird, wenn das Callback-Skript für eine bei " +"Novalnet eingegangene Zahlung ausgeführt wird." + +#: includes/gateways/class-novalnet-cashpayment.php:222 +#: includes/gateways/class-novalnet-cc.php:362 +#: includes/gateways/class-novalnet-eps.php:201 +#: includes/gateways/class-novalnet-giropay.php:201 +#: includes/gateways/class-novalnet-ideal.php:201 +#: includes/gateways/class-novalnet-instantbank.php:200 +#: includes/gateways/class-novalnet-invoice.php:295 +#: includes/gateways/class-novalnet-paypal.php:247 +#: includes/gateways/class-novalnet-prepayment.php:234 +#: includes/gateways/class-novalnet-przelewy24.php:214 +#: includes/gateways/class-novalnet-sepa.php:311 +msgid "Notification for the buyer" +msgstr "Benachrichtigung des Käufers" + +#: includes/gateways/class-novalnet-cashpayment.php:225 +#: includes/gateways/class-novalnet-cc.php:365 +#: includes/gateways/class-novalnet-eps.php:204 +#: includes/gateways/class-novalnet-giropay.php:204 +#: includes/gateways/class-novalnet-ideal.php:204 +#: includes/gateways/class-novalnet-instantbank.php:203 +#: includes/gateways/class-novalnet-invoice.php:298 +#: includes/gateways/class-novalnet-paypal.php:250 +#: includes/gateways/class-novalnet-prepayment.php:237 +#: includes/gateways/class-novalnet-przelewy24.php:217 +#: includes/gateways/class-novalnet-sepa.php:314 +msgid "The entered text will be displayed at the checkout page" +msgstr "Der eingegebene Text wird auf der Checkout-Seite angezeigt" + +#: includes/gateways/class-novalnet-cc.php:83 +msgid "Card holder name" +msgstr "Name des Karteninhabers" + +#: includes/gateways/class-novalnet-cc.php:84 +msgid "Name on card" +msgstr "Name auf der Kreditkarte" + +#: includes/gateways/class-novalnet-cc.php:85 +msgid "Card number" +msgstr "Kreditkartennummer" + +#: includes/gateways/class-novalnet-cc.php:86 +msgid "XXXX XXXX XXXX XXXX" +msgstr "XXXX XXXX XXXX XXXX" + +#: includes/gateways/class-novalnet-cc.php:87 +msgid "Expiry date" +msgstr "Ablaufdatum" + +#: includes/gateways/class-novalnet-cc.php:88 +msgid "CVC/CVV/CID" +msgstr "CVC/CVV/CID" + +#: includes/gateways/class-novalnet-cc.php:89 +msgid "XXX" +msgstr "XXX" + +#: includes/gateways/class-novalnet-cc.php:90 +#: includes/gateways/class-novalnet-cc.php:289 +msgid "Your credit card details are invalid" +msgstr "Ihre Kreditkartendaten sind ungültig" + +#: includes/gateways/class-novalnet-cc.php:145 +#: includes/gateways/class-novalnet-cc.php:166 +msgid "Credit/Debit Cards" +msgstr "Kredit- / Debitkarte" + +#: includes/gateways/class-novalnet-cc.php:178 +msgid "" +"Your credit/debit card will be charged immediately after the order is " +"completed" +msgstr "Ihre Karte wird nach Bestellabschluss sofort belastet" + +#: includes/gateways/class-novalnet-cc.php:319 +#: includes/gateways/class-novalnet-cc.php:322 +#: includes/gateways/class-novalnet-invoice.php:254 +#: includes/gateways/class-novalnet-invoice.php:257 +#: includes/gateways/class-novalnet-paypal.php:207 +#: includes/gateways/class-novalnet-paypal.php:210 +#: includes/gateways/class-novalnet-sepa.php:280 +#: includes/gateways/class-novalnet-sepa.php:283 +msgid "Payment action" +msgstr "Bearbeitungsmaßnahme" + +#: includes/gateways/class-novalnet-cc.php:323 +#: includes/gateways/class-novalnet-invoice.php:258 +#: includes/gateways/class-novalnet-paypal.php:211 +#: includes/gateways/class-novalnet-sepa.php:284 +msgid "" +"Choose whether or not the payment should be charged immediately. Capture " +"completes the transaction by transferring the funds from buyer account to " +"merchant account. Authorize verifies payment details and reserves funds to " +"capture it later, giving time for the merchant to decide on the order." +msgstr "" +"Wählen Sie, ob die Zahlung sofort belastet werden soll oder nicht. Zahlung " +"einziehen: Betrag sofort belasten. Zahlung autorisieren: Die Zahlung wird " +"überprüft und autorisiert, aber erst zu einem späteren Zeitpunkt belastet. " +"So haben Sie Zeit, über die Bestellung zu entscheiden." + +#: includes/gateways/class-novalnet-cc.php:325 +#: includes/gateways/class-novalnet-invoice.php:260 +#: includes/gateways/class-novalnet-paypal.php:213 +#: includes/gateways/class-novalnet-sepa.php:286 +msgid "Capture" +msgstr "Zahlung einziehen" + +#: includes/gateways/class-novalnet-cc.php:326 +#: includes/gateways/class-novalnet-invoice.php:261 +#: includes/gateways/class-novalnet-paypal.php:214 +#: includes/gateways/class-novalnet-sepa.php:287 +msgid "Authorize" +msgstr "Zahlung autorisieren" + +#: includes/gateways/class-novalnet-cc.php:332 +#: includes/gateways/class-novalnet-cc.php:336 +#: includes/gateways/class-novalnet-invoice.php:267 +#: includes/gateways/class-novalnet-invoice.php:271 +#: includes/gateways/class-novalnet-paypal.php:220 +#: includes/gateways/class-novalnet-paypal.php:224 +#: includes/gateways/class-novalnet-sepa.php:293 +#: includes/gateways/class-novalnet-sepa.php:297 +msgid "Minimum transaction limit for authorization" +msgstr "Mindesttransaktionsbetrag für die Autorisierung" + +#: includes/gateways/class-novalnet-cc.php:335 +#: includes/gateways/class-novalnet-invoice.php:270 +#: includes/gateways/class-novalnet-paypal.php:223 +#: includes/gateways/class-novalnet-sepa.php:296 +#: includes/gateways/class-novalnet-sepa.php:360 +msgid "(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)" +msgstr "" +"(in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)" + +#: includes/gateways/class-novalnet-cc.php:337 +#: includes/gateways/class-novalnet-paypal.php:225 +#: includes/gateways/class-novalnet-sepa.php:298 +msgid "" +"In case the order amount exceeds the mentioned limit, the transaction will " +"be set on-hold till your confirmation of the transaction. You can leave the " +"field empty if you wish to process all the transactions as on-hold." +msgstr "" +"Übersteigt der Bestellbetrag das genannte Limit, wird die Transaktion, bis " +"zu ihrer Bestätigung durch Sie, auf on hold gesetzt. Sie können das Feld " +"leer lassen, wenn Sie möchten, dass alle Transaktionen als on hold behandelt " +"werden." + +#: includes/gateways/class-novalnet-cc.php:341 +#: includes/gateways/class-novalnet-cc.php:343 +msgid "Enforce 3D secure payment outside EU" +msgstr "3D-Secure-Zahlungen außerhalb der EU erzwingen" + +#: includes/gateways/class-novalnet-cc.php:344 +msgid "" +"By enabling this option, all payments from cards issued outside the EU will " +"be authenticated via 3DS 2.0 SCA" +msgstr "" +"Wenn Sie diese Option aktivieren, werden alle Zahlungen mit Karten, die " +"außerhalb der EU ausgegeben wurden, mit der starken Kundenauthentifizierung " +"(Strong Customer Authentication, SCA) von 3D-Secure 2.0 authentifiziert" + +#: includes/gateways/class-novalnet-cc.php:368 +msgid "Custom CSS settings" +msgstr "Angepasste CSS-Einstellungen" + +#: includes/gateways/class-novalnet-cc.php:373 +msgid "CSS settings for iframe form" +msgstr "CSS-Einstellungen für den iFrameformular" + +#: includes/gateways/class-novalnet-cc.php:379 +msgid "Label" +msgstr "Beschriftung" + +#: includes/gateways/class-novalnet-cc.php:380 +#: includes/gateways/class-novalnet-cc.php:388 +msgid "E.g: color:#999999; background-color:#FFFFFF;" +msgstr "z.B: color:#999999; background-color:#FFFFFF;" + +#: includes/gateways/class-novalnet-cc.php:387 +msgid "Input" +msgstr "Eingabe" + +#: includes/gateways/class-novalnet-cc.php:395 +msgid "CSS Text" +msgstr "Text für das CSS" + +#: includes/gateways/class-novalnet-cc.php:396 +msgid "E.g: #idselector{color:#999999;}.classSelector{color:#000000}" +msgstr "z.B: #idselector{color:#999999;}.classSelector{color:#000000}" + +#: includes/gateways/class-novalnet-eps.php:66 +#: includes/gateways/class-novalnet-eps.php:81 +#: includes/gateways/class-novalnet-eps.php:179 +msgid "Novalnet eps" +msgstr "Novalnet eps" + +#: includes/gateways/class-novalnet-eps.php:82 +#: includes/gateways/class-novalnet-eps.php:101 +msgid "eps" +msgstr "eps" + +#: includes/gateways/class-novalnet-eps.php:113 +msgid "" +"You will be redirected to eps. Please don’t close or refresh the browser " +"until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-giropay.php:67 +#: includes/gateways/class-novalnet-giropay.php:83 +#: includes/gateways/class-novalnet-giropay.php:179 +msgid "Novalnet giropay" +msgstr "Novalnet giropay" + +#: includes/gateways/class-novalnet-giropay.php:84 +#: includes/gateways/class-novalnet-giropay.php:102 +msgid "giropay" +msgstr "giropay" + +#: includes/gateways/class-novalnet-giropay.php:114 +msgid "" +"You will be redirected to giropay. Please don’t close or refresh the browser " +"until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-ideal.php:67 +#: includes/gateways/class-novalnet-ideal.php:82 +#: includes/gateways/class-novalnet-ideal.php:179 +msgid "Novalnet iDEAL" +msgstr "Novalnet iDEAL" + +#: includes/gateways/class-novalnet-ideal.php:83 +#: includes/gateways/class-novalnet-ideal.php:100 +msgid "iDEAL" +msgstr "iDEAL" + +#: includes/gateways/class-novalnet-ideal.php:112 +msgid "" +"You will be redirected to iDEAL. Please don’t close or refresh the browser " +"until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-instantbank.php:67 +#: includes/gateways/class-novalnet-instantbank.php:82 +#: includes/gateways/class-novalnet-instantbank.php:178 +msgid "Novalnet Sofort" +msgstr "Novalnet Sofortüberweisung" + +#: includes/gateways/class-novalnet-instantbank.php:83 +#: includes/gateways/class-novalnet-instantbank.php:100 +msgid "Sofort" +msgstr "Sofortüberweisung" + +#: includes/gateways/class-novalnet-instantbank.php:112 +msgid "" +"You will be redirected to Sofort. Please don’t close or refresh the browser " +"until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-invoice.php:98 +#: includes/gateways/class-novalnet-invoice.php:121 +msgid "Invoice" +msgstr "Kauf auf Rechnung" + +#: includes/gateways/class-novalnet-invoice.php:156 +#: includes/gateways/class-novalnet-sepa.php:216 +#, php-format +msgid "" +"The payment cannot be processed, because the basic requirements for the " +"payment guarantee are not met ( %s ) " +msgstr "" +"Die Zahlung kann nicht ausgeführt werden, weil die Voraussetzungen für die " +"Zahlungsgarantie nicht erfüllt sind ( %s ) " + +#: includes/gateways/class-novalnet-invoice.php:245 +#: includes/gateways/class-novalnet-invoice.php:249 +#: includes/gateways/class-novalnet-prepayment.php:206 +#: includes/gateways/class-novalnet-prepayment.php:211 +#: includes/gateways/class-novalnet-sepa.php:269 +#: includes/gateways/class-novalnet-sepa.php:275 +msgid "Payment due date (in days)" +msgstr "Fälligkeitsdatum (in Tagen)" + +#: includes/gateways/class-novalnet-invoice.php:250 +#: includes/gateways/class-novalnet-prepayment.php:212 +msgid "" +"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. " +msgstr "" +"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. " + +#: includes/gateways/class-novalnet-invoice.php:272 +msgid "" +"When the order amount exceeds the mentioned limit, the transaction will be " +"set on-hold till you confirm it. You can leave the field empty if you wish " +"to process all transactions as on-hold transactions. " +msgstr "" +"Übersteigt der Bestellbetrag das genannte Limit, wird die Transaktion, bis " +"zu ihrer Bestätigung durch Sie, auf on hold gesetzt. Sie können das Feld " +"leer lassen, wenn Sie möchten, dass alle Transaktionen als on hold behandelt " +"werden. " + +#: includes/gateways/class-novalnet-invoice.php:303 +#: includes/gateways/class-novalnet-sepa.php:318 +msgid "Payment guarantee configuration" +msgstr "Einstellungen für die Zahlungsgarantie" + +#: includes/gateways/class-novalnet-invoice.php:317 +#: includes/gateways/class-novalnet-sepa.php:332 +msgid "Payment guarantee requirements: " +msgstr "Voraussetzungen für die Zahlungsgarantie: " + +#: includes/gateways/class-novalnet-invoice.php:318 +#: includes/gateways/class-novalnet-sepa.php:333 +msgid "Allowed countries: DE, AT, CH" +msgstr "Zugelassene Staaten: DE, AT, CH" + +#: includes/gateways/class-novalnet-invoice.php:319 +#: includes/gateways/class-novalnet-sepa.php:334 +msgid "Allowed currency: EUR" +msgstr "Zugelassene Währung: EUR" + +#: includes/gateways/class-novalnet-invoice.php:320 +#: includes/gateways/class-novalnet-sepa.php:335 +msgid "Minimum order amount: 9,99 EUR or more" +msgstr "Mindestbetrag der Bestellung: 9,99 EUR" + +#: includes/gateways/class-novalnet-invoice.php:321 +#: includes/gateways/class-novalnet-sepa.php:336 +msgid "Age limit: 18 years or more" +msgstr "Mindestalter: 18 Jahre" + +#: includes/gateways/class-novalnet-invoice.php:322 +#: includes/gateways/class-novalnet-sepa.php:337 +msgid "The billing address must be the same as the shipping address" +msgstr "Rechnungsadresse und Lieferadresse müssen übereinstimmen" + +#: includes/gateways/class-novalnet-invoice.php:328 +#: includes/gateways/class-novalnet-sepa.php:344 +msgid "Enable payment guarantee" +msgstr "Zahlungsgarantie aktivieren" + +#: includes/gateways/class-novalnet-invoice.php:333 +#: includes/gateways/class-novalnet-invoice.php:337 +#: includes/gateways/class-novalnet-paypal.php:229 +#: includes/gateways/class-novalnet-paypal.php:233 +#: includes/gateways/class-novalnet-przelewy24.php:196 +#: includes/gateways/class-novalnet-przelewy24.php:200 +#: includes/gateways/class-novalnet-sepa.php:349 +#: includes/gateways/class-novalnet-sepa.php:353 +msgid "Payment status for the pending payment" +msgstr "Status für offene Zahlungen" + +#: includes/gateways/class-novalnet-invoice.php:338 +#: includes/gateways/class-novalnet-paypal.php:234 +#: includes/gateways/class-novalnet-przelewy24.php:201 +#: includes/gateways/class-novalnet-sepa.php:354 +msgid "Status to be used for pending transactions." +msgstr "Status, der verwendet wird, wenn die Zahlung noch offen ist." + +#: includes/gateways/class-novalnet-invoice.php:342 +#: includes/gateways/class-novalnet-invoice.php:345 +#: includes/gateways/class-novalnet-sepa.php:358 +#: includes/gateways/class-novalnet-sepa.php:362 +msgid "Minimum order amount for payment guarantee" +msgstr "Mindestbestellbetrag für Zahlungsgarantie" + +#: includes/gateways/class-novalnet-invoice.php:346 +#: includes/gateways/class-novalnet-sepa.php:363 +msgid "" +"Enter the minimum amount (in cents) for the transaction to be processed with " +"payment guarantee. For example, enter 100 which is equal to 1,00. By " +"default, the amount will be 9,99 EUR." +msgstr "" +"Geben Sie den Mindestbetrag (in Cent) für die zu bearbeitende Transaktion " +"mit Zahlungsgarantie ein. Geben Sie z.B. 100 ein, was 1,00 entspricht. Der " +"Standbetrag ist 9,99 EUR." + +#: includes/gateways/class-novalnet-invoice.php:350 +#: includes/gateways/class-novalnet-invoice.php:357 +#: includes/gateways/class-novalnet-sepa.php:367 +#: includes/gateways/class-novalnet-sepa.php:374 +msgid "Force Non-Guarantee payment" +msgstr "Zahlung ohne Zahlungsgarantie erzwingen" + +#: includes/gateways/class-novalnet-invoice.php:358 +#: includes/gateways/class-novalnet-sepa.php:375 +msgid "" +"Even if payment guarantee is enabled, payments will still be processed as " +"non-guarantee payments if the payment guarantee requirements are not met. " +"Review the requirements under 'Enable Payment Guarantee' in the Installation " +"Guide. " +msgstr "" +"Falls die Zahlungsgarantie zwar aktiviert ist, jedoch die Voraussetzungen " +"für Zahlungsgarantie nicht erfüllt sind, wird die Zahlung ohne " +"Zahlungsgarantie verarbeitet. Die Voraussetzungen finden Sie in der " +"Installationsanleitung unter \"Zahlungsgarantie aktivieren\". " + +#: includes/gateways/class-novalnet-paypal.php:84 +#: includes/gateways/class-novalnet-paypal.php:102 +msgid "PayPal" +msgstr "PayPal" + +#: includes/gateways/class-novalnet-paypal.php:114 +msgid "" +"You will be redirected to PayPal. Please don’t close or refresh the browser " +"until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-paypal.php:194 +#, php-format +msgid "" +"To accept PayPal transactions, configure your PayPal API info in the Novalnet Admin Portal: > PROJECT" +"strong> > Choose your project > Payment Methods" +"strong> > Paypal > Configure." +msgstr "" +"Um PayPal-Transaktionen zu akzeptieren, konfigurieren Sie Ihre PayPal-API-" +"Informationen im Novalnet Admin-Portal: " +"PROJEKT > Wählen Sie Ihr Projekt > " +"Projektübersicht > Zahlungsmethoden > " +"PayPal > Konfigurieren." + +#: includes/gateways/class-novalnet-prepayment.php:82 +#: includes/gateways/class-novalnet-prepayment.php:100 +msgid "Prepayment" +msgstr "Vorkasse" + +#: includes/gateways/class-novalnet-prepayment.php:112 +#: templates/invoice-template.php:32 +msgid "" +"You will receive an e-mail with the Novalnet account details to complete the " +"payment." +msgstr "" +"Sie erhalten eine E-Mail mit den Bankdaten von Novalnet, um die Zahlung " +"abzuschließen." + +#: includes/gateways/class-novalnet-przelewy24.php:67 +#: includes/gateways/class-novalnet-przelewy24.php:83 +#: includes/gateways/class-novalnet-przelewy24.php:183 +msgid "Novalnet Przelewy24" +msgstr "Novalnet Przelewy24" + +#: includes/gateways/class-novalnet-przelewy24.php:84 +#: includes/gateways/class-novalnet-przelewy24.php:102 +msgid "Przelewy24" +msgstr "Przelewy24" + +#: includes/gateways/class-novalnet-przelewy24.php:114 +msgid "" +"You will be redirected to Przelewy24. Please don’t close or refresh the " +"browser until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-sepa.php:102 +#: includes/gateways/class-novalnet-sepa.php:126 +msgid "Direct Debit SEPA" +msgstr "Lastschrift SEPA" + +#: includes/gateways/class-novalnet-sepa.php:276 +msgid "" +"Number of days after which the payment is debited (must be between 2 and 14 " +"days)." +msgstr "" +"Geben Sie die Anzahl der Tage ein, nach denen der Zahlungsbetrag eingezogen " +"werden soll (muss zwischen 2 und 14 Tagen liegen)." + +#: includes/novalnet-functions.php:135 +msgid "Configuration" +msgstr "Konfiguration" + +#: includes/novalnet-functions.php:196 +msgid "Payment was not successful. An error occurred." +msgstr "Die Zahlung war nicht erfolgreich. Ein Fehler trat auf." + +#: includes/novalnet-functions.php:213 +msgid "Pay now with Barzahlen/viacash" +msgstr "Bezahlen mit Barzahlen/viacash" + +#: includes/novalnet-functions.php:365 +msgid "The amount is invalid" +msgstr "Ungültiger Betrag" + +#: includes/novalnet-functions.php:376 +msgid "Multiple subscription can not be purchased at the same time " +msgstr "Mehrere Abonnementzahlungen können nicht gleichzeitig bezahlt werden " + +#: includes/novalnet-functions.php:586 +msgid "Customer name/email fields are not valid" +msgstr "Ungültige Werte für die Felder Kundenname-/email" + +#: includes/novalnet-functions.php:639 +msgid "You are now redirected automatically" +msgstr "Sie werden jetzt automatisch umgeleitet" + +#: includes/novalnet-functions.php:639 +msgid "Please wait..." +msgstr "Warten Sie bitte …" + +#: includes/novalnet-functions.php:733 +#, php-format +msgid "" +"Successfully updated the payment and customer billing details for upcoming " +"subscriptions on date: %s" +msgstr "" +"Die Zahlungs- und Rechnungsdaten für zukünftige Abonnement-Abbuchungen " +"wurden erfolgreich aktualisiert: %s" + +#: includes/novalnet-functions.php:930 includes/novalnet-functions.php:987 +msgid "While redirecting some data has been changed. The hash check failed" +msgstr "" +"Während der Umleitung wurden einige Daten geändert. Die Überprüfung des " +"Hashes schlug fehl" + +#: includes/novalnet-functions.php:939 +#, php-format +msgid "Recurring change payment method has been failed due to %s" +msgstr "Abonnement Annullierung wurde aufgrund nicht bestanden: %s" + +#: includes/novalnet-functions.php:1019 +msgid "Product is costly" +msgstr "Angebot zu teuer" + +#: includes/novalnet-functions.php:1020 +msgid "Cheating" +msgstr "Betrug" + +#: includes/novalnet-functions.php:1021 +msgid "Partner interfered" +msgstr "(Ehe-)Partner hat Einspruch eingelegt" + +#: includes/novalnet-functions.php:1022 +msgid "Financial problem" +msgstr "Finanzielle Schwierigkeiten" + +#: includes/novalnet-functions.php:1023 +msgid "Content does not match my likes" +msgstr "Inhalt entsprach nicht meinen Vorstellungen" + +#: includes/novalnet-functions.php:1024 +msgid "Content is not enough" +msgstr "Inhalte nicht ausreichend" + +#: includes/novalnet-functions.php:1025 +msgid "Interested only for a trial" +msgstr "Nur an Probezugang interessiert" + +#: includes/novalnet-functions.php:1026 +msgid "Page is very slow" +msgstr "Seite zu langsam" + +#: includes/novalnet-functions.php:1027 +msgid "Satisfied customer" +msgstr "Zufriedener Kunde" + +#: includes/novalnet-functions.php:1028 +msgid "Logging in problems" +msgstr "Zugangsprobleme" + +#: includes/novalnet-functions.php:1444 +msgid "" +"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." +msgstr "" +"Ihre Bestellung wird überprüft. Nach der Bestätigung senden wir Ihnen unsere " +"Bankverbindung, an die Sie bitte den Gesamtbetrag der Bestellung überweisen. " +"Bitte beachten Sie, dass dies bis zu 24 Stunden dauern kann." + +#: includes/novalnet-functions.php:1446 +msgid "Please transfer the amount to the below mentioned account." +msgstr "Bitte überweisen Sie den Betrag auf das unten stehende Konto." + +#: includes/novalnet-functions.php:1449 +msgid "Due date: " +msgstr "Fälligkeitsdatum: " + +#: includes/novalnet-functions.php:1451 +msgid "Account holder: " +msgstr "Kontoinhaber: " + +#: includes/novalnet-functions.php:1459 +msgid "Amount: " +msgstr "Betrag: " + +#: includes/novalnet-functions.php:1462 +msgid "" +"Please use the following payment reference for your money transfer, as only " +"through this way your payment is matched and assigned to the order:" +msgstr "" +"Bitte verwenden Sie nur den unten angegebenen Verwendungszweck für die " +"Überweisung, da nur so Ihr Geldeingang zugeordnet werden kann:" + +#: includes/novalnet-functions.php:1470 +#, php-format +msgid "Payment Reference %s: " +msgstr "Verwendungszweck %s: " + +#: includes/novalnet-functions.php:1492 +msgid "Slip expiry date" +msgstr "Verfallsdatum des Zahlscheins" + +#: includes/novalnet-functions.php:1495 +msgid "Store(s) near you" +msgstr "Barzahlen-Partnerfiliale in Ihrer Nähe" + +#: includes/novalnet-functions.php:1681 +msgid "This is processed as a guarantee payment" +msgstr "Diese Transaktion wird mit Zahlungsgarantie verarbeitet" + +#: includes/novalnet-functions.php:1683 +#, php-format +msgid "Novalnet transaction ID: %s" +msgstr "Novalnet Transaktions-ID: %s" + +#: includes/novalnet-functions.php:1684 +msgid "Test order" +msgstr "Testbestellung" + +#: includes/novalnet-functions.php:1686 +msgid "" +"Your order is under verification and we will soon update you with the order " +"status. Please note that this may take upto 24 hours." +msgstr "" +"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." + +#: includes/novalnet-functions.php:1733 +msgid "Only Germany, Austria or Switzerland are allowed" +msgstr "Als Land ist nur Deutschland, Österreich oder Schweiz erlaubt" + +#: includes/novalnet-functions.php:1736 +msgid "Only EUR currency allowed" +msgstr "Als Währung ist nur EUR erlaubt" + +#: includes/novalnet-functions.php:1740 +#, php-format +msgid "Minimum order amount must be %s" +msgstr "Der Mindestbestellwert beträgt %s" + +#: includes/novalnet-functions.php:1773 +msgid "Please enter your date of birth" +msgstr "Geben Sie bitte Ihr Geburtsdatum ein" + +#: includes/novalnet-functions.php:1775 +msgid "The date format is invalid" +msgstr "Ungültiges Datumsformat" + +#: includes/novalnet-functions.php:1777 +msgid "You need to be at least 18 years old" +msgstr "Sie müssen mindestens 18 Jahre alt sein" + +#: templates/invoice-template.php:67 templates/sepa-template.php:67 +#, php-format +msgid "" +"The payment cannot be processed, because the basic requirements for the " +"payment guarantee are not met %s " +msgstr "" +"Die Zahlung kann nicht ausgeführt werden, weil die Voraussetzungen für die " +"Zahlungsgarantie nicht erfüllt sind %s " + +#: templates/invoice-template.php:79 templates/sepa-template.php:82 +msgid "Please enable the Javascript in your browser to load the payment form" +msgstr "" +"Aktivieren Sie bitte JavaScript in Ihrem Browser, um die Zahlung fortzusetzen" + +#: templates/invoice-template.php:87 templates/sepa-template.php:106 +msgid "Your date of birth" +msgstr "Ihr Geburtsdatum" + +#: templates/invoice-template.php:91 templates/sepa-template.php:110 +msgid "DD" +msgstr "TT" + +#: templates/invoice-template.php:92 templates/sepa-template.php:111 +msgid "MM" +msgstr "MM" + +#: templates/invoice-template.php:93 templates/sepa-template.php:112 +msgid "YYYY" +msgstr "JJJJ" + +#: templates/sepa-template.php:32 +msgid "The amount will be debited from your account by Novalnet" +msgstr "Der Betrag wird durch Novalnet von Ihrem Konto abgebucht" + +#: templates/sepa-template.php:89 templates/sepa-template.php:92 +msgid "Account holder" +msgstr "Kontoinhaber" + +#: templates/sepa-template.php:96 +msgid "IBAN " +msgstr "IBAN " + +#: templates/sepa-template.php:99 +msgid "IBAN" +msgstr "IBAN" + +#: templates/sepa-template.php:120 +msgid "" +"I hereby grant the mandate for the SEPA direct debit (electronic " +"transmission) and confirm that the given bank details are correct!" +msgstr "" +"Ich erteile hiermit das SEPA-Lastschriftmandat (elektronische Übermittlung) " +"und bestätige, dass die Bankverbindung korrekt ist!" + +#: templates/sepa-template.php:123 +msgid "" +"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." +msgstr "" +"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." + +#: templates/sepa-template.php:126 +msgid "Creditor identifier: " +msgstr "Gläubiger-Identifikationsnummer: " + +#: templates/sepa-template.php:128 +msgid "Note: " +msgstr "Hinweis: " + +#: templates/sepa-template.php:128 +msgid "" +"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." +msgstr "" +"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." + +#~ msgid "Novalnet payment plugin - Easy Digital Downloads" +#~ msgstr "Novalnet-Zahlungsplugin - Easy Digital Downloads" + +#~ msgid "" +#~ "PCI compliant payment solution, covering a full scope of payment services " +#~ "and seamless integration for easy adaptability" +#~ msgstr "" +#~ "PCI-konforme Zahlungsabwicklung mit einer Vielzahl an Payment-Services " +#~ "und nahtloser Integration für eine einfache Anbindung" + +#~ msgid "" +#~ "Novalnet Callback Script executed successfully for the TID: %1$s with " +#~ "amount %2$s on %3$s." +#~ msgstr "" +#~ "Novalnet-Callback-Skript erfolgreich ausgeführt für die TID: %s mit dem " +#~ "Betrag am %s um %s Uhr." + +#~ msgid "" +#~ "Plug-in to process payments in Easy Digital Downloads through Novalnet " +#~ "Gateway" +#~ msgstr "" +#~ "Plugin um Zahlungen in Easy Digital Downloads über die Novalnet-" +#~ "Schnittstelle abzuwickeln" + +#~ msgid "" +#~ "Novalnet callback script received. Subscription has been stopped for the " +#~ "TID: %1$s on %2$s. Subscription has been canceled due to: %3$s" +#~ msgstr "" +#~ "Nachricht vom Novalnet-Callback-Skript erhalten: Das Abonnement wurde für " +#~ "die TID: %s am %s eingestellt. Das Abonnement wurde gekündigt wegen: %s" + +#~ msgid "" +#~ "Novalnet Callback Script executed successfully for the TID: %1$s with " +#~ "amount %2$s on %3$s. Please refer PAID transaction in our Novalnet Admin " +#~ "Portal with the TID: %4$s. %5$sPlease verify received amount and TID " +#~ "details, and update the order status accordingly. " +#~ msgstr "" +#~ "Novalnet-Callback-Skript erfolgreich ausgeführt für die TID: %1$s mit dem " +#~ "Betrag %2$s am , um %3$s Uhr. Bitte suchen Sie nach der bezahlten " +#~ "Transaktion in unserer Novalnet-Händleradministration mit der TID: %4$s. " +#~ "%5$s Please verify received amount and TID details, and update the order " +#~ "status accordingly. " + +#~ msgid "The amount will be debited from your credit/debit card" +#~ msgstr "Der Betrag wird Ihrer Kredit-/Debitkarte belastet" diff --git a/languages/edd-novalnet.mo b/languages/edd-novalnet.mo new file mode 100755 index 0000000..2365418 Binary files /dev/null and b/languages/edd-novalnet.mo differ diff --git a/languages/edd-novalnet.pot b/languages/edd-novalnet.pot new file mode 100755 index 0000000..56a578e --- /dev/null +++ b/languages/edd-novalnet.pot @@ -0,0 +1,1108 @@ +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Novalnet payment plugin - Easy Digital Downloads - 2.1.1\n" +"POT-Creation-Date: 2021-11-26 13:17+0530\n" +"PO-Revision-Date: 2018-05-15 18:15+0530\n" +"Last-Translator: novalnet \n" +"Language-Team: Novalnet \n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.6\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n" +"X-Poedit-Basepath: ..\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-SearchPath-0: .\n" + +#: class-novalnet.php:143 +msgid "Easy Digital Downloads Payment Gateway by Novalnetadd-on requires Easy Digital Downloads plugin. Please install and activate it." +msgstr "" + +#: class-novalnet.php:143 +msgid "Easy Digital Downloads Payment Gateway by Novalnetrequires PHP CURL. You need to activate the CURL function on your server. Please contact your hosting provider." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:74 +#: includes/class-novalnet-subscriptions.php:287 +msgid "--Select--" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:99 +msgid "Novalnet Global Configuration" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:141 +msgid "Novalnet API Configuration" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:141 +#, php-format +msgid "Please read the Installation Guide before you start and login to the Novalnet Admin Portal using your merchant account. To get a merchant account, mail to sales@novalnet.de or call +49 (089) 923068320." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:142 +#: includes/gateways/class-novalnet-cashpayment.php:183 +#: includes/gateways/class-novalnet-cc.php:307 +#: includes/gateways/class-novalnet-eps.php:180 +#: includes/gateways/class-novalnet-giropay.php:180 +#: includes/gateways/class-novalnet-ideal.php:180 +#: includes/gateways/class-novalnet-instantbank.php:179 +#: includes/gateways/class-novalnet-invoice.php:233 +#: includes/gateways/class-novalnet-paypal.php:195 +#: includes/gateways/class-novalnet-prepayment.php:194 +#: includes/gateways/class-novalnet-przelewy24.php:184 +#: includes/gateways/class-novalnet-sepa.php:257 +msgid "Configure the gateway settings" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:147 +#: includes/admin/class-novalnet-global-config.php:151 +msgid "Product activation key" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:152 +msgid "Your product activation key is a unique token for merchant authentication and payment processing." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:154 +#, php-format +msgid "Get your Product activation key from the Novalnet Admin Portal: PROJECT > Choose your project > Shop Parameters > API Signature (Product activation key)" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:158 +msgid "Merchant ID " +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:164 +msgid "Authentication code" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:170 +msgid "Project ID" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:176 +#: includes/admin/class-novalnet-global-config.php:177 +msgid "Select Tariff ID" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:178 +msgid "Select a Tariff ID to match the preferred tariff plan you created at the Novalnet Admin Portal for this project." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:184 +msgid "Payment access key" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:190 +msgid "Client Key" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:196 +#: includes/admin/class-novalnet-global-config.php:197 +msgid "Display payment logo" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:198 +msgid "The payment method logo(s) will be displayed on the checkout page. " +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:201 +#: includes/admin/class-novalnet-global-config.php:239 +#: includes/admin/class-novalnet-global-config.php:282 +#: includes/admin/class-novalnet-global-config.php:294 +#: includes/gateways/class-novalnet-cc.php:347 +#: includes/gateways/class-novalnet-invoice.php:353 +#: includes/gateways/class-novalnet-sepa.php:370 +msgid "No" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:202 +#: includes/admin/class-novalnet-global-config.php:240 +#: includes/admin/class-novalnet-global-config.php:283 +#: includes/admin/class-novalnet-global-config.php:295 +#: includes/gateways/class-novalnet-cc.php:346 +#: includes/gateways/class-novalnet-invoice.php:354 +#: includes/gateways/class-novalnet-sepa.php:371 +msgid "Yes" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:208 +msgid "Order status management for on-hold transactions" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:213 +#: includes/admin/class-novalnet-global-config.php:217 +msgid "On-hold order status" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:218 +msgid "Status to be used for on-hold orders until the transaction is confirmed or canceled." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:222 +#: includes/admin/class-novalnet-global-config.php:226 +msgid "Canceled order status" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:227 +msgid "Status to be used when order is canceled or fully refunded." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:231 +msgid "Dynamic subscription management" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:236 +msgid "Enable subscriptions" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:245 +msgid "Subscription payments" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:253 +#: includes/gateways/class-novalnet-cc.php:128 +#: includes/gateways/class-novalnet-cc.php:144 +#: includes/gateways/class-novalnet-cc.php:306 +msgid "Novalnet Credit/Debit Cards" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:254 +#: includes/gateways/class-novalnet-sepa.php:85 +#: includes/gateways/class-novalnet-sepa.php:101 +#: includes/gateways/class-novalnet-sepa.php:256 +msgid "Novalnet Direct Debit SEPA" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:255 +#: includes/gateways/class-novalnet-invoice.php:81 +#: includes/gateways/class-novalnet-invoice.php:97 +#: includes/gateways/class-novalnet-invoice.php:232 +msgid "Novalnet Invoice" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:256 +#: includes/gateways/class-novalnet-prepayment.php:65 +#: includes/gateways/class-novalnet-prepayment.php:81 +#: includes/gateways/class-novalnet-prepayment.php:193 +msgid "Novalnet Prepayment" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:257 +#: includes/gateways/class-novalnet-paypal.php:67 +#: includes/gateways/class-novalnet-paypal.php:83 +#: includes/gateways/class-novalnet-paypal.php:194 +msgid "Novalnet PayPal" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:264 +#: includes/admin/class-novalnet-global-config.php:265 +msgid "Subscription Tariff ID" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:266 +msgid "Select the preferred Novalnet subscription tariff ID available for your project. For more information, please refer the Installation Guide." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:271 +msgid "Notification / Webhook URL Setup" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:277 +#: includes/admin/class-novalnet-global-config.php:278 +msgid "Allow manual testing of the Notification / Webhook URL" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:279 +msgid "Enable this to test the Novalnet Notification / Webhook URL manually. Disable this before setting your shop live to block unauthorized calls from external parties." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:289 +#: includes/admin/class-novalnet-global-config.php:290 +msgid "Enable e-mail notification" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:291 +msgid "Enable this option to notify the given e-mail address when the Notification / Webhook URL is executed successfully." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:301 +#: includes/admin/class-novalnet-global-config.php:302 +msgid "Send e-mail to" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:303 +msgid "Notification / Webhook URL execution messages will be sent to this e-mail." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:309 +msgid "Notification / Webhook URL" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:319 +#, php-format +msgid "You must add the following webhook endpoint to your Novalnet Admin Portal . This will allow you to receive notifications about the transaction status." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:349 +#, php-format +msgid "You need to configure your outgoing server IP address ( %s ) at Novalnet. Please configure it in Novalnet Admin Portal or contact technic@novalnet.de" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:355 +#: includes/novalnet-functions.php:321 includes/novalnet-functions.php:589 +msgid "Please fill in all the mandatory fields" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:309 +#: includes/api/class-novalnet-callback-api.php:702 +#, php-format +msgid "The transaction has been canceled on %1$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:587 +msgid "Next charging date: " +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:590 +#, php-format +msgid "Subscription has been successfully renewed for the TID: %1$s with the amount %2$s on %3$s. The renewal TID is: %4$s" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:644 +#: includes/class-novalnet-subscriptions.php:267 +msgid "The subscription has been already stopped or cancelled" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:678 +#: includes/novalnet-functions.php:1029 +msgid "Other" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:707 +#, php-format +msgid "Subscription has been stopped for the TID: %1$s on %2$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:713 +#, php-format +msgid "Subscription has been canceled due to: %1$s" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:773 +#, php-format +msgid "Subscription has been reactivated for the TID: %1$s on %2$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:820 +#, php-format +msgid "The transaction has been confirmed on %1$s" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:825 +#, php-format +msgid "The transaction status has been changed from pending to on-hold for the TID: %1$s on %2$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:851 +#, php-format +msgid "Transaction updated successfully for the TID: %1$s on %2$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:878 +#, php-format +msgid "The transaction has been canceled due to: %s" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:913 +#, php-format +msgid "Refund has been initiated for the TID: %1$s with the amount %2$s. New TID: %3$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:916 +#, php-format +msgid "Chargeback executed for return debit of TID:%1$s with the amount %2$s on %3$s. The subsequent TID: %4$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:919 +#, php-format +msgid "Chargeback executed for reversal of TID: %1$s with the amount %2$s on %3$s. The subsequent TID: %4$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:922 +#, php-format +msgid "Chargeback executed successfully for the TID: %1$s amount: %2$s on %3$s. The subsequent TID: %4$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:946 +#: includes/api/class-novalnet-callback-api.php:949 +#: includes/api/class-novalnet-callback-api.php:974 +#, php-format +msgid "Credit has been successfully received for the TID: %1$s with amount %2$s on %3$s . Please refer PAID order details in our Novalnet Admin Portal for the TID: %4$s " +msgstr "" + +#: includes/class-novalnet-subscriptions.php:127 +msgid "Invalid subscription id" +msgstr "" + +#: includes/class-novalnet-subscriptions.php:178 +#: includes/gateways/class-novalnet-sepa.php:210 +msgid "Your account details are invalid" +msgstr "" + +#: includes/class-novalnet-subscriptions.php:266 +msgid "Please select the reason for subscription cancellation" +msgstr "" + +#: includes/class-novalnet-subscriptions.php:291 +msgid "Cancel" +msgstr "" + +#: includes/class-novalnet-subscriptions.php:340 +#, php-format +msgid "Subscription has been canceled due to: %s" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:64 +#: includes/gateways/class-novalnet-cashpayment.php:79 +#: includes/gateways/class-novalnet-cashpayment.php:182 +msgid "Novalnet Barzahlen/viacash" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:80 +msgid "Barzahlen/viacash " +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:98 +msgid "Barzahlen/viacash" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:110 +msgid "On successful checkout, you will receive a payment slip/SMS to pay your online purchase at one of our retail partners (e.g. supermarket)." +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:128 +#: includes/gateways/class-novalnet-cashpayment.php:191 +#: includes/gateways/class-novalnet-cc.php:194 +#: includes/gateways/class-novalnet-cc.php:315 +#: includes/gateways/class-novalnet-eps.php:130 +#: includes/gateways/class-novalnet-eps.php:188 +#: includes/gateways/class-novalnet-giropay.php:131 +#: includes/gateways/class-novalnet-giropay.php:188 +#: includes/gateways/class-novalnet-ideal.php:130 +#: includes/gateways/class-novalnet-ideal.php:188 +#: includes/gateways/class-novalnet-instantbank.php:129 +#: includes/gateways/class-novalnet-instantbank.php:187 +#: includes/gateways/class-novalnet-invoice.php:241 +#: includes/gateways/class-novalnet-paypal.php:132 +#: includes/gateways/class-novalnet-paypal.php:203 +#: includes/gateways/class-novalnet-prepayment.php:130 +#: includes/gateways/class-novalnet-prepayment.php:202 +#: includes/gateways/class-novalnet-przelewy24.php:132 +#: includes/gateways/class-novalnet-przelewy24.php:192 +#: includes/gateways/class-novalnet-sepa.php:265 +#: templates/invoice-template.php:50 templates/sepa-template.php:50 +msgid "The payment will be processed in the test mode therefore amount for this transaction will not be charged" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:188 +#: includes/gateways/class-novalnet-cashpayment.php:190 +#: includes/gateways/class-novalnet-cc.php:312 +#: includes/gateways/class-novalnet-cc.php:314 +#: includes/gateways/class-novalnet-eps.php:185 +#: includes/gateways/class-novalnet-eps.php:187 +#: includes/gateways/class-novalnet-giropay.php:185 +#: includes/gateways/class-novalnet-giropay.php:187 +#: includes/gateways/class-novalnet-ideal.php:185 +#: includes/gateways/class-novalnet-ideal.php:187 +#: includes/gateways/class-novalnet-instantbank.php:184 +#: includes/gateways/class-novalnet-instantbank.php:186 +#: includes/gateways/class-novalnet-invoice.php:238 +#: includes/gateways/class-novalnet-invoice.php:240 +#: includes/gateways/class-novalnet-paypal.php:200 +#: includes/gateways/class-novalnet-paypal.php:202 +#: includes/gateways/class-novalnet-prepayment.php:199 +#: includes/gateways/class-novalnet-prepayment.php:201 +#: includes/gateways/class-novalnet-przelewy24.php:189 +#: includes/gateways/class-novalnet-przelewy24.php:191 +#: includes/gateways/class-novalnet-sepa.php:262 +#: includes/gateways/class-novalnet-sepa.php:264 +msgid "Enable test mode" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:195 +#: includes/gateways/class-novalnet-cashpayment.php:199 +msgid "Slip expiry date (in days)" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:200 +msgid "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. " +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:204 +#: includes/gateways/class-novalnet-cashpayment.php:208 +#: includes/gateways/class-novalnet-cc.php:353 +#: includes/gateways/class-novalnet-cc.php:357 +#: includes/gateways/class-novalnet-eps.php:192 +#: includes/gateways/class-novalnet-eps.php:196 +#: includes/gateways/class-novalnet-giropay.php:192 +#: includes/gateways/class-novalnet-giropay.php:196 +#: includes/gateways/class-novalnet-ideal.php:192 +#: includes/gateways/class-novalnet-ideal.php:196 +#: includes/gateways/class-novalnet-instantbank.php:191 +#: includes/gateways/class-novalnet-instantbank.php:195 +#: includes/gateways/class-novalnet-invoice.php:277 +#: includes/gateways/class-novalnet-invoice.php:281 +#: includes/gateways/class-novalnet-paypal.php:238 +#: includes/gateways/class-novalnet-paypal.php:242 +#: includes/gateways/class-novalnet-prepayment.php:216 +#: includes/gateways/class-novalnet-prepayment.php:220 +#: includes/gateways/class-novalnet-przelewy24.php:205 +#: includes/gateways/class-novalnet-przelewy24.php:209 +#: includes/gateways/class-novalnet-sepa.php:302 +#: includes/gateways/class-novalnet-sepa.php:306 +msgid "Completed order status" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:209 +#: includes/gateways/class-novalnet-cc.php:358 +#: includes/gateways/class-novalnet-eps.php:197 +#: includes/gateways/class-novalnet-giropay.php:197 +#: includes/gateways/class-novalnet-ideal.php:197 +#: includes/gateways/class-novalnet-instantbank.php:196 +#: includes/gateways/class-novalnet-invoice.php:282 +#: includes/gateways/class-novalnet-paypal.php:243 +#: includes/gateways/class-novalnet-prepayment.php:221 +#: includes/gateways/class-novalnet-przelewy24.php:210 +#: includes/gateways/class-novalnet-sepa.php:307 +msgid "Status to be used for successful orders." +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:213 +#: includes/gateways/class-novalnet-cashpayment.php:217 +#: includes/gateways/class-novalnet-invoice.php:286 +#: includes/gateways/class-novalnet-invoice.php:290 +#: includes/gateways/class-novalnet-prepayment.php:225 +#: includes/gateways/class-novalnet-prepayment.php:229 +msgid "Callback / Webhook order status" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:218 +#: includes/gateways/class-novalnet-invoice.php:291 +#: includes/gateways/class-novalnet-prepayment.php:230 +msgid "Status to be used when callback script is executed for payment received by Novalnet." +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:222 +#: includes/gateways/class-novalnet-cc.php:362 +#: includes/gateways/class-novalnet-eps.php:201 +#: includes/gateways/class-novalnet-giropay.php:201 +#: includes/gateways/class-novalnet-ideal.php:201 +#: includes/gateways/class-novalnet-instantbank.php:200 +#: includes/gateways/class-novalnet-invoice.php:295 +#: includes/gateways/class-novalnet-paypal.php:247 +#: includes/gateways/class-novalnet-prepayment.php:234 +#: includes/gateways/class-novalnet-przelewy24.php:214 +#: includes/gateways/class-novalnet-sepa.php:311 +msgid "Notification for the buyer" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:225 +#: includes/gateways/class-novalnet-cc.php:365 +#: includes/gateways/class-novalnet-eps.php:204 +#: includes/gateways/class-novalnet-giropay.php:204 +#: includes/gateways/class-novalnet-ideal.php:204 +#: includes/gateways/class-novalnet-instantbank.php:203 +#: includes/gateways/class-novalnet-invoice.php:298 +#: includes/gateways/class-novalnet-paypal.php:250 +#: includes/gateways/class-novalnet-prepayment.php:237 +#: includes/gateways/class-novalnet-przelewy24.php:217 +#: includes/gateways/class-novalnet-sepa.php:314 +msgid "The entered text will be displayed at the checkout page" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:83 +msgid "Card holder name" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:84 +msgid "Name on card" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:85 +msgid "Card number" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:86 +msgid "XXXX XXXX XXXX XXXX" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:87 +msgid "Expiry date" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:88 +msgid "CVC/CVV/CID" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:89 +msgid "XXX" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:90 +#: includes/gateways/class-novalnet-cc.php:289 +msgid "Your credit card details are invalid" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:145 +#: includes/gateways/class-novalnet-cc.php:166 +msgid "Credit/Debit Cards" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:178 +msgid "Your credit/debit card will be charged immediately after the order is completed" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:319 +#: includes/gateways/class-novalnet-cc.php:322 +#: includes/gateways/class-novalnet-invoice.php:254 +#: includes/gateways/class-novalnet-invoice.php:257 +#: includes/gateways/class-novalnet-paypal.php:207 +#: includes/gateways/class-novalnet-paypal.php:210 +#: includes/gateways/class-novalnet-sepa.php:280 +#: includes/gateways/class-novalnet-sepa.php:283 +msgid "Payment action" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:323 +#: includes/gateways/class-novalnet-invoice.php:258 +#: includes/gateways/class-novalnet-paypal.php:211 +#: includes/gateways/class-novalnet-sepa.php:284 +msgid "Choose whether or not the payment should be charged immediately. Capture completes the transaction by transferring the funds from buyer account to merchant account. Authorize verifies payment details and reserves funds to capture it later, giving time for the merchant to decide on the order." +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:325 +#: includes/gateways/class-novalnet-invoice.php:260 +#: includes/gateways/class-novalnet-paypal.php:213 +#: includes/gateways/class-novalnet-sepa.php:286 +msgid "Capture" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:326 +#: includes/gateways/class-novalnet-invoice.php:261 +#: includes/gateways/class-novalnet-paypal.php:214 +#: includes/gateways/class-novalnet-sepa.php:287 +msgid "Authorize" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:332 +#: includes/gateways/class-novalnet-cc.php:336 +#: includes/gateways/class-novalnet-invoice.php:267 +#: includes/gateways/class-novalnet-invoice.php:271 +#: includes/gateways/class-novalnet-paypal.php:220 +#: includes/gateways/class-novalnet-paypal.php:224 +#: includes/gateways/class-novalnet-sepa.php:293 +#: includes/gateways/class-novalnet-sepa.php:297 +msgid "Minimum transaction limit for authorization" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:335 +#: includes/gateways/class-novalnet-invoice.php:270 +#: includes/gateways/class-novalnet-paypal.php:223 +#: includes/gateways/class-novalnet-sepa.php:296 +#: includes/gateways/class-novalnet-sepa.php:360 +msgid "(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:337 +#: includes/gateways/class-novalnet-paypal.php:225 +#: includes/gateways/class-novalnet-sepa.php:298 +msgid "In case the order amount exceeds the mentioned limit, the transaction will be set on-hold till your confirmation of the transaction. You can leave the field empty if you wish to process all the transactions as on-hold." +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:341 +#: includes/gateways/class-novalnet-cc.php:343 +msgid "Enforce 3D secure payment outside EU" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:344 +msgid "By enabling this option, all payments from cards issued outside the EU will be authenticated via 3DS 2.0 SCA" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:368 +msgid "Custom CSS settings" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:373 +msgid "CSS settings for iframe form" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:379 +msgid "Label" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:380 +#: includes/gateways/class-novalnet-cc.php:388 +msgid "E.g: color:#999999; background-color:#FFFFFF;" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:387 +msgid "Input" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:395 +msgid "CSS Text" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:396 +msgid "E.g: #idselector{color:#999999;}.classSelector{color:#000000}" +msgstr "" + +#: includes/gateways/class-novalnet-eps.php:66 +#: includes/gateways/class-novalnet-eps.php:81 +#: includes/gateways/class-novalnet-eps.php:179 +msgid "Novalnet eps" +msgstr "" + +#: includes/gateways/class-novalnet-eps.php:82 +#: includes/gateways/class-novalnet-eps.php:101 +msgid "eps" +msgstr "" + +#: includes/gateways/class-novalnet-eps.php:113 +msgid "You will be redirected to eps. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-giropay.php:67 +#: includes/gateways/class-novalnet-giropay.php:83 +#: includes/gateways/class-novalnet-giropay.php:179 +msgid "Novalnet giropay" +msgstr "" + +#: includes/gateways/class-novalnet-giropay.php:84 +#: includes/gateways/class-novalnet-giropay.php:102 +msgid "giropay" +msgstr "" + +#: includes/gateways/class-novalnet-giropay.php:114 +msgid "You will be redirected to giropay. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-ideal.php:67 +#: includes/gateways/class-novalnet-ideal.php:82 +#: includes/gateways/class-novalnet-ideal.php:179 +msgid "Novalnet iDEAL" +msgstr "" + +#: includes/gateways/class-novalnet-ideal.php:83 +#: includes/gateways/class-novalnet-ideal.php:100 +msgid "iDEAL" +msgstr "" + +#: includes/gateways/class-novalnet-ideal.php:112 +msgid "You will be redirected to iDEAL. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-instantbank.php:67 +#: includes/gateways/class-novalnet-instantbank.php:82 +#: includes/gateways/class-novalnet-instantbank.php:178 +msgid "Novalnet Sofort" +msgstr "" + +#: includes/gateways/class-novalnet-instantbank.php:83 +#: includes/gateways/class-novalnet-instantbank.php:100 +msgid "Sofort" +msgstr "" + +#: includes/gateways/class-novalnet-instantbank.php:112 +msgid "You will be redirected to Sofort. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:98 +#: includes/gateways/class-novalnet-invoice.php:121 +msgid "Invoice" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:156 +#: includes/gateways/class-novalnet-sepa.php:216 +#, php-format +msgid "The payment cannot be processed, because the basic requirements for the payment guarantee are not met ( %s ) " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:245 +#: includes/gateways/class-novalnet-invoice.php:249 +#: includes/gateways/class-novalnet-prepayment.php:206 +#: includes/gateways/class-novalnet-prepayment.php:211 +#: includes/gateways/class-novalnet-sepa.php:269 +#: includes/gateways/class-novalnet-sepa.php:275 +msgid "Payment due date (in days)" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:250 +#: includes/gateways/class-novalnet-prepayment.php:212 +msgid "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. " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:272 +msgid "When the order amount exceeds the mentioned limit, the transaction will be set on-hold till you confirm it. You can leave the field empty if you wish to process all transactions as on-hold transactions. " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:303 +#: includes/gateways/class-novalnet-sepa.php:318 +msgid "Payment guarantee configuration" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:317 +#: includes/gateways/class-novalnet-sepa.php:332 +msgid "Payment guarantee requirements: " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:318 +#: includes/gateways/class-novalnet-sepa.php:333 +msgid "Allowed countries: DE, AT, CH" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:319 +#: includes/gateways/class-novalnet-sepa.php:334 +msgid "Allowed currency: EUR" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:320 +#: includes/gateways/class-novalnet-sepa.php:335 +msgid "Minimum order amount: 9,99 EUR or more" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:321 +#: includes/gateways/class-novalnet-sepa.php:336 +msgid "Age limit: 18 years or more" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:322 +#: includes/gateways/class-novalnet-sepa.php:337 +msgid "The billing address must be the same as the shipping address" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:328 +#: includes/gateways/class-novalnet-sepa.php:344 +msgid "Enable payment guarantee" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:333 +#: includes/gateways/class-novalnet-invoice.php:337 +#: includes/gateways/class-novalnet-paypal.php:229 +#: includes/gateways/class-novalnet-paypal.php:233 +#: includes/gateways/class-novalnet-przelewy24.php:196 +#: includes/gateways/class-novalnet-przelewy24.php:200 +#: includes/gateways/class-novalnet-sepa.php:349 +#: includes/gateways/class-novalnet-sepa.php:353 +msgid "Payment status for the pending payment" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:338 +#: includes/gateways/class-novalnet-paypal.php:234 +#: includes/gateways/class-novalnet-przelewy24.php:201 +#: includes/gateways/class-novalnet-sepa.php:354 +msgid "Status to be used for pending transactions." +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:342 +#: includes/gateways/class-novalnet-invoice.php:345 +#: includes/gateways/class-novalnet-sepa.php:358 +#: includes/gateways/class-novalnet-sepa.php:362 +msgid "Minimum order amount for payment guarantee" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:346 +#: includes/gateways/class-novalnet-sepa.php:363 +msgid "Enter the minimum amount (in cents) for the transaction to be processed with payment guarantee. For example, enter 100 which is equal to 1,00. By default, the amount will be 9,99 EUR." +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:350 +#: includes/gateways/class-novalnet-invoice.php:357 +#: includes/gateways/class-novalnet-sepa.php:367 +#: includes/gateways/class-novalnet-sepa.php:374 +msgid "Force Non-Guarantee payment" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:358 +#: includes/gateways/class-novalnet-sepa.php:375 +msgid "Even if payment guarantee is enabled, payments will still be processed as non-guarantee payments if the payment guarantee requirements are not met. Review the requirements under 'Enable Payment Guarantee' in the Installation Guide. " +msgstr "" + +#: includes/gateways/class-novalnet-paypal.php:84 +#: includes/gateways/class-novalnet-paypal.php:102 +msgid "PayPal" +msgstr "" + +#: includes/gateways/class-novalnet-paypal.php:114 +msgid "You will be redirected to PayPal. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-paypal.php:194 +#, php-format +msgid "To accept PayPal transactions, configure your PayPal API info in the Novalnet Admin Portal: > PROJECT > Choose your project > Payment Methods > Paypal > Configure." +msgstr "" + +#: includes/gateways/class-novalnet-prepayment.php:82 +#: includes/gateways/class-novalnet-prepayment.php:100 +msgid "Prepayment" +msgstr "" + +#: includes/gateways/class-novalnet-prepayment.php:112 +#: templates/invoice-template.php:32 +msgid "You will receive an e-mail with the Novalnet account details to complete the payment." +msgstr "" + +#: includes/gateways/class-novalnet-przelewy24.php:67 +#: includes/gateways/class-novalnet-przelewy24.php:83 +#: includes/gateways/class-novalnet-przelewy24.php:183 +msgid "Novalnet Przelewy24" +msgstr "" + +#: includes/gateways/class-novalnet-przelewy24.php:84 +#: includes/gateways/class-novalnet-przelewy24.php:102 +msgid "Przelewy24" +msgstr "" + +#: includes/gateways/class-novalnet-przelewy24.php:114 +msgid "You will be redirected to Przelewy24. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-sepa.php:102 +#: includes/gateways/class-novalnet-sepa.php:126 +msgid "Direct Debit SEPA" +msgstr "" + +#: includes/gateways/class-novalnet-sepa.php:276 +msgid "Number of days after which the payment is debited (must be between 2 and 14 days)." +msgstr "" + +#: includes/novalnet-functions.php:135 +msgid "Configuration" +msgstr "" + +#: includes/novalnet-functions.php:196 +msgid "Payment was not successful. An error occurred." +msgstr "" + +#: includes/novalnet-functions.php:213 +msgid "Pay now with Barzahlen/viacash" +msgstr "" + +#: includes/novalnet-functions.php:365 +msgid "The amount is invalid" +msgstr "" + +#: includes/novalnet-functions.php:376 +msgid "Multiple subscription can not be purchased at the same time " +msgstr "" + +#: includes/novalnet-functions.php:586 +msgid "Customer name/email fields are not valid" +msgstr "" + +#: includes/novalnet-functions.php:639 +msgid "You are now redirected automatically" +msgstr "" + +#: includes/novalnet-functions.php:639 +msgid "Please wait..." +msgstr "" + +#: includes/novalnet-functions.php:733 +#, php-format +msgid "Successfully updated the payment and customer billing details for upcoming subscriptions on date: %s" +msgstr "" + +#: includes/novalnet-functions.php:930 includes/novalnet-functions.php:987 +msgid "While redirecting some data has been changed. The hash check failed" +msgstr "" + +#: includes/novalnet-functions.php:939 +#, php-format +msgid "Recurring change payment method has been failed due to %s" +msgstr "" + +#: includes/novalnet-functions.php:1019 +msgid "Product is costly" +msgstr "" + +#: includes/novalnet-functions.php:1020 +msgid "Cheating" +msgstr "" + +#: includes/novalnet-functions.php:1021 +msgid "Partner interfered" +msgstr "" + +#: includes/novalnet-functions.php:1022 +msgid "Financial problem" +msgstr "" + +#: includes/novalnet-functions.php:1023 +msgid "Content does not match my likes" +msgstr "" + +#: includes/novalnet-functions.php:1024 +msgid "Content is not enough" +msgstr "" + +#: includes/novalnet-functions.php:1025 +msgid "Interested only for a trial" +msgstr "" + +#: includes/novalnet-functions.php:1026 +msgid "Page is very slow" +msgstr "" + +#: includes/novalnet-functions.php:1027 +msgid "Satisfied customer" +msgstr "" + +#: includes/novalnet-functions.php:1028 +msgid "Logging in problems" +msgstr "" + +#: includes/novalnet-functions.php:1444 +msgid "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." +msgstr "" + +#: includes/novalnet-functions.php:1446 +msgid "Please transfer the amount to the below mentioned account." +msgstr "" + +#: includes/novalnet-functions.php:1449 +msgid "Due date: " +msgstr "" + +#: includes/novalnet-functions.php:1451 +msgid "Account holder: " +msgstr "" + +#: includes/novalnet-functions.php:1459 +msgid "Amount: " +msgstr "" + +#: includes/novalnet-functions.php:1462 +msgid "Please use the following payment reference for your money transfer, as only through this way your payment is matched and assigned to the order:" +msgstr "" + +#: includes/novalnet-functions.php:1470 +#, php-format +msgid "Payment Reference %s: " +msgstr "" + +#: includes/novalnet-functions.php:1492 +msgid "Slip expiry date" +msgstr "" + +#: includes/novalnet-functions.php:1495 +msgid "Store(s) near you" +msgstr "" + +#: includes/novalnet-functions.php:1681 +msgid "This is processed as a guarantee payment" +msgstr "" + +#: includes/novalnet-functions.php:1683 +#, php-format +msgid "Novalnet transaction ID: %s" +msgstr "" + +#: includes/novalnet-functions.php:1684 +msgid "Test order" +msgstr "" + +#: includes/novalnet-functions.php:1686 +msgid "Your order is under verification and we will soon update you with the order status. Please note that this may take upto 24 hours." +msgstr "" + +#: includes/novalnet-functions.php:1733 +msgid "Only Germany, Austria or Switzerland are allowed" +msgstr "" + +#: includes/novalnet-functions.php:1736 +msgid "Only EUR currency allowed" +msgstr "" + +#: includes/novalnet-functions.php:1740 +#, php-format +msgid "Minimum order amount must be %s" +msgstr "" + +#: includes/novalnet-functions.php:1773 +msgid "Please enter your date of birth" +msgstr "" + +#: includes/novalnet-functions.php:1775 +msgid "The date format is invalid" +msgstr "" + +#: includes/novalnet-functions.php:1777 +msgid "You need to be at least 18 years old" +msgstr "" + +#: templates/invoice-template.php:67 templates/sepa-template.php:67 +#, php-format +msgid "The payment cannot be processed, because the basic requirements for the payment guarantee are not met %s " +msgstr "" + +#: templates/invoice-template.php:79 templates/sepa-template.php:82 +msgid "Please enable the Javascript in your browser to load the payment form" +msgstr "" + +#: templates/invoice-template.php:87 templates/sepa-template.php:106 +msgid "Your date of birth" +msgstr "" + +#: templates/invoice-template.php:91 templates/sepa-template.php:110 +msgid "DD" +msgstr "" + +#: templates/invoice-template.php:92 templates/sepa-template.php:111 +msgid "MM" +msgstr "" + +#: templates/invoice-template.php:93 templates/sepa-template.php:112 +msgid "YYYY" +msgstr "" + +#: templates/sepa-template.php:32 +msgid "The amount will be debited from your account by Novalnet" +msgstr "" + +#: templates/sepa-template.php:89 templates/sepa-template.php:92 +msgid "Account holder" +msgstr "" + +#: templates/sepa-template.php:96 +msgid "IBAN " +msgstr "" + +#: templates/sepa-template.php:99 +msgid "IBAN" +msgstr "" + +#: templates/sepa-template.php:120 +msgid "I hereby grant the mandate for the SEPA direct debit (electronic transmission) and confirm that the given bank details are correct!" +msgstr "" + +#: templates/sepa-template.php:123 +msgid "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." +msgstr "" + +#: templates/sepa-template.php:126 +msgid "Creditor identifier: " +msgstr "" + +#: templates/sepa-template.php:128 +msgid "Note: " +msgstr "" + +#: templates/sepa-template.php:128 +msgid "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." +msgstr "" diff --git a/languages/messages.mo b/languages/messages.mo new file mode 100644 index 0000000..de0510b Binary files /dev/null and b/languages/messages.mo differ diff --git a/novalnet-install.php b/novalnet-install.php new file mode 100755 index 0000000..fe8b860 --- /dev/null +++ b/novalnet-install.php @@ -0,0 +1,113 @@ +get_charset_collate(); + $edd_recurring_version = preg_replace( '/[^0-9.].*/', '', get_option( 'edd_recurring_version' ) ); + if ( version_compare($edd_recurring_version, '2.7', '>=') ) { + $sub_details = $wpdb->get_results( "SELECT id, parent_payment_id FROM {$wpdb->prefix}edd_subscriptions" ); + foreach ( $sub_details as $row ) { + $result = $wpdb->get_results( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} where post_parent = '%d' AND post_type='edd_payment'", array( $row->parent_payment_id ) ) ); + foreach ( $result as $post_id ) { + update_post_meta( $post_id->ID, 'subscription_id', $row->id ); + } + } + } + require_once ABSPATH . 'wp-admin/includes/upgrade.php'; + + if ( ! get_option( 'novalnet_db_version' ) || NOVALNET_VERSION !== get_option( 'novalnet_db_version' ) ) { + dbDelta( + " + CREATE TABLE IF NOT EXISTS {$wpdb->prefix}novalnet_transaction_detail ( + id int(11) NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID', + order_no bigint(20) unsigned NOT NULL COMMENT 'Post ID for the order in shop', + vendor_id int(8) unsigned NOT NULL COMMENT 'Novalnet Vendor ID', + auth_code varchar(30) NOT NULL COMMENT 'Novalnet Authentication code', + product_id int(8) unsigned NOT NULL COMMENT 'Novalnet Project ID', + tariff_id int(8) unsigned NOT NULL COMMENT 'Novalnet Tariff ID', + payment_id int(8) unsigned NOT NULL COMMENT 'Payment ID', + payment_type varchar(50) NOT NULL COMMENT 'Executed Payment type of this order', + tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + subs_id int(8) unsigned DEFAULT NULL COMMENT 'Subscription Status', + amount int(11) NOT NULL COMMENT 'Transaction amount in cents', + callback_amount int(11) DEFAULT '0' COMMENT 'Transaction paid amount in cents', + currency varchar(5) NOT NULL COMMENT 'Transaction currency', + gateway_status int(11) DEFAULT NULL COMMENT 'Novalnet transaction status', + test_mode tinyint(1) unsigned DEFAULT NULL COMMENT 'Transaction test mode status', + customer_id int(11) unsigned DEFAULT NULL COMMENT 'Customer ID from shop', + customer_email varchar(50) DEFAULT NULL COMMENT 'Customer ID from shop', + date datetime NOT NULL COMMENT 'Transaction Date for reference', + PRIMARY KEY (id), + INDEX tid (tid), + INDEX customer_id (customer_id), + INDEX order_no (order_no) + ) $charset_collate COMMENT='Novalnet Transaction History';" + ); + + dbDelta( + " + CREATE TABLE IF NOT EXISTS {$wpdb->prefix}novalnet_subscription_details ( + id int(11) NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID', + order_no bigint(20) NOT NULL COMMENT 'Post ID for the order in shop', + payment_type varchar(50) NOT NULL COMMENT 'Payment Type', + recurring_payment_type varchar(50) NOT NULL COMMENT 'Recurring Payment Type', + recurring_amount int(11) DEFAULT NULL COMMENT 'Amount in cents', + tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + recurring_tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + subs_id int(8) unsigned DEFAULT NULL COMMENT 'Subscription Status', + signup_date datetime DEFAULT NULL COMMENT 'Subscription signup date', + next_payment_date datetime DEFAULT NULL COMMENT 'Subscription next cycle date', + termination_reason varchar(255) DEFAULT NULL COMMENT 'Subscription termination reason by merchant', + termination_at datetime DEFAULT NULL COMMENT 'Subscription terminated date', + subscription_length int(8) NOT NULL DEFAULT 0 COMMENT 'Length of Subscription', + PRIMARY KEY (id), + INDEX order_no (order_no), + INDEX tid (tid) + ) $charset_collate COMMENT='Novalnet Subscription Payment Details';" + ); + + update_option( 'novalnet_version_update', true ); + if ( ! get_option( 'novalnet_db_version' ) ) { + add_option( 'novalnet_db_version', NOVALNET_VERSION ); + } elseif ( NOVALNET_VERSION !== get_option( 'novalnet_db_version' ) ) { + + if ( version_compare(get_option( 'novalnet_db_version' ), '2.1.1', '<=') ) { + + $edd_settings = get_option('edd_settings'); + + $store_temp_subs_payment = array(); + + if( isset($edd_settings['novalnet_subs_payments']) && !empty( $edd_settings['novalnet_subs_payments'] ) ) { + $store_temp_subs_payment = array( + 'novalnet_subs_payments' => array_keys($edd_settings['novalnet_subs_payments']) + ); + } + + update_option('edd_settings', array_merge( $edd_settings, $store_temp_subs_payment )); + } + update_option( 'novalnet_db_version', NOVALNET_VERSION ); + } + + }// End if(). +} diff --git a/templates/invoice-template.php b/templates/invoice-template.php new file mode 100755 index 0000000..4381c44 --- /dev/null +++ b/templates/invoice-template.php @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %s ', 'edd-novalnet' ), $invoice_error_msg ); + echo __( $invoice_error_msg, 'edd-novalnet' ); + } + ?> + + + + + + + + + + session->get( 'novalnet_invoice_guarantee_payment_error' ) ) || ( 0 === get_current_user_id() ) ) && !$update_payment ) { + // display Date of birth field. + ?> + + + * + + + + + + + + + + diff --git a/templates/sepa-template.php b/templates/sepa-template.php new file mode 100755 index 0000000..332c211 --- /dev/null +++ b/templates/sepa-template.php @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %s ', 'edd-novalnet' ), $error_msg ); + echo __( $error_msg, 'edd-novalnet' ); + } + ?> + + + + + + + + + + + + + + + + * + + + + + + + * + + + + session->get( 'novalnet_sepa_guarantee_payment_error' ) ) || ( 0 === get_current_user_id() ) ) && !$update_payment ) { + // display Date of birth field. + ?> + + + * + + + + + + + + + + + + + + + + + DE53ZZZ00000004253 + + + + + + +
' . sprintf( __( 'Please read the Installation Guide before you start and login to the Novalnet Admin Portal using your merchant account. To get a merchant account, mail to sales@novalnet.de or call +49 (089) 923068320.', 'edd-novalnet' ), $admin_url) . '
' . esc_attr( $message ) . '
' . esc_html( $cancel_msg ) . '
+ + + + + +
+ + + + +
(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)', 'edd-novalnet' ), + 'tooltip_title' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'tooltip_desc' => __( 'In case the order amount exceeds the mentioned limit, the transaction will be set on-hold till your confirmation of the transaction. You can leave the field empty if you wish to process all the transactions as on-hold.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_cc_enforced_3d', + 'name' => __( 'Enforce 3D secure payment outside EU', 'edd-novalnet' ), + 'type' => 'select', + 'tooltip_title' => __( 'Enforce 3D secure payment outside EU', 'edd-novalnet' ), + 'tooltip_desc' => __( 'By enabling this option, all payments from cards issued outside the EU will be authenticated via 3DS 2.0 SCA', 'edd-novalnet' ), + 'options' => array( + 'yes' => __( 'Yes', 'edd-novalnet' ), + 'no' => __( 'No', 'edd-novalnet' ), + ), + 'std' => 'no', + ), + array( + 'id' => 'novalnet_cc_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_cc_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + array( + 'name' => '' . __( 'Custom CSS settings', 'edd-novalnet' ) . ' ', + 'type' => 'header', + 'id' => 'novalnet_css_main_settings', + ), + array( + 'name' => '' . __( 'CSS settings for iframe form', 'edd-novalnet' ) . ' ', + 'type' => 'header', + 'id' => 'novalnet_css_settings', + ), + array( + 'id' => 'novalnet_common_label_style', + 'name' => __( 'Label', 'edd-novalnet' ), + 'desc' => __( 'E.g: color:#999999; background-color:#FFFFFF;', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'std' => 'font-weight: 700;display: block;position: relative;line-height: 100%;font-size: 114%;font-family: NonBreakingSpaceOverride, "Hoefler Text", Garamond, "Times New Roman", serif;letter-spacing: normal;', + ), + array( + 'id' => 'novalnet_common_field_style', + 'name' => __( 'Input', 'edd-novalnet' ), + 'desc' => __( 'E.g: color:#999999; background-color:#FFFFFF;', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'std' => '.input{padding: 4px 6px;display: inline-block;width: 100%;}', + ), + array( + 'id' => 'novalnet_common_style_text', + 'name' => __( 'CSS Text', 'edd-novalnet' ), + 'desc' => __( 'E.g: #idselector{color:#999999;}.classSelector{color:#000000}', 'edd-novalnet' ), + 'type' => 'textarea', + 'allow_blank' => false, + 'std' => 'body{color: #141412; line-height: 1.5; margin: 0;} html, button, input, select, textarea{font-family: "Source Sans Pro",Helvetica,sans-serif;color: #000;}html{font-size: 100%;}', + ), + ); + $novalnet_cc = apply_filters( 'edd_novalnet_cc_settings', $novalnet_cc ); + $gateway_settings['novalnet_cc'] = $novalnet_cc; + return $gateway_settings; + } +} +new Novalnet_Cc(); +?> diff --git a/includes/gateways/class-novalnet-eps.php b/includes/gateways/class-novalnet-eps.php new file mode 100755 index 0000000..af89cc0 --- /dev/null +++ b/includes/gateways/class-novalnet-eps.php @@ -0,0 +1,213 @@ + array( + 'admin_label' => __( 'Novalnet eps', 'edd-novalnet' ), + 'checkout_label' => __( 'eps', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_eps = apply_filters( 'edd_register_novalnet_eps_gateway', $novalnet_eps ); + $gateways = array_merge( $gateways, $novalnet_eps ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + * @return void + */ + public function display_form() { + global $edd_options; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_eps_test_mode'] ) ); + $information = isset( $edd_options['novalnet_eps_information'] ) ? trim( $edd_options['novalnet_eps_information'] ) : ''; + $payment_method_name = __( 'eps', 'edd-novalnet' ); + ?> +
(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)', 'edd-novalnet' ), + 'tooltip_title' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'tooltip_desc' => __( 'When the order amount exceeds the mentioned limit, the transaction will be set on-hold till you confirm it. You can leave the field empty if you wish to process all transactions as on-hold transactions. ', 'edd-novalnet' ), + ), + + array( + 'id' => 'novalnet_invoice_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'processing', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_invoice_order_callback_status', + 'name' => __( 'Callback / Webhook order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Callback / Webhook order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used when callback script is executed for payment received by Novalnet.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_invoice_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + + ), + array( + 'id' => 'novalnet_guarantee_settings', + 'name' => ' ' . __( 'Payment guarantee configuration', 'edd-novalnet' ) . ' ', + 'type' => 'header', + ), + array( + 'id' => 'novalnet_invoice_guarantee_settings', + 'name' => sprintf( + '
' . sprintf( __( 'To accept PayPal transactions, configure your PayPal API info in the Novalnet Admin Portal: > PROJECT > Choose your project > Payment Methods > Paypal > Configure.', 'edd-novalnet' ), $admin_url ) . '
(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)', 'edd-novalnet' ), + 'tooltip_title' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'tooltip_desc' => __( 'In case the order amount exceeds the mentioned limit, the transaction will be set on-hold till your confirmation of the transaction. You can leave the field empty if you wish to process all the transactions as on-hold.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_paypal_order_pending_status', + 'name' => __( 'Payment status for the pending payment', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'pending', + 'tooltip_title' => __( 'Payment status for the pending payment', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for pending transactions.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_paypal_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_paypal_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + ); + $novalnet_paypal = apply_filters( 'edd_novalnet_paypal_settings', $novalnet_paypal ); + $gateway_settings['novalnet_paypal'] = $novalnet_paypal; + return $gateway_settings; + } +} +new Novalnet_Paypal(); +?> diff --git a/includes/gateways/class-novalnet-prepayment.php b/includes/gateways/class-novalnet-prepayment.php new file mode 100755 index 0000000..0bc17fd --- /dev/null +++ b/includes/gateways/class-novalnet-prepayment.php @@ -0,0 +1,246 @@ + array( + 'admin_label' => __( 'Novalnet Prepayment', 'edd-novalnet' ), + 'checkout_label' => __( 'Prepayment', 'edd-novalnet' ), + 'supports' => array(), + ), + ); + $novalnet_prepayment = apply_filters( 'edd_register_novalnet_prepayment_gateway', $novalnet_prepayment ); + $gateways = array_merge( $gateways, $novalnet_prepayment ); + return $gateways; + } + + /** + * Register the action to display the payment form + * + * @since 1.0.1 + */ + public function display_form() { + global $edd_options; + $test_mode = (int) ( edd_is_test_mode() || ! empty( $edd_options['novalnet_prepayment_test_mode'] ) ); + $information = isset( $edd_options['novalnet_prepayment_information'] ) ? trim( $edd_options['novalnet_prepayment_information'] ) : ''; + $payment_method_name = __( 'Prepayment', 'edd-novalnet' ); + ?> +
(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)', 'edd-novalnet' ), + 'tooltip_title' => __( 'Minimum transaction limit for authorization', 'edd-novalnet' ), + 'tooltip_desc' => __( 'In case the order amount exceeds the mentioned limit, the transaction will be set on-hold till your confirmation of the transaction. You can leave the field empty if you wish to process all the transactions as on-hold.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_sepa_order_completion_status', + 'name' => __( 'Completed order status', 'edd-novalnet' ), + 'type' => 'select', + 'options' => edd_get_payment_statuses(), + 'std' => 'publish', + 'tooltip_title' => __( 'Completed order status', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Status to be used for successful orders.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_sepa_information', + 'name' => __( 'Notification for the buyer', 'edd-novalnet' ), + 'type' => 'textarea', + 'size' => 'regular', + 'desc' => __( 'The entered text will be displayed at the checkout page', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_guarantee_settings', + 'name' => ' ' . __( 'Payment guarantee configuration', 'edd-novalnet' ) . '', + 'type' => 'header', + ), + array( + 'id' => 'novalnet_sepa_guarantee_settings', + 'name' => sprintf( + '
(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)', 'edd-novalnet' ), + 'min' => 999, + 'tooltip_title' => __( 'Minimum order amount for payment guarantee', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Enter the minimum amount (in cents) for the transaction to be processed with payment guarantee. For example, enter 100 which is equal to 1,00. By default, the amount will be 9,99 EUR.', 'edd-novalnet' ), + ), + array( + 'id' => 'novalnet_sepa_force_normal_payment', + 'name' => __( 'Force Non-Guarantee payment', 'edd-novalnet' ), + 'type' => 'select', + 'options' => array( + 'no' => __( 'No', 'edd-novalnet' ), + 'yes' => __( 'Yes', 'edd-novalnet' ), + ), + 'std' => 'yes', + 'tooltip_title' => __( 'Force Non-Guarantee payment', 'edd-novalnet' ), + 'tooltip_desc' => __( 'Even if payment guarantee is enabled, payments will still be processed as non-guarantee payments if the payment guarantee requirements are not met. Review the requirements under \'Enable Payment Guarantee\' in the Installation Guide. ', 'edd-novalnet' ), + ), + ); + + $novalnet_sepa = apply_filters( 'edd_novalnet_sepa_settings', $novalnet_sepa ); + $gateway_settings['novalnet_sepa'] = $novalnet_sepa; + return $gateway_settings; + } +} +new Novalnet_SEPA(); + diff --git a/includes/novalnet-functions.php b/includes/novalnet-functions.php new file mode 100755 index 0000000..7363322 --- /dev/null +++ b/includes/novalnet-functions.php @@ -0,0 +1,1816 @@ +session->get( $item->purchase_data['gateway'] . '_subscription' ); + + if ( ! empty( $params ) && novalnet_check_string( $item->purchase_data['gateway'] ) ) { + + $novalnet_cc_do_redirect = EDD()->session->get( 'novalnet_cc_do_redirect' ); + + EDD()->session->set( $item->purchase_data['gateway'] . '_subscription', null ); + EDD()->session->set( 'novalnet_cc_do_redirect' , null ); + if ( ! empty( $args['parent_payment_id'] ) ) { + $params['order_no'] = $args['parent_payment_id']; + } + + if ( ( 'novalnet_paypal' === $item->purchase_data['gateway'] ) || ('novalnet_cc' === $item->purchase_data['gateway'] && 1 == $novalnet_cc_do_redirect ) ) { + EDD()->session->set( 'novalnet_redirect_params', $params ); + } else { + $parsed_response = novalnet_submit_request( $params ); + EDD()->session->set( 'novalnet_response', $parsed_response ); + } + EDD()->session->set( 'novalnet_subscription_process', true ); + } + if ( 'pending' === $args['status'] ) { + $args['status'] = 'active'; + } + + return $args; +} + +/** + * Actions to initialize Vendor script + * + * @since 1.1.1 + * @param array $accepted Get request and form $data. + * @return array + */ +function novalnet_add_api_mode( $accepted ) { + $accepted [] = 'novalnet_callback'; + $accepted [] = 'novalnet_redirect_response'; + $accepted [] = 'novalnet_update_payment_method'; + return $accepted; +} + +/** + * Actions to settings configuration in admin plugin + * + * @since 1.0.1 + * @param string $links Gets to Novalnet admin portal. + * @return string $links Login to see merchant credentials. + */ +function novalnet_action_links( $links ) { + + // Add configuration link in plugin page. + $links [] = '' . __( 'Configuration', 'edd-novalnet' ) . ''; + return $links; +} + +/** + * Actions to initialize api handler + * + * @since 1.0.1 + * @param array $data Get request and form $data. + */ +function novalnet_handle_api( $data ) { + switch ( $data['edd-api'] ) { + case 'products': + case 'novalnet_redirect_response': + case 'novalnet_update_payment_method': + if ( in_array( $data['edd-api'], array( 'novalnet_redirect_response', 'products' ), true) ) { + $order_data = EDD()->session->get( 'edd_purchase' ); + $return_url = edd_get_checkout_uri(); + } elseif ( 'novalnet_update_payment_method' === $data['edd-api'] ) { + $order_data = EDD()->session->get( 'novalnet_update_payment_method' ); + $return_url = $data['return_url']; + } + if ( empty( $order_data ) ) { + header_remove( 'Set-Cookie' ); + $redirect = array(); + $redirect['edd-api'] = $data['edd-api']; + $redirect = array_merge( $redirect, $data ); + $redirect_url = add_query_arg( $redirect, $return_url ); + header( 'Location: ' . $redirect_url ); + die(); + } else { + if ( in_array( $data['edd-api'], array( 'novalnet_redirect_response', 'products' ), true) ) { + novalnet_get_redirect_response(); + } elseif ( 'novalnet_update_payment_method' === $data['edd-api'] ) { + novalnet_get_redirect_response( true ); + } + } + break; + case 'novalnet_callback': + // Include the callback script files. + include_once NOVALNET_PLUGIN_DIR . '/includes/api/class-novalnet-callback-api.php'; + // Initiate the callback function. + novalnet_callback_api_process(); + break; + } +} + +/** + * Update status message + * + * @since 1.1.3 + * @param array $request Get all post params. + */ +function get_status_desc( $request ) { + if ( ! empty( $request['status_text'] ) ) { + return $request['status_text']; + } elseif ( ! empty( $request['status_desc'] ) ) { + return $request['status_desc']; + } elseif ( ! empty( $request['status_message'] ) ) { + return $request['status_message']; + } else { + return __( 'Payment was not successful. An error occurred.', 'edd-novalnet' ); + } +} + +/** + * Actions to show the barzahlen overlay + * + * @since 1.1.3 + * @param object $post Get the order object. + */ +function novalnet_barzahlen_scripts( $post ) { + global $wpdb; + if ( 'novalnet_cashpayment' === get_post_meta( $post->ID, '_edd_payment_gateway', true ) ) { + $transaction_id = get_post_meta( $post->ID, '_nn_order_tid', true ); + $result = $wpdb->get_row( $wpdb->prepare( "SELECT test_mode FROM {$wpdb->prefix}novalnet_transaction_detail WHERE tid=%s ORDER BY id DESC", $transaction_id ), ARRAY_A ); + $url = ( '1' === $result['test_mode'] ) ? 'https://cdn.barzahlen.de/js/v2/checkout-sandbox.js' : 'https://cdn.barzahlen.de/js/v2/checkout.js'; + $token = EDD()->session->get( 'cp_checkout_token' ); + echo "" . esc_html( __( 'Pay now with Barzahlen/viacash', 'edd-novalnet' ) ) . ''; + } +} + +/** + * Actions to perform once on Plug-in deactivation + * + * @since 1.0.1 + */ +function novalnet_deactivate_plugin() { + + global $wpdb; + $config_settings = get_option( 'edd_settings' ); + $config_settings['gateways'] = isset( $config_settings['gateways'] ) ? $config_settings['gateways'] : array(); + $config_tmp = array_merge( $config_settings, $config_settings['gateways'] ); + + foreach ( $config_tmp as $key => $value ) { + if ( novalnet_check_string( $key ) ) { + if ( isset( $config_settings[ $key ] ) ) { + unset( $config_settings[ $key ] ); + } else { + unset( $config_settings['gateways'][ $key ] ); + } + } + } + $wpdb->query( "delete from {$wpdb->options} where option_name like '%novalnet%'" ); // db call ok; no-cache ok. + update_option( 'edd_settings', $config_settings ); +} + +/** + * When reloading the page after install. + * + * @since 1.1.1 + */ +function novalnet_update_action() { + + $current_db_version = get_option( 'novalnet_db_version' ); + $show_update_page = get_option( 'novalnet_version_update' ); + if ( ! empty( $current_db_version ) && version_compare( $current_db_version, NOVALNET_VERSION, '!=' ) ) { + // Redirect to updated information page. + novalnet_activation_process(); + } elseif ( $show_update_page ) { + delete_option( 'novalnet_version_update' ); + wp_safe_redirect( admin_url( 'edit.php?post_type=download&page=edd-settings&tab=gateways§ion=novalnet_global_config' ) ); + exit(); + } +} + +/** + * To get remote/server Ip address + * + * @param string $type get the ipaddress type. + * @return mixed + */ +function novalnet_server_addr( $type = 'REMOTE_ADDR' ) { + // Check to determine the IP address type. + if ( 'SERVER_ADDR' === $type ) { + if ( empty( $_SERVER['SERVER_ADDR'] ) ) { + // Handled for IIS server. + $ip_address = gethostbyname( $_SERVER['SERVER_NAME'] ); + } else { + $ip_address = $_SERVER['SERVER_ADDR']; + } + } else { + // For remote address. + $ip_address = get_remote_address(); + return $ip_address; + } + return $ip_address; +} + +/** + * To get remote IP address + * + * @return mixed + */ +function get_remote_address() { + foreach ( array( 'HTTP_X_FORWARDED_HOST', 'HTTP_CLIENT_IP', 'HTTP_X_REAL_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR' ) as $key ) { + if ( array_key_exists( $key, $_SERVER ) === true ) { + foreach ( explode( ',', $_SERVER[ $key ] ) as $ip ) { + return trim( $ip ); + } + } + } +} + +/** + * Checks for the given string in given text + * + * @since 1.1.0 + * @param string $string Check given string contains name as novalnet. + * @param string $data Get payment method name to avoid other payment's. + * @return boolean + */ +function novalnet_check_string( $string, $data = 'novalnet' ) { + return ( false !== strpos( $string, $data ) ); +} + +/** + * Throws admin side empty value in global configuration of Novalnet payment + * + * @since 1.0.1 + */ +function novalnet_admin_global_config_error() { + global $edd_options; + + // Check for Global configuration. + if ( empty( $edd_options['novalnet_merchant_id'] ) || ! novalnet_digits_check( $edd_options['novalnet_merchant_id'] ) || empty( $edd_options['novalnet_product_id'] ) || ! novalnet_digits_check( $edd_options['novalnet_product_id'] ) || empty( $edd_options['novalnet_tariff_id'] ) || ! novalnet_digits_check( $edd_options['novalnet_tariff_id'] ) || empty( $edd_options['novalnet_auth_code'] ) || empty( $edd_options['novalnet_access_key'] ) || ( isset( $edd_options['novalnet_subs_enable_option'] ) && ( empty( $edd_options['novalnet_subs_tariff_id'] ) || ! novalnet_digits_check( $edd_options['novalnet_subs_tariff_id'] ) ) ) ) { + echo '
' . esc_html( __( 'Please fill in all the mandatory fields', 'edd-novalnet' ) ) . '
The subscription has been already stopped or cancelled.
(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)" +msgstr "" +"(in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)" + +#: includes/gateways/class-novalnet-cc.php:337 +#: includes/gateways/class-novalnet-paypal.php:225 +#: includes/gateways/class-novalnet-sepa.php:298 +msgid "" +"In case the order amount exceeds the mentioned limit, the transaction will " +"be set on-hold till your confirmation of the transaction. You can leave the " +"field empty if you wish to process all the transactions as on-hold." +msgstr "" +"Übersteigt der Bestellbetrag das genannte Limit, wird die Transaktion, bis " +"zu ihrer Bestätigung durch Sie, auf on hold gesetzt. Sie können das Feld " +"leer lassen, wenn Sie möchten, dass alle Transaktionen als on hold behandelt " +"werden." + +#: includes/gateways/class-novalnet-cc.php:341 +#: includes/gateways/class-novalnet-cc.php:343 +msgid "Enforce 3D secure payment outside EU" +msgstr "3D-Secure-Zahlungen außerhalb der EU erzwingen" + +#: includes/gateways/class-novalnet-cc.php:344 +msgid "" +"By enabling this option, all payments from cards issued outside the EU will " +"be authenticated via 3DS 2.0 SCA" +msgstr "" +"Wenn Sie diese Option aktivieren, werden alle Zahlungen mit Karten, die " +"außerhalb der EU ausgegeben wurden, mit der starken Kundenauthentifizierung " +"(Strong Customer Authentication, SCA) von 3D-Secure 2.0 authentifiziert" + +#: includes/gateways/class-novalnet-cc.php:368 +msgid "Custom CSS settings" +msgstr "Angepasste CSS-Einstellungen" + +#: includes/gateways/class-novalnet-cc.php:373 +msgid "CSS settings for iframe form" +msgstr "CSS-Einstellungen für den iFrameformular" + +#: includes/gateways/class-novalnet-cc.php:379 +msgid "Label" +msgstr "Beschriftung" + +#: includes/gateways/class-novalnet-cc.php:380 +#: includes/gateways/class-novalnet-cc.php:388 +msgid "E.g: color:#999999; background-color:#FFFFFF;" +msgstr "z.B: color:#999999; background-color:#FFFFFF;" + +#: includes/gateways/class-novalnet-cc.php:387 +msgid "Input" +msgstr "Eingabe" + +#: includes/gateways/class-novalnet-cc.php:395 +msgid "CSS Text" +msgstr "Text für das CSS" + +#: includes/gateways/class-novalnet-cc.php:396 +msgid "E.g: #idselector{color:#999999;}.classSelector{color:#000000}" +msgstr "z.B: #idselector{color:#999999;}.classSelector{color:#000000}" + +#: includes/gateways/class-novalnet-eps.php:66 +#: includes/gateways/class-novalnet-eps.php:81 +#: includes/gateways/class-novalnet-eps.php:179 +msgid "Novalnet eps" +msgstr "Novalnet eps" + +#: includes/gateways/class-novalnet-eps.php:82 +#: includes/gateways/class-novalnet-eps.php:101 +msgid "eps" +msgstr "eps" + +#: includes/gateways/class-novalnet-eps.php:113 +msgid "" +"You will be redirected to eps. Please don’t close or refresh the browser " +"until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-giropay.php:67 +#: includes/gateways/class-novalnet-giropay.php:83 +#: includes/gateways/class-novalnet-giropay.php:179 +msgid "Novalnet giropay" +msgstr "Novalnet giropay" + +#: includes/gateways/class-novalnet-giropay.php:84 +#: includes/gateways/class-novalnet-giropay.php:102 +msgid "giropay" +msgstr "giropay" + +#: includes/gateways/class-novalnet-giropay.php:114 +msgid "" +"You will be redirected to giropay. Please don’t close or refresh the browser " +"until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-ideal.php:67 +#: includes/gateways/class-novalnet-ideal.php:82 +#: includes/gateways/class-novalnet-ideal.php:179 +msgid "Novalnet iDEAL" +msgstr "Novalnet iDEAL" + +#: includes/gateways/class-novalnet-ideal.php:83 +#: includes/gateways/class-novalnet-ideal.php:100 +msgid "iDEAL" +msgstr "iDEAL" + +#: includes/gateways/class-novalnet-ideal.php:112 +msgid "" +"You will be redirected to iDEAL. Please don’t close or refresh the browser " +"until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-instantbank.php:67 +#: includes/gateways/class-novalnet-instantbank.php:82 +#: includes/gateways/class-novalnet-instantbank.php:178 +msgid "Novalnet Sofort" +msgstr "Novalnet Sofortüberweisung" + +#: includes/gateways/class-novalnet-instantbank.php:83 +#: includes/gateways/class-novalnet-instantbank.php:100 +msgid "Sofort" +msgstr "Sofortüberweisung" + +#: includes/gateways/class-novalnet-instantbank.php:112 +msgid "" +"You will be redirected to Sofort. Please don’t close or refresh the browser " +"until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-invoice.php:98 +#: includes/gateways/class-novalnet-invoice.php:121 +msgid "Invoice" +msgstr "Kauf auf Rechnung" + +#: includes/gateways/class-novalnet-invoice.php:156 +#: includes/gateways/class-novalnet-sepa.php:216 +#, php-format +msgid "" +"The payment cannot be processed, because the basic requirements for the " +"payment guarantee are not met ( %s ) " +msgstr "" +"Die Zahlung kann nicht ausgeführt werden, weil die Voraussetzungen für die " +"Zahlungsgarantie nicht erfüllt sind ( %s ) " + +#: includes/gateways/class-novalnet-invoice.php:245 +#: includes/gateways/class-novalnet-invoice.php:249 +#: includes/gateways/class-novalnet-prepayment.php:206 +#: includes/gateways/class-novalnet-prepayment.php:211 +#: includes/gateways/class-novalnet-sepa.php:269 +#: includes/gateways/class-novalnet-sepa.php:275 +msgid "Payment due date (in days)" +msgstr "Fälligkeitsdatum (in Tagen)" + +#: includes/gateways/class-novalnet-invoice.php:250 +#: includes/gateways/class-novalnet-prepayment.php:212 +msgid "" +"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. " +msgstr "" +"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. " + +#: includes/gateways/class-novalnet-invoice.php:272 +msgid "" +"When the order amount exceeds the mentioned limit, the transaction will be " +"set on-hold till you confirm it. You can leave the field empty if you wish " +"to process all transactions as on-hold transactions. " +msgstr "" +"Übersteigt der Bestellbetrag das genannte Limit, wird die Transaktion, bis " +"zu ihrer Bestätigung durch Sie, auf on hold gesetzt. Sie können das Feld " +"leer lassen, wenn Sie möchten, dass alle Transaktionen als on hold behandelt " +"werden. " + +#: includes/gateways/class-novalnet-invoice.php:303 +#: includes/gateways/class-novalnet-sepa.php:318 +msgid "Payment guarantee configuration" +msgstr "Einstellungen für die Zahlungsgarantie" + +#: includes/gateways/class-novalnet-invoice.php:317 +#: includes/gateways/class-novalnet-sepa.php:332 +msgid "Payment guarantee requirements: " +msgstr "Voraussetzungen für die Zahlungsgarantie: " + +#: includes/gateways/class-novalnet-invoice.php:318 +#: includes/gateways/class-novalnet-sepa.php:333 +msgid "Allowed countries: DE, AT, CH" +msgstr "Zugelassene Staaten: DE, AT, CH" + +#: includes/gateways/class-novalnet-invoice.php:319 +#: includes/gateways/class-novalnet-sepa.php:334 +msgid "Allowed currency: EUR" +msgstr "Zugelassene Währung: EUR" + +#: includes/gateways/class-novalnet-invoice.php:320 +#: includes/gateways/class-novalnet-sepa.php:335 +msgid "Minimum order amount: 9,99 EUR or more" +msgstr "Mindestbetrag der Bestellung: 9,99 EUR" + +#: includes/gateways/class-novalnet-invoice.php:321 +#: includes/gateways/class-novalnet-sepa.php:336 +msgid "Age limit: 18 years or more" +msgstr "Mindestalter: 18 Jahre" + +#: includes/gateways/class-novalnet-invoice.php:322 +#: includes/gateways/class-novalnet-sepa.php:337 +msgid "The billing address must be the same as the shipping address" +msgstr "Rechnungsadresse und Lieferadresse müssen übereinstimmen" + +#: includes/gateways/class-novalnet-invoice.php:328 +#: includes/gateways/class-novalnet-sepa.php:344 +msgid "Enable payment guarantee" +msgstr "Zahlungsgarantie aktivieren" + +#: includes/gateways/class-novalnet-invoice.php:333 +#: includes/gateways/class-novalnet-invoice.php:337 +#: includes/gateways/class-novalnet-paypal.php:229 +#: includes/gateways/class-novalnet-paypal.php:233 +#: includes/gateways/class-novalnet-przelewy24.php:196 +#: includes/gateways/class-novalnet-przelewy24.php:200 +#: includes/gateways/class-novalnet-sepa.php:349 +#: includes/gateways/class-novalnet-sepa.php:353 +msgid "Payment status for the pending payment" +msgstr "Status für offene Zahlungen" + +#: includes/gateways/class-novalnet-invoice.php:338 +#: includes/gateways/class-novalnet-paypal.php:234 +#: includes/gateways/class-novalnet-przelewy24.php:201 +#: includes/gateways/class-novalnet-sepa.php:354 +msgid "Status to be used for pending transactions." +msgstr "Status, der verwendet wird, wenn die Zahlung noch offen ist." + +#: includes/gateways/class-novalnet-invoice.php:342 +#: includes/gateways/class-novalnet-invoice.php:345 +#: includes/gateways/class-novalnet-sepa.php:358 +#: includes/gateways/class-novalnet-sepa.php:362 +msgid "Minimum order amount for payment guarantee" +msgstr "Mindestbestellbetrag für Zahlungsgarantie" + +#: includes/gateways/class-novalnet-invoice.php:346 +#: includes/gateways/class-novalnet-sepa.php:363 +msgid "" +"Enter the minimum amount (in cents) for the transaction to be processed with " +"payment guarantee. For example, enter 100 which is equal to 1,00. By " +"default, the amount will be 9,99 EUR." +msgstr "" +"Geben Sie den Mindestbetrag (in Cent) für die zu bearbeitende Transaktion " +"mit Zahlungsgarantie ein. Geben Sie z.B. 100 ein, was 1,00 entspricht. Der " +"Standbetrag ist 9,99 EUR." + +#: includes/gateways/class-novalnet-invoice.php:350 +#: includes/gateways/class-novalnet-invoice.php:357 +#: includes/gateways/class-novalnet-sepa.php:367 +#: includes/gateways/class-novalnet-sepa.php:374 +msgid "Force Non-Guarantee payment" +msgstr "Zahlung ohne Zahlungsgarantie erzwingen" + +#: includes/gateways/class-novalnet-invoice.php:358 +#: includes/gateways/class-novalnet-sepa.php:375 +msgid "" +"Even if payment guarantee is enabled, payments will still be processed as " +"non-guarantee payments if the payment guarantee requirements are not met. " +"Review the requirements under 'Enable Payment Guarantee' in the Installation " +"Guide. " +msgstr "" +"Falls die Zahlungsgarantie zwar aktiviert ist, jedoch die Voraussetzungen " +"für Zahlungsgarantie nicht erfüllt sind, wird die Zahlung ohne " +"Zahlungsgarantie verarbeitet. Die Voraussetzungen finden Sie in der " +"Installationsanleitung unter \"Zahlungsgarantie aktivieren\". " + +#: includes/gateways/class-novalnet-paypal.php:84 +#: includes/gateways/class-novalnet-paypal.php:102 +msgid "PayPal" +msgstr "PayPal" + +#: includes/gateways/class-novalnet-paypal.php:114 +msgid "" +"You will be redirected to PayPal. Please don’t close or refresh the browser " +"until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-paypal.php:194 +#, php-format +msgid "" +"To accept PayPal transactions, configure your PayPal API info in the Novalnet Admin Portal: > PROJECT" +"strong> > Choose your project > Payment Methods" +"strong> > Paypal > Configure." +msgstr "" +"Um PayPal-Transaktionen zu akzeptieren, konfigurieren Sie Ihre PayPal-API-" +"Informationen im Novalnet Admin-Portal: " +"PROJEKT > Wählen Sie Ihr Projekt > " +"Projektübersicht > Zahlungsmethoden > " +"PayPal > Konfigurieren." + +#: includes/gateways/class-novalnet-prepayment.php:82 +#: includes/gateways/class-novalnet-prepayment.php:100 +msgid "Prepayment" +msgstr "Vorkasse" + +#: includes/gateways/class-novalnet-prepayment.php:112 +#: templates/invoice-template.php:32 +msgid "" +"You will receive an e-mail with the Novalnet account details to complete the " +"payment." +msgstr "" +"Sie erhalten eine E-Mail mit den Bankdaten von Novalnet, um die Zahlung " +"abzuschließen." + +#: includes/gateways/class-novalnet-przelewy24.php:67 +#: includes/gateways/class-novalnet-przelewy24.php:83 +#: includes/gateways/class-novalnet-przelewy24.php:183 +msgid "Novalnet Przelewy24" +msgstr "Novalnet Przelewy24" + +#: includes/gateways/class-novalnet-przelewy24.php:84 +#: includes/gateways/class-novalnet-przelewy24.php:102 +msgid "Przelewy24" +msgstr "Przelewy24" + +#: includes/gateways/class-novalnet-przelewy24.php:114 +msgid "" +"You will be redirected to Przelewy24. Please don’t close or refresh the " +"browser until the payment is completed" +msgstr "" +"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" + +#: includes/gateways/class-novalnet-sepa.php:102 +#: includes/gateways/class-novalnet-sepa.php:126 +msgid "Direct Debit SEPA" +msgstr "Lastschrift SEPA" + +#: includes/gateways/class-novalnet-sepa.php:276 +msgid "" +"Number of days after which the payment is debited (must be between 2 and 14 " +"days)." +msgstr "" +"Geben Sie die Anzahl der Tage ein, nach denen der Zahlungsbetrag eingezogen " +"werden soll (muss zwischen 2 und 14 Tagen liegen)." + +#: includes/novalnet-functions.php:135 +msgid "Configuration" +msgstr "Konfiguration" + +#: includes/novalnet-functions.php:196 +msgid "Payment was not successful. An error occurred." +msgstr "Die Zahlung war nicht erfolgreich. Ein Fehler trat auf." + +#: includes/novalnet-functions.php:213 +msgid "Pay now with Barzahlen/viacash" +msgstr "Bezahlen mit Barzahlen/viacash" + +#: includes/novalnet-functions.php:365 +msgid "The amount is invalid" +msgstr "Ungültiger Betrag" + +#: includes/novalnet-functions.php:376 +msgid "Multiple subscription can not be purchased at the same time " +msgstr "Mehrere Abonnementzahlungen können nicht gleichzeitig bezahlt werden " + +#: includes/novalnet-functions.php:586 +msgid "Customer name/email fields are not valid" +msgstr "Ungültige Werte für die Felder Kundenname-/email" + +#: includes/novalnet-functions.php:639 +msgid "You are now redirected automatically" +msgstr "Sie werden jetzt automatisch umgeleitet" + +#: includes/novalnet-functions.php:639 +msgid "Please wait..." +msgstr "Warten Sie bitte …" + +#: includes/novalnet-functions.php:733 +#, php-format +msgid "" +"Successfully updated the payment and customer billing details for upcoming " +"subscriptions on date: %s" +msgstr "" +"Die Zahlungs- und Rechnungsdaten für zukünftige Abonnement-Abbuchungen " +"wurden erfolgreich aktualisiert: %s" + +#: includes/novalnet-functions.php:930 includes/novalnet-functions.php:987 +msgid "While redirecting some data has been changed. The hash check failed" +msgstr "" +"Während der Umleitung wurden einige Daten geändert. Die Überprüfung des " +"Hashes schlug fehl" + +#: includes/novalnet-functions.php:939 +#, php-format +msgid "Recurring change payment method has been failed due to %s" +msgstr "Abonnement Annullierung wurde aufgrund nicht bestanden: %s" + +#: includes/novalnet-functions.php:1019 +msgid "Product is costly" +msgstr "Angebot zu teuer" + +#: includes/novalnet-functions.php:1020 +msgid "Cheating" +msgstr "Betrug" + +#: includes/novalnet-functions.php:1021 +msgid "Partner interfered" +msgstr "(Ehe-)Partner hat Einspruch eingelegt" + +#: includes/novalnet-functions.php:1022 +msgid "Financial problem" +msgstr "Finanzielle Schwierigkeiten" + +#: includes/novalnet-functions.php:1023 +msgid "Content does not match my likes" +msgstr "Inhalt entsprach nicht meinen Vorstellungen" + +#: includes/novalnet-functions.php:1024 +msgid "Content is not enough" +msgstr "Inhalte nicht ausreichend" + +#: includes/novalnet-functions.php:1025 +msgid "Interested only for a trial" +msgstr "Nur an Probezugang interessiert" + +#: includes/novalnet-functions.php:1026 +msgid "Page is very slow" +msgstr "Seite zu langsam" + +#: includes/novalnet-functions.php:1027 +msgid "Satisfied customer" +msgstr "Zufriedener Kunde" + +#: includes/novalnet-functions.php:1028 +msgid "Logging in problems" +msgstr "Zugangsprobleme" + +#: includes/novalnet-functions.php:1444 +msgid "" +"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." +msgstr "" +"Ihre Bestellung wird überprüft. Nach der Bestätigung senden wir Ihnen unsere " +"Bankverbindung, an die Sie bitte den Gesamtbetrag der Bestellung überweisen. " +"Bitte beachten Sie, dass dies bis zu 24 Stunden dauern kann." + +#: includes/novalnet-functions.php:1446 +msgid "Please transfer the amount to the below mentioned account." +msgstr "Bitte überweisen Sie den Betrag auf das unten stehende Konto." + +#: includes/novalnet-functions.php:1449 +msgid "Due date: " +msgstr "Fälligkeitsdatum: " + +#: includes/novalnet-functions.php:1451 +msgid "Account holder: " +msgstr "Kontoinhaber: " + +#: includes/novalnet-functions.php:1459 +msgid "Amount: " +msgstr "Betrag: " + +#: includes/novalnet-functions.php:1462 +msgid "" +"Please use the following payment reference for your money transfer, as only " +"through this way your payment is matched and assigned to the order:" +msgstr "" +"Bitte verwenden Sie nur den unten angegebenen Verwendungszweck für die " +"Überweisung, da nur so Ihr Geldeingang zugeordnet werden kann:" + +#: includes/novalnet-functions.php:1470 +#, php-format +msgid "Payment Reference %s: " +msgstr "Verwendungszweck %s: " + +#: includes/novalnet-functions.php:1492 +msgid "Slip expiry date" +msgstr "Verfallsdatum des Zahlscheins" + +#: includes/novalnet-functions.php:1495 +msgid "Store(s) near you" +msgstr "Barzahlen-Partnerfiliale in Ihrer Nähe" + +#: includes/novalnet-functions.php:1681 +msgid "This is processed as a guarantee payment" +msgstr "Diese Transaktion wird mit Zahlungsgarantie verarbeitet" + +#: includes/novalnet-functions.php:1683 +#, php-format +msgid "Novalnet transaction ID: %s" +msgstr "Novalnet Transaktions-ID: %s" + +#: includes/novalnet-functions.php:1684 +msgid "Test order" +msgstr "Testbestellung" + +#: includes/novalnet-functions.php:1686 +msgid "" +"Your order is under verification and we will soon update you with the order " +"status. Please note that this may take upto 24 hours." +msgstr "" +"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." + +#: includes/novalnet-functions.php:1733 +msgid "Only Germany, Austria or Switzerland are allowed" +msgstr "Als Land ist nur Deutschland, Österreich oder Schweiz erlaubt" + +#: includes/novalnet-functions.php:1736 +msgid "Only EUR currency allowed" +msgstr "Als Währung ist nur EUR erlaubt" + +#: includes/novalnet-functions.php:1740 +#, php-format +msgid "Minimum order amount must be %s" +msgstr "Der Mindestbestellwert beträgt %s" + +#: includes/novalnet-functions.php:1773 +msgid "Please enter your date of birth" +msgstr "Geben Sie bitte Ihr Geburtsdatum ein" + +#: includes/novalnet-functions.php:1775 +msgid "The date format is invalid" +msgstr "Ungültiges Datumsformat" + +#: includes/novalnet-functions.php:1777 +msgid "You need to be at least 18 years old" +msgstr "Sie müssen mindestens 18 Jahre alt sein" + +#: templates/invoice-template.php:67 templates/sepa-template.php:67 +#, php-format +msgid "" +"The payment cannot be processed, because the basic requirements for the " +"payment guarantee are not met %s " +msgstr "" +"Die Zahlung kann nicht ausgeführt werden, weil die Voraussetzungen für die " +"Zahlungsgarantie nicht erfüllt sind %s " + +#: templates/invoice-template.php:79 templates/sepa-template.php:82 +msgid "Please enable the Javascript in your browser to load the payment form" +msgstr "" +"Aktivieren Sie bitte JavaScript in Ihrem Browser, um die Zahlung fortzusetzen" + +#: templates/invoice-template.php:87 templates/sepa-template.php:106 +msgid "Your date of birth" +msgstr "Ihr Geburtsdatum" + +#: templates/invoice-template.php:91 templates/sepa-template.php:110 +msgid "DD" +msgstr "TT" + +#: templates/invoice-template.php:92 templates/sepa-template.php:111 +msgid "MM" +msgstr "MM" + +#: templates/invoice-template.php:93 templates/sepa-template.php:112 +msgid "YYYY" +msgstr "JJJJ" + +#: templates/sepa-template.php:32 +msgid "The amount will be debited from your account by Novalnet" +msgstr "Der Betrag wird durch Novalnet von Ihrem Konto abgebucht" + +#: templates/sepa-template.php:89 templates/sepa-template.php:92 +msgid "Account holder" +msgstr "Kontoinhaber" + +#: templates/sepa-template.php:96 +msgid "IBAN " +msgstr "IBAN " + +#: templates/sepa-template.php:99 +msgid "IBAN" +msgstr "IBAN" + +#: templates/sepa-template.php:120 +msgid "" +"I hereby grant the mandate for the SEPA direct debit (electronic " +"transmission) and confirm that the given bank details are correct!" +msgstr "" +"Ich erteile hiermit das SEPA-Lastschriftmandat (elektronische Übermittlung) " +"und bestätige, dass die Bankverbindung korrekt ist!" + +#: templates/sepa-template.php:123 +msgid "" +"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." +msgstr "" +"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." + +#: templates/sepa-template.php:126 +msgid "Creditor identifier: " +msgstr "Gläubiger-Identifikationsnummer: " + +#: templates/sepa-template.php:128 +msgid "Note: " +msgstr "Hinweis: " + +#: templates/sepa-template.php:128 +msgid "" +"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." +msgstr "" +"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." + +#~ msgid "Novalnet payment plugin - Easy Digital Downloads" +#~ msgstr "Novalnet-Zahlungsplugin - Easy Digital Downloads" + +#~ msgid "" +#~ "PCI compliant payment solution, covering a full scope of payment services " +#~ "and seamless integration for easy adaptability" +#~ msgstr "" +#~ "PCI-konforme Zahlungsabwicklung mit einer Vielzahl an Payment-Services " +#~ "und nahtloser Integration für eine einfache Anbindung" + +#~ msgid "" +#~ "Novalnet Callback Script executed successfully for the TID: %1$s with " +#~ "amount %2$s on %3$s." +#~ msgstr "" +#~ "Novalnet-Callback-Skript erfolgreich ausgeführt für die TID: %s mit dem " +#~ "Betrag am %s um %s Uhr." + +#~ msgid "" +#~ "Plug-in to process payments in Easy Digital Downloads through Novalnet " +#~ "Gateway" +#~ msgstr "" +#~ "Plugin um Zahlungen in Easy Digital Downloads über die Novalnet-" +#~ "Schnittstelle abzuwickeln" + +#~ msgid "" +#~ "Novalnet callback script received. Subscription has been stopped for the " +#~ "TID: %1$s on %2$s. Subscription has been canceled due to: %3$s" +#~ msgstr "" +#~ "Nachricht vom Novalnet-Callback-Skript erhalten: Das Abonnement wurde für " +#~ "die TID: %s am %s eingestellt. Das Abonnement wurde gekündigt wegen: %s" + +#~ msgid "" +#~ "Novalnet Callback Script executed successfully for the TID: %1$s with " +#~ "amount %2$s on %3$s. Please refer PAID transaction in our Novalnet Admin " +#~ "Portal with the TID: %4$s. %5$sPlease verify received amount and TID " +#~ "details, and update the order status accordingly. " +#~ msgstr "" +#~ "Novalnet-Callback-Skript erfolgreich ausgeführt für die TID: %1$s mit dem " +#~ "Betrag %2$s am , um %3$s Uhr. Bitte suchen Sie nach der bezahlten " +#~ "Transaktion in unserer Novalnet-Händleradministration mit der TID: %4$s. " +#~ "%5$s Please verify received amount and TID details, and update the order " +#~ "status accordingly. " + +#~ msgid "The amount will be debited from your credit/debit card" +#~ msgstr "Der Betrag wird Ihrer Kredit-/Debitkarte belastet" diff --git a/languages/edd-novalnet.mo b/languages/edd-novalnet.mo new file mode 100755 index 0000000..2365418 Binary files /dev/null and b/languages/edd-novalnet.mo differ diff --git a/languages/edd-novalnet.pot b/languages/edd-novalnet.pot new file mode 100755 index 0000000..56a578e --- /dev/null +++ b/languages/edd-novalnet.pot @@ -0,0 +1,1108 @@ +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Novalnet payment plugin - Easy Digital Downloads - 2.1.1\n" +"POT-Creation-Date: 2021-11-26 13:17+0530\n" +"PO-Revision-Date: 2018-05-15 18:15+0530\n" +"Last-Translator: novalnet \n" +"Language-Team: Novalnet \n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.6\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n" +"X-Poedit-Basepath: ..\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-SearchPath-0: .\n" + +#: class-novalnet.php:143 +msgid "Easy Digital Downloads Payment Gateway by Novalnetadd-on requires Easy Digital Downloads plugin. Please install and activate it." +msgstr "" + +#: class-novalnet.php:143 +msgid "Easy Digital Downloads Payment Gateway by Novalnetrequires PHP CURL. You need to activate the CURL function on your server. Please contact your hosting provider." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:74 +#: includes/class-novalnet-subscriptions.php:287 +msgid "--Select--" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:99 +msgid "Novalnet Global Configuration" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:141 +msgid "Novalnet API Configuration" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:141 +#, php-format +msgid "Please read the Installation Guide before you start and login to the Novalnet Admin Portal using your merchant account. To get a merchant account, mail to sales@novalnet.de or call +49 (089) 923068320." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:142 +#: includes/gateways/class-novalnet-cashpayment.php:183 +#: includes/gateways/class-novalnet-cc.php:307 +#: includes/gateways/class-novalnet-eps.php:180 +#: includes/gateways/class-novalnet-giropay.php:180 +#: includes/gateways/class-novalnet-ideal.php:180 +#: includes/gateways/class-novalnet-instantbank.php:179 +#: includes/gateways/class-novalnet-invoice.php:233 +#: includes/gateways/class-novalnet-paypal.php:195 +#: includes/gateways/class-novalnet-prepayment.php:194 +#: includes/gateways/class-novalnet-przelewy24.php:184 +#: includes/gateways/class-novalnet-sepa.php:257 +msgid "Configure the gateway settings" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:147 +#: includes/admin/class-novalnet-global-config.php:151 +msgid "Product activation key" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:152 +msgid "Your product activation key is a unique token for merchant authentication and payment processing." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:154 +#, php-format +msgid "Get your Product activation key from the Novalnet Admin Portal: PROJECT > Choose your project > Shop Parameters > API Signature (Product activation key)" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:158 +msgid "Merchant ID " +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:164 +msgid "Authentication code" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:170 +msgid "Project ID" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:176 +#: includes/admin/class-novalnet-global-config.php:177 +msgid "Select Tariff ID" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:178 +msgid "Select a Tariff ID to match the preferred tariff plan you created at the Novalnet Admin Portal for this project." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:184 +msgid "Payment access key" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:190 +msgid "Client Key" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:196 +#: includes/admin/class-novalnet-global-config.php:197 +msgid "Display payment logo" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:198 +msgid "The payment method logo(s) will be displayed on the checkout page. " +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:201 +#: includes/admin/class-novalnet-global-config.php:239 +#: includes/admin/class-novalnet-global-config.php:282 +#: includes/admin/class-novalnet-global-config.php:294 +#: includes/gateways/class-novalnet-cc.php:347 +#: includes/gateways/class-novalnet-invoice.php:353 +#: includes/gateways/class-novalnet-sepa.php:370 +msgid "No" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:202 +#: includes/admin/class-novalnet-global-config.php:240 +#: includes/admin/class-novalnet-global-config.php:283 +#: includes/admin/class-novalnet-global-config.php:295 +#: includes/gateways/class-novalnet-cc.php:346 +#: includes/gateways/class-novalnet-invoice.php:354 +#: includes/gateways/class-novalnet-sepa.php:371 +msgid "Yes" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:208 +msgid "Order status management for on-hold transactions" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:213 +#: includes/admin/class-novalnet-global-config.php:217 +msgid "On-hold order status" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:218 +msgid "Status to be used for on-hold orders until the transaction is confirmed or canceled." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:222 +#: includes/admin/class-novalnet-global-config.php:226 +msgid "Canceled order status" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:227 +msgid "Status to be used when order is canceled or fully refunded." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:231 +msgid "Dynamic subscription management" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:236 +msgid "Enable subscriptions" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:245 +msgid "Subscription payments" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:253 +#: includes/gateways/class-novalnet-cc.php:128 +#: includes/gateways/class-novalnet-cc.php:144 +#: includes/gateways/class-novalnet-cc.php:306 +msgid "Novalnet Credit/Debit Cards" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:254 +#: includes/gateways/class-novalnet-sepa.php:85 +#: includes/gateways/class-novalnet-sepa.php:101 +#: includes/gateways/class-novalnet-sepa.php:256 +msgid "Novalnet Direct Debit SEPA" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:255 +#: includes/gateways/class-novalnet-invoice.php:81 +#: includes/gateways/class-novalnet-invoice.php:97 +#: includes/gateways/class-novalnet-invoice.php:232 +msgid "Novalnet Invoice" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:256 +#: includes/gateways/class-novalnet-prepayment.php:65 +#: includes/gateways/class-novalnet-prepayment.php:81 +#: includes/gateways/class-novalnet-prepayment.php:193 +msgid "Novalnet Prepayment" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:257 +#: includes/gateways/class-novalnet-paypal.php:67 +#: includes/gateways/class-novalnet-paypal.php:83 +#: includes/gateways/class-novalnet-paypal.php:194 +msgid "Novalnet PayPal" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:264 +#: includes/admin/class-novalnet-global-config.php:265 +msgid "Subscription Tariff ID" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:266 +msgid "Select the preferred Novalnet subscription tariff ID available for your project. For more information, please refer the Installation Guide." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:271 +msgid "Notification / Webhook URL Setup" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:277 +#: includes/admin/class-novalnet-global-config.php:278 +msgid "Allow manual testing of the Notification / Webhook URL" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:279 +msgid "Enable this to test the Novalnet Notification / Webhook URL manually. Disable this before setting your shop live to block unauthorized calls from external parties." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:289 +#: includes/admin/class-novalnet-global-config.php:290 +msgid "Enable e-mail notification" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:291 +msgid "Enable this option to notify the given e-mail address when the Notification / Webhook URL is executed successfully." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:301 +#: includes/admin/class-novalnet-global-config.php:302 +msgid "Send e-mail to" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:303 +msgid "Notification / Webhook URL execution messages will be sent to this e-mail." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:309 +msgid "Notification / Webhook URL" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:319 +#, php-format +msgid "You must add the following webhook endpoint to your Novalnet Admin Portal . This will allow you to receive notifications about the transaction status." +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:349 +#, php-format +msgid "You need to configure your outgoing server IP address ( %s ) at Novalnet. Please configure it in Novalnet Admin Portal or contact technic@novalnet.de" +msgstr "" + +#: includes/admin/class-novalnet-global-config.php:355 +#: includes/novalnet-functions.php:321 includes/novalnet-functions.php:589 +msgid "Please fill in all the mandatory fields" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:309 +#: includes/api/class-novalnet-callback-api.php:702 +#, php-format +msgid "The transaction has been canceled on %1$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:587 +msgid "Next charging date: " +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:590 +#, php-format +msgid "Subscription has been successfully renewed for the TID: %1$s with the amount %2$s on %3$s. The renewal TID is: %4$s" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:644 +#: includes/class-novalnet-subscriptions.php:267 +msgid "The subscription has been already stopped or cancelled" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:678 +#: includes/novalnet-functions.php:1029 +msgid "Other" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:707 +#, php-format +msgid "Subscription has been stopped for the TID: %1$s on %2$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:713 +#, php-format +msgid "Subscription has been canceled due to: %1$s" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:773 +#, php-format +msgid "Subscription has been reactivated for the TID: %1$s on %2$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:820 +#, php-format +msgid "The transaction has been confirmed on %1$s" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:825 +#, php-format +msgid "The transaction status has been changed from pending to on-hold for the TID: %1$s on %2$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:851 +#, php-format +msgid "Transaction updated successfully for the TID: %1$s on %2$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:878 +#, php-format +msgid "The transaction has been canceled due to: %s" +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:913 +#, php-format +msgid "Refund has been initiated for the TID: %1$s with the amount %2$s. New TID: %3$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:916 +#, php-format +msgid "Chargeback executed for return debit of TID:%1$s with the amount %2$s on %3$s. The subsequent TID: %4$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:919 +#, php-format +msgid "Chargeback executed for reversal of TID: %1$s with the amount %2$s on %3$s. The subsequent TID: %4$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:922 +#, php-format +msgid "Chargeback executed successfully for the TID: %1$s amount: %2$s on %3$s. The subsequent TID: %4$s." +msgstr "" + +#: includes/api/class-novalnet-callback-api.php:946 +#: includes/api/class-novalnet-callback-api.php:949 +#: includes/api/class-novalnet-callback-api.php:974 +#, php-format +msgid "Credit has been successfully received for the TID: %1$s with amount %2$s on %3$s . Please refer PAID order details in our Novalnet Admin Portal for the TID: %4$s " +msgstr "" + +#: includes/class-novalnet-subscriptions.php:127 +msgid "Invalid subscription id" +msgstr "" + +#: includes/class-novalnet-subscriptions.php:178 +#: includes/gateways/class-novalnet-sepa.php:210 +msgid "Your account details are invalid" +msgstr "" + +#: includes/class-novalnet-subscriptions.php:266 +msgid "Please select the reason for subscription cancellation" +msgstr "" + +#: includes/class-novalnet-subscriptions.php:291 +msgid "Cancel" +msgstr "" + +#: includes/class-novalnet-subscriptions.php:340 +#, php-format +msgid "Subscription has been canceled due to: %s" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:64 +#: includes/gateways/class-novalnet-cashpayment.php:79 +#: includes/gateways/class-novalnet-cashpayment.php:182 +msgid "Novalnet Barzahlen/viacash" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:80 +msgid "Barzahlen/viacash " +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:98 +msgid "Barzahlen/viacash" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:110 +msgid "On successful checkout, you will receive a payment slip/SMS to pay your online purchase at one of our retail partners (e.g. supermarket)." +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:128 +#: includes/gateways/class-novalnet-cashpayment.php:191 +#: includes/gateways/class-novalnet-cc.php:194 +#: includes/gateways/class-novalnet-cc.php:315 +#: includes/gateways/class-novalnet-eps.php:130 +#: includes/gateways/class-novalnet-eps.php:188 +#: includes/gateways/class-novalnet-giropay.php:131 +#: includes/gateways/class-novalnet-giropay.php:188 +#: includes/gateways/class-novalnet-ideal.php:130 +#: includes/gateways/class-novalnet-ideal.php:188 +#: includes/gateways/class-novalnet-instantbank.php:129 +#: includes/gateways/class-novalnet-instantbank.php:187 +#: includes/gateways/class-novalnet-invoice.php:241 +#: includes/gateways/class-novalnet-paypal.php:132 +#: includes/gateways/class-novalnet-paypal.php:203 +#: includes/gateways/class-novalnet-prepayment.php:130 +#: includes/gateways/class-novalnet-prepayment.php:202 +#: includes/gateways/class-novalnet-przelewy24.php:132 +#: includes/gateways/class-novalnet-przelewy24.php:192 +#: includes/gateways/class-novalnet-sepa.php:265 +#: templates/invoice-template.php:50 templates/sepa-template.php:50 +msgid "The payment will be processed in the test mode therefore amount for this transaction will not be charged" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:188 +#: includes/gateways/class-novalnet-cashpayment.php:190 +#: includes/gateways/class-novalnet-cc.php:312 +#: includes/gateways/class-novalnet-cc.php:314 +#: includes/gateways/class-novalnet-eps.php:185 +#: includes/gateways/class-novalnet-eps.php:187 +#: includes/gateways/class-novalnet-giropay.php:185 +#: includes/gateways/class-novalnet-giropay.php:187 +#: includes/gateways/class-novalnet-ideal.php:185 +#: includes/gateways/class-novalnet-ideal.php:187 +#: includes/gateways/class-novalnet-instantbank.php:184 +#: includes/gateways/class-novalnet-instantbank.php:186 +#: includes/gateways/class-novalnet-invoice.php:238 +#: includes/gateways/class-novalnet-invoice.php:240 +#: includes/gateways/class-novalnet-paypal.php:200 +#: includes/gateways/class-novalnet-paypal.php:202 +#: includes/gateways/class-novalnet-prepayment.php:199 +#: includes/gateways/class-novalnet-prepayment.php:201 +#: includes/gateways/class-novalnet-przelewy24.php:189 +#: includes/gateways/class-novalnet-przelewy24.php:191 +#: includes/gateways/class-novalnet-sepa.php:262 +#: includes/gateways/class-novalnet-sepa.php:264 +msgid "Enable test mode" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:195 +#: includes/gateways/class-novalnet-cashpayment.php:199 +msgid "Slip expiry date (in days)" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:200 +msgid "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. " +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:204 +#: includes/gateways/class-novalnet-cashpayment.php:208 +#: includes/gateways/class-novalnet-cc.php:353 +#: includes/gateways/class-novalnet-cc.php:357 +#: includes/gateways/class-novalnet-eps.php:192 +#: includes/gateways/class-novalnet-eps.php:196 +#: includes/gateways/class-novalnet-giropay.php:192 +#: includes/gateways/class-novalnet-giropay.php:196 +#: includes/gateways/class-novalnet-ideal.php:192 +#: includes/gateways/class-novalnet-ideal.php:196 +#: includes/gateways/class-novalnet-instantbank.php:191 +#: includes/gateways/class-novalnet-instantbank.php:195 +#: includes/gateways/class-novalnet-invoice.php:277 +#: includes/gateways/class-novalnet-invoice.php:281 +#: includes/gateways/class-novalnet-paypal.php:238 +#: includes/gateways/class-novalnet-paypal.php:242 +#: includes/gateways/class-novalnet-prepayment.php:216 +#: includes/gateways/class-novalnet-prepayment.php:220 +#: includes/gateways/class-novalnet-przelewy24.php:205 +#: includes/gateways/class-novalnet-przelewy24.php:209 +#: includes/gateways/class-novalnet-sepa.php:302 +#: includes/gateways/class-novalnet-sepa.php:306 +msgid "Completed order status" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:209 +#: includes/gateways/class-novalnet-cc.php:358 +#: includes/gateways/class-novalnet-eps.php:197 +#: includes/gateways/class-novalnet-giropay.php:197 +#: includes/gateways/class-novalnet-ideal.php:197 +#: includes/gateways/class-novalnet-instantbank.php:196 +#: includes/gateways/class-novalnet-invoice.php:282 +#: includes/gateways/class-novalnet-paypal.php:243 +#: includes/gateways/class-novalnet-prepayment.php:221 +#: includes/gateways/class-novalnet-przelewy24.php:210 +#: includes/gateways/class-novalnet-sepa.php:307 +msgid "Status to be used for successful orders." +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:213 +#: includes/gateways/class-novalnet-cashpayment.php:217 +#: includes/gateways/class-novalnet-invoice.php:286 +#: includes/gateways/class-novalnet-invoice.php:290 +#: includes/gateways/class-novalnet-prepayment.php:225 +#: includes/gateways/class-novalnet-prepayment.php:229 +msgid "Callback / Webhook order status" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:218 +#: includes/gateways/class-novalnet-invoice.php:291 +#: includes/gateways/class-novalnet-prepayment.php:230 +msgid "Status to be used when callback script is executed for payment received by Novalnet." +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:222 +#: includes/gateways/class-novalnet-cc.php:362 +#: includes/gateways/class-novalnet-eps.php:201 +#: includes/gateways/class-novalnet-giropay.php:201 +#: includes/gateways/class-novalnet-ideal.php:201 +#: includes/gateways/class-novalnet-instantbank.php:200 +#: includes/gateways/class-novalnet-invoice.php:295 +#: includes/gateways/class-novalnet-paypal.php:247 +#: includes/gateways/class-novalnet-prepayment.php:234 +#: includes/gateways/class-novalnet-przelewy24.php:214 +#: includes/gateways/class-novalnet-sepa.php:311 +msgid "Notification for the buyer" +msgstr "" + +#: includes/gateways/class-novalnet-cashpayment.php:225 +#: includes/gateways/class-novalnet-cc.php:365 +#: includes/gateways/class-novalnet-eps.php:204 +#: includes/gateways/class-novalnet-giropay.php:204 +#: includes/gateways/class-novalnet-ideal.php:204 +#: includes/gateways/class-novalnet-instantbank.php:203 +#: includes/gateways/class-novalnet-invoice.php:298 +#: includes/gateways/class-novalnet-paypal.php:250 +#: includes/gateways/class-novalnet-prepayment.php:237 +#: includes/gateways/class-novalnet-przelewy24.php:217 +#: includes/gateways/class-novalnet-sepa.php:314 +msgid "The entered text will be displayed at the checkout page" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:83 +msgid "Card holder name" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:84 +msgid "Name on card" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:85 +msgid "Card number" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:86 +msgid "XXXX XXXX XXXX XXXX" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:87 +msgid "Expiry date" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:88 +msgid "CVC/CVV/CID" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:89 +msgid "XXX" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:90 +#: includes/gateways/class-novalnet-cc.php:289 +msgid "Your credit card details are invalid" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:145 +#: includes/gateways/class-novalnet-cc.php:166 +msgid "Credit/Debit Cards" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:178 +msgid "Your credit/debit card will be charged immediately after the order is completed" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:319 +#: includes/gateways/class-novalnet-cc.php:322 +#: includes/gateways/class-novalnet-invoice.php:254 +#: includes/gateways/class-novalnet-invoice.php:257 +#: includes/gateways/class-novalnet-paypal.php:207 +#: includes/gateways/class-novalnet-paypal.php:210 +#: includes/gateways/class-novalnet-sepa.php:280 +#: includes/gateways/class-novalnet-sepa.php:283 +msgid "Payment action" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:323 +#: includes/gateways/class-novalnet-invoice.php:258 +#: includes/gateways/class-novalnet-paypal.php:211 +#: includes/gateways/class-novalnet-sepa.php:284 +msgid "Choose whether or not the payment should be charged immediately. Capture completes the transaction by transferring the funds from buyer account to merchant account. Authorize verifies payment details and reserves funds to capture it later, giving time for the merchant to decide on the order." +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:325 +#: includes/gateways/class-novalnet-invoice.php:260 +#: includes/gateways/class-novalnet-paypal.php:213 +#: includes/gateways/class-novalnet-sepa.php:286 +msgid "Capture" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:326 +#: includes/gateways/class-novalnet-invoice.php:261 +#: includes/gateways/class-novalnet-paypal.php:214 +#: includes/gateways/class-novalnet-sepa.php:287 +msgid "Authorize" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:332 +#: includes/gateways/class-novalnet-cc.php:336 +#: includes/gateways/class-novalnet-invoice.php:267 +#: includes/gateways/class-novalnet-invoice.php:271 +#: includes/gateways/class-novalnet-paypal.php:220 +#: includes/gateways/class-novalnet-paypal.php:224 +#: includes/gateways/class-novalnet-sepa.php:293 +#: includes/gateways/class-novalnet-sepa.php:297 +msgid "Minimum transaction limit for authorization" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:335 +#: includes/gateways/class-novalnet-invoice.php:270 +#: includes/gateways/class-novalnet-paypal.php:223 +#: includes/gateways/class-novalnet-sepa.php:296 +#: includes/gateways/class-novalnet-sepa.php:360 +msgid "(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:337 +#: includes/gateways/class-novalnet-paypal.php:225 +#: includes/gateways/class-novalnet-sepa.php:298 +msgid "In case the order amount exceeds the mentioned limit, the transaction will be set on-hold till your confirmation of the transaction. You can leave the field empty if you wish to process all the transactions as on-hold." +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:341 +#: includes/gateways/class-novalnet-cc.php:343 +msgid "Enforce 3D secure payment outside EU" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:344 +msgid "By enabling this option, all payments from cards issued outside the EU will be authenticated via 3DS 2.0 SCA" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:368 +msgid "Custom CSS settings" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:373 +msgid "CSS settings for iframe form" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:379 +msgid "Label" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:380 +#: includes/gateways/class-novalnet-cc.php:388 +msgid "E.g: color:#999999; background-color:#FFFFFF;" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:387 +msgid "Input" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:395 +msgid "CSS Text" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:396 +msgid "E.g: #idselector{color:#999999;}.classSelector{color:#000000}" +msgstr "" + +#: includes/gateways/class-novalnet-eps.php:66 +#: includes/gateways/class-novalnet-eps.php:81 +#: includes/gateways/class-novalnet-eps.php:179 +msgid "Novalnet eps" +msgstr "" + +#: includes/gateways/class-novalnet-eps.php:82 +#: includes/gateways/class-novalnet-eps.php:101 +msgid "eps" +msgstr "" + +#: includes/gateways/class-novalnet-eps.php:113 +msgid "You will be redirected to eps. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-giropay.php:67 +#: includes/gateways/class-novalnet-giropay.php:83 +#: includes/gateways/class-novalnet-giropay.php:179 +msgid "Novalnet giropay" +msgstr "" + +#: includes/gateways/class-novalnet-giropay.php:84 +#: includes/gateways/class-novalnet-giropay.php:102 +msgid "giropay" +msgstr "" + +#: includes/gateways/class-novalnet-giropay.php:114 +msgid "You will be redirected to giropay. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-ideal.php:67 +#: includes/gateways/class-novalnet-ideal.php:82 +#: includes/gateways/class-novalnet-ideal.php:179 +msgid "Novalnet iDEAL" +msgstr "" + +#: includes/gateways/class-novalnet-ideal.php:83 +#: includes/gateways/class-novalnet-ideal.php:100 +msgid "iDEAL" +msgstr "" + +#: includes/gateways/class-novalnet-ideal.php:112 +msgid "You will be redirected to iDEAL. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-instantbank.php:67 +#: includes/gateways/class-novalnet-instantbank.php:82 +#: includes/gateways/class-novalnet-instantbank.php:178 +msgid "Novalnet Sofort" +msgstr "" + +#: includes/gateways/class-novalnet-instantbank.php:83 +#: includes/gateways/class-novalnet-instantbank.php:100 +msgid "Sofort" +msgstr "" + +#: includes/gateways/class-novalnet-instantbank.php:112 +msgid "You will be redirected to Sofort. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:98 +#: includes/gateways/class-novalnet-invoice.php:121 +msgid "Invoice" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:156 +#: includes/gateways/class-novalnet-sepa.php:216 +#, php-format +msgid "The payment cannot be processed, because the basic requirements for the payment guarantee are not met ( %s ) " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:245 +#: includes/gateways/class-novalnet-invoice.php:249 +#: includes/gateways/class-novalnet-prepayment.php:206 +#: includes/gateways/class-novalnet-prepayment.php:211 +#: includes/gateways/class-novalnet-sepa.php:269 +#: includes/gateways/class-novalnet-sepa.php:275 +msgid "Payment due date (in days)" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:250 +#: includes/gateways/class-novalnet-prepayment.php:212 +msgid "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. " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:272 +msgid "When the order amount exceeds the mentioned limit, the transaction will be set on-hold till you confirm it. You can leave the field empty if you wish to process all transactions as on-hold transactions. " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:303 +#: includes/gateways/class-novalnet-sepa.php:318 +msgid "Payment guarantee configuration" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:317 +#: includes/gateways/class-novalnet-sepa.php:332 +msgid "Payment guarantee requirements: " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:318 +#: includes/gateways/class-novalnet-sepa.php:333 +msgid "Allowed countries: DE, AT, CH" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:319 +#: includes/gateways/class-novalnet-sepa.php:334 +msgid "Allowed currency: EUR" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:320 +#: includes/gateways/class-novalnet-sepa.php:335 +msgid "Minimum order amount: 9,99 EUR or more" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:321 +#: includes/gateways/class-novalnet-sepa.php:336 +msgid "Age limit: 18 years or more" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:322 +#: includes/gateways/class-novalnet-sepa.php:337 +msgid "The billing address must be the same as the shipping address" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:328 +#: includes/gateways/class-novalnet-sepa.php:344 +msgid "Enable payment guarantee" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:333 +#: includes/gateways/class-novalnet-invoice.php:337 +#: includes/gateways/class-novalnet-paypal.php:229 +#: includes/gateways/class-novalnet-paypal.php:233 +#: includes/gateways/class-novalnet-przelewy24.php:196 +#: includes/gateways/class-novalnet-przelewy24.php:200 +#: includes/gateways/class-novalnet-sepa.php:349 +#: includes/gateways/class-novalnet-sepa.php:353 +msgid "Payment status for the pending payment" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:338 +#: includes/gateways/class-novalnet-paypal.php:234 +#: includes/gateways/class-novalnet-przelewy24.php:201 +#: includes/gateways/class-novalnet-sepa.php:354 +msgid "Status to be used for pending transactions." +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:342 +#: includes/gateways/class-novalnet-invoice.php:345 +#: includes/gateways/class-novalnet-sepa.php:358 +#: includes/gateways/class-novalnet-sepa.php:362 +msgid "Minimum order amount for payment guarantee" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:346 +#: includes/gateways/class-novalnet-sepa.php:363 +msgid "Enter the minimum amount (in cents) for the transaction to be processed with payment guarantee. For example, enter 100 which is equal to 1,00. By default, the amount will be 9,99 EUR." +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:350 +#: includes/gateways/class-novalnet-invoice.php:357 +#: includes/gateways/class-novalnet-sepa.php:367 +#: includes/gateways/class-novalnet-sepa.php:374 +msgid "Force Non-Guarantee payment" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:358 +#: includes/gateways/class-novalnet-sepa.php:375 +msgid "Even if payment guarantee is enabled, payments will still be processed as non-guarantee payments if the payment guarantee requirements are not met. Review the requirements under 'Enable Payment Guarantee' in the Installation Guide. " +msgstr "" + +#: includes/gateways/class-novalnet-paypal.php:84 +#: includes/gateways/class-novalnet-paypal.php:102 +msgid "PayPal" +msgstr "" + +#: includes/gateways/class-novalnet-paypal.php:114 +msgid "You will be redirected to PayPal. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-paypal.php:194 +#, php-format +msgid "To accept PayPal transactions, configure your PayPal API info in the Novalnet Admin Portal: > PROJECT > Choose your project > Payment Methods > Paypal > Configure." +msgstr "" + +#: includes/gateways/class-novalnet-prepayment.php:82 +#: includes/gateways/class-novalnet-prepayment.php:100 +msgid "Prepayment" +msgstr "" + +#: includes/gateways/class-novalnet-prepayment.php:112 +#: templates/invoice-template.php:32 +msgid "You will receive an e-mail with the Novalnet account details to complete the payment." +msgstr "" + +#: includes/gateways/class-novalnet-przelewy24.php:67 +#: includes/gateways/class-novalnet-przelewy24.php:83 +#: includes/gateways/class-novalnet-przelewy24.php:183 +msgid "Novalnet Przelewy24" +msgstr "" + +#: includes/gateways/class-novalnet-przelewy24.php:84 +#: includes/gateways/class-novalnet-przelewy24.php:102 +msgid "Przelewy24" +msgstr "" + +#: includes/gateways/class-novalnet-przelewy24.php:114 +msgid "You will be redirected to Przelewy24. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-sepa.php:102 +#: includes/gateways/class-novalnet-sepa.php:126 +msgid "Direct Debit SEPA" +msgstr "" + +#: includes/gateways/class-novalnet-sepa.php:276 +msgid "Number of days after which the payment is debited (must be between 2 and 14 days)." +msgstr "" + +#: includes/novalnet-functions.php:135 +msgid "Configuration" +msgstr "" + +#: includes/novalnet-functions.php:196 +msgid "Payment was not successful. An error occurred." +msgstr "" + +#: includes/novalnet-functions.php:213 +msgid "Pay now with Barzahlen/viacash" +msgstr "" + +#: includes/novalnet-functions.php:365 +msgid "The amount is invalid" +msgstr "" + +#: includes/novalnet-functions.php:376 +msgid "Multiple subscription can not be purchased at the same time " +msgstr "" + +#: includes/novalnet-functions.php:586 +msgid "Customer name/email fields are not valid" +msgstr "" + +#: includes/novalnet-functions.php:639 +msgid "You are now redirected automatically" +msgstr "" + +#: includes/novalnet-functions.php:639 +msgid "Please wait..." +msgstr "" + +#: includes/novalnet-functions.php:733 +#, php-format +msgid "Successfully updated the payment and customer billing details for upcoming subscriptions on date: %s" +msgstr "" + +#: includes/novalnet-functions.php:930 includes/novalnet-functions.php:987 +msgid "While redirecting some data has been changed. The hash check failed" +msgstr "" + +#: includes/novalnet-functions.php:939 +#, php-format +msgid "Recurring change payment method has been failed due to %s" +msgstr "" + +#: includes/novalnet-functions.php:1019 +msgid "Product is costly" +msgstr "" + +#: includes/novalnet-functions.php:1020 +msgid "Cheating" +msgstr "" + +#: includes/novalnet-functions.php:1021 +msgid "Partner interfered" +msgstr "" + +#: includes/novalnet-functions.php:1022 +msgid "Financial problem" +msgstr "" + +#: includes/novalnet-functions.php:1023 +msgid "Content does not match my likes" +msgstr "" + +#: includes/novalnet-functions.php:1024 +msgid "Content is not enough" +msgstr "" + +#: includes/novalnet-functions.php:1025 +msgid "Interested only for a trial" +msgstr "" + +#: includes/novalnet-functions.php:1026 +msgid "Page is very slow" +msgstr "" + +#: includes/novalnet-functions.php:1027 +msgid "Satisfied customer" +msgstr "" + +#: includes/novalnet-functions.php:1028 +msgid "Logging in problems" +msgstr "" + +#: includes/novalnet-functions.php:1444 +msgid "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." +msgstr "" + +#: includes/novalnet-functions.php:1446 +msgid "Please transfer the amount to the below mentioned account." +msgstr "" + +#: includes/novalnet-functions.php:1449 +msgid "Due date: " +msgstr "" + +#: includes/novalnet-functions.php:1451 +msgid "Account holder: " +msgstr "" + +#: includes/novalnet-functions.php:1459 +msgid "Amount: " +msgstr "" + +#: includes/novalnet-functions.php:1462 +msgid "Please use the following payment reference for your money transfer, as only through this way your payment is matched and assigned to the order:" +msgstr "" + +#: includes/novalnet-functions.php:1470 +#, php-format +msgid "Payment Reference %s: " +msgstr "" + +#: includes/novalnet-functions.php:1492 +msgid "Slip expiry date" +msgstr "" + +#: includes/novalnet-functions.php:1495 +msgid "Store(s) near you" +msgstr "" + +#: includes/novalnet-functions.php:1681 +msgid "This is processed as a guarantee payment" +msgstr "" + +#: includes/novalnet-functions.php:1683 +#, php-format +msgid "Novalnet transaction ID: %s" +msgstr "" + +#: includes/novalnet-functions.php:1684 +msgid "Test order" +msgstr "" + +#: includes/novalnet-functions.php:1686 +msgid "Your order is under verification and we will soon update you with the order status. Please note that this may take upto 24 hours." +msgstr "" + +#: includes/novalnet-functions.php:1733 +msgid "Only Germany, Austria or Switzerland are allowed" +msgstr "" + +#: includes/novalnet-functions.php:1736 +msgid "Only EUR currency allowed" +msgstr "" + +#: includes/novalnet-functions.php:1740 +#, php-format +msgid "Minimum order amount must be %s" +msgstr "" + +#: includes/novalnet-functions.php:1773 +msgid "Please enter your date of birth" +msgstr "" + +#: includes/novalnet-functions.php:1775 +msgid "The date format is invalid" +msgstr "" + +#: includes/novalnet-functions.php:1777 +msgid "You need to be at least 18 years old" +msgstr "" + +#: templates/invoice-template.php:67 templates/sepa-template.php:67 +#, php-format +msgid "The payment cannot be processed, because the basic requirements for the payment guarantee are not met %s " +msgstr "" + +#: templates/invoice-template.php:79 templates/sepa-template.php:82 +msgid "Please enable the Javascript in your browser to load the payment form" +msgstr "" + +#: templates/invoice-template.php:87 templates/sepa-template.php:106 +msgid "Your date of birth" +msgstr "" + +#: templates/invoice-template.php:91 templates/sepa-template.php:110 +msgid "DD" +msgstr "" + +#: templates/invoice-template.php:92 templates/sepa-template.php:111 +msgid "MM" +msgstr "" + +#: templates/invoice-template.php:93 templates/sepa-template.php:112 +msgid "YYYY" +msgstr "" + +#: templates/sepa-template.php:32 +msgid "The amount will be debited from your account by Novalnet" +msgstr "" + +#: templates/sepa-template.php:89 templates/sepa-template.php:92 +msgid "Account holder" +msgstr "" + +#: templates/sepa-template.php:96 +msgid "IBAN " +msgstr "" + +#: templates/sepa-template.php:99 +msgid "IBAN" +msgstr "" + +#: templates/sepa-template.php:120 +msgid "I hereby grant the mandate for the SEPA direct debit (electronic transmission) and confirm that the given bank details are correct!" +msgstr "" + +#: templates/sepa-template.php:123 +msgid "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." +msgstr "" + +#: templates/sepa-template.php:126 +msgid "Creditor identifier: " +msgstr "" + +#: templates/sepa-template.php:128 +msgid "Note: " +msgstr "" + +#: templates/sepa-template.php:128 +msgid "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." +msgstr "" diff --git a/languages/messages.mo b/languages/messages.mo new file mode 100644 index 0000000..de0510b Binary files /dev/null and b/languages/messages.mo differ diff --git a/novalnet-install.php b/novalnet-install.php new file mode 100755 index 0000000..fe8b860 --- /dev/null +++ b/novalnet-install.php @@ -0,0 +1,113 @@ +get_charset_collate(); + $edd_recurring_version = preg_replace( '/[^0-9.].*/', '', get_option( 'edd_recurring_version' ) ); + if ( version_compare($edd_recurring_version, '2.7', '>=') ) { + $sub_details = $wpdb->get_results( "SELECT id, parent_payment_id FROM {$wpdb->prefix}edd_subscriptions" ); + foreach ( $sub_details as $row ) { + $result = $wpdb->get_results( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} where post_parent = '%d' AND post_type='edd_payment'", array( $row->parent_payment_id ) ) ); + foreach ( $result as $post_id ) { + update_post_meta( $post_id->ID, 'subscription_id', $row->id ); + } + } + } + require_once ABSPATH . 'wp-admin/includes/upgrade.php'; + + if ( ! get_option( 'novalnet_db_version' ) || NOVALNET_VERSION !== get_option( 'novalnet_db_version' ) ) { + dbDelta( + " + CREATE TABLE IF NOT EXISTS {$wpdb->prefix}novalnet_transaction_detail ( + id int(11) NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID', + order_no bigint(20) unsigned NOT NULL COMMENT 'Post ID for the order in shop', + vendor_id int(8) unsigned NOT NULL COMMENT 'Novalnet Vendor ID', + auth_code varchar(30) NOT NULL COMMENT 'Novalnet Authentication code', + product_id int(8) unsigned NOT NULL COMMENT 'Novalnet Project ID', + tariff_id int(8) unsigned NOT NULL COMMENT 'Novalnet Tariff ID', + payment_id int(8) unsigned NOT NULL COMMENT 'Payment ID', + payment_type varchar(50) NOT NULL COMMENT 'Executed Payment type of this order', + tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + subs_id int(8) unsigned DEFAULT NULL COMMENT 'Subscription Status', + amount int(11) NOT NULL COMMENT 'Transaction amount in cents', + callback_amount int(11) DEFAULT '0' COMMENT 'Transaction paid amount in cents', + currency varchar(5) NOT NULL COMMENT 'Transaction currency', + gateway_status int(11) DEFAULT NULL COMMENT 'Novalnet transaction status', + test_mode tinyint(1) unsigned DEFAULT NULL COMMENT 'Transaction test mode status', + customer_id int(11) unsigned DEFAULT NULL COMMENT 'Customer ID from shop', + customer_email varchar(50) DEFAULT NULL COMMENT 'Customer ID from shop', + date datetime NOT NULL COMMENT 'Transaction Date for reference', + PRIMARY KEY (id), + INDEX tid (tid), + INDEX customer_id (customer_id), + INDEX order_no (order_no) + ) $charset_collate COMMENT='Novalnet Transaction History';" + ); + + dbDelta( + " + CREATE TABLE IF NOT EXISTS {$wpdb->prefix}novalnet_subscription_details ( + id int(11) NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID', + order_no bigint(20) NOT NULL COMMENT 'Post ID for the order in shop', + payment_type varchar(50) NOT NULL COMMENT 'Payment Type', + recurring_payment_type varchar(50) NOT NULL COMMENT 'Recurring Payment Type', + recurring_amount int(11) DEFAULT NULL COMMENT 'Amount in cents', + tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + recurring_tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + subs_id int(8) unsigned DEFAULT NULL COMMENT 'Subscription Status', + signup_date datetime DEFAULT NULL COMMENT 'Subscription signup date', + next_payment_date datetime DEFAULT NULL COMMENT 'Subscription next cycle date', + termination_reason varchar(255) DEFAULT NULL COMMENT 'Subscription termination reason by merchant', + termination_at datetime DEFAULT NULL COMMENT 'Subscription terminated date', + subscription_length int(8) NOT NULL DEFAULT 0 COMMENT 'Length of Subscription', + PRIMARY KEY (id), + INDEX order_no (order_no), + INDEX tid (tid) + ) $charset_collate COMMENT='Novalnet Subscription Payment Details';" + ); + + update_option( 'novalnet_version_update', true ); + if ( ! get_option( 'novalnet_db_version' ) ) { + add_option( 'novalnet_db_version', NOVALNET_VERSION ); + } elseif ( NOVALNET_VERSION !== get_option( 'novalnet_db_version' ) ) { + + if ( version_compare(get_option( 'novalnet_db_version' ), '2.1.1', '<=') ) { + + $edd_settings = get_option('edd_settings'); + + $store_temp_subs_payment = array(); + + if( isset($edd_settings['novalnet_subs_payments']) && !empty( $edd_settings['novalnet_subs_payments'] ) ) { + $store_temp_subs_payment = array( + 'novalnet_subs_payments' => array_keys($edd_settings['novalnet_subs_payments']) + ); + } + + update_option('edd_settings', array_merge( $edd_settings, $store_temp_subs_payment )); + } + update_option( 'novalnet_db_version', NOVALNET_VERSION ); + } + + }// End if(). +} diff --git a/templates/invoice-template.php b/templates/invoice-template.php new file mode 100755 index 0000000..4381c44 --- /dev/null +++ b/templates/invoice-template.php @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %s ', 'edd-novalnet' ), $invoice_error_msg ); + echo __( $invoice_error_msg, 'edd-novalnet' ); + } + ?> + + + + + + + + + + session->get( 'novalnet_invoice_guarantee_payment_error' ) ) || ( 0 === get_current_user_id() ) ) && !$update_payment ) { + // display Date of birth field. + ?> + + + * + + + + + + + + + + diff --git a/templates/sepa-template.php b/templates/sepa-template.php new file mode 100755 index 0000000..332c211 --- /dev/null +++ b/templates/sepa-template.php @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %s ', 'edd-novalnet' ), $error_msg ); + echo __( $error_msg, 'edd-novalnet' ); + } + ?> + + + + + + + + + + + + + + + + * + + + + + + + * + + + + session->get( 'novalnet_sepa_guarantee_payment_error' ) ) || ( 0 === get_current_user_id() ) ) && !$update_payment ) { + // display Date of birth field. + ?> + + + * + + + + + + + + + + + + + + + + + DE53ZZZ00000004253 + + + +
(in minimum unit of currency. E.g. enter 100 which is equal to 1.00)" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:337 +#: includes/gateways/class-novalnet-paypal.php:225 +#: includes/gateways/class-novalnet-sepa.php:298 +msgid "In case the order amount exceeds the mentioned limit, the transaction will be set on-hold till your confirmation of the transaction. You can leave the field empty if you wish to process all the transactions as on-hold." +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:341 +#: includes/gateways/class-novalnet-cc.php:343 +msgid "Enforce 3D secure payment outside EU" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:344 +msgid "By enabling this option, all payments from cards issued outside the EU will be authenticated via 3DS 2.0 SCA" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:368 +msgid "Custom CSS settings" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:373 +msgid "CSS settings for iframe form" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:379 +msgid "Label" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:380 +#: includes/gateways/class-novalnet-cc.php:388 +msgid "E.g: color:#999999; background-color:#FFFFFF;" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:387 +msgid "Input" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:395 +msgid "CSS Text" +msgstr "" + +#: includes/gateways/class-novalnet-cc.php:396 +msgid "E.g: #idselector{color:#999999;}.classSelector{color:#000000}" +msgstr "" + +#: includes/gateways/class-novalnet-eps.php:66 +#: includes/gateways/class-novalnet-eps.php:81 +#: includes/gateways/class-novalnet-eps.php:179 +msgid "Novalnet eps" +msgstr "" + +#: includes/gateways/class-novalnet-eps.php:82 +#: includes/gateways/class-novalnet-eps.php:101 +msgid "eps" +msgstr "" + +#: includes/gateways/class-novalnet-eps.php:113 +msgid "You will be redirected to eps. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-giropay.php:67 +#: includes/gateways/class-novalnet-giropay.php:83 +#: includes/gateways/class-novalnet-giropay.php:179 +msgid "Novalnet giropay" +msgstr "" + +#: includes/gateways/class-novalnet-giropay.php:84 +#: includes/gateways/class-novalnet-giropay.php:102 +msgid "giropay" +msgstr "" + +#: includes/gateways/class-novalnet-giropay.php:114 +msgid "You will be redirected to giropay. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-ideal.php:67 +#: includes/gateways/class-novalnet-ideal.php:82 +#: includes/gateways/class-novalnet-ideal.php:179 +msgid "Novalnet iDEAL" +msgstr "" + +#: includes/gateways/class-novalnet-ideal.php:83 +#: includes/gateways/class-novalnet-ideal.php:100 +msgid "iDEAL" +msgstr "" + +#: includes/gateways/class-novalnet-ideal.php:112 +msgid "You will be redirected to iDEAL. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-instantbank.php:67 +#: includes/gateways/class-novalnet-instantbank.php:82 +#: includes/gateways/class-novalnet-instantbank.php:178 +msgid "Novalnet Sofort" +msgstr "" + +#: includes/gateways/class-novalnet-instantbank.php:83 +#: includes/gateways/class-novalnet-instantbank.php:100 +msgid "Sofort" +msgstr "" + +#: includes/gateways/class-novalnet-instantbank.php:112 +msgid "You will be redirected to Sofort. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:98 +#: includes/gateways/class-novalnet-invoice.php:121 +msgid "Invoice" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:156 +#: includes/gateways/class-novalnet-sepa.php:216 +#, php-format +msgid "The payment cannot be processed, because the basic requirements for the payment guarantee are not met ( %s ) " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:245 +#: includes/gateways/class-novalnet-invoice.php:249 +#: includes/gateways/class-novalnet-prepayment.php:206 +#: includes/gateways/class-novalnet-prepayment.php:211 +#: includes/gateways/class-novalnet-sepa.php:269 +#: includes/gateways/class-novalnet-sepa.php:275 +msgid "Payment due date (in days)" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:250 +#: includes/gateways/class-novalnet-prepayment.php:212 +msgid "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. " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:272 +msgid "When the order amount exceeds the mentioned limit, the transaction will be set on-hold till you confirm it. You can leave the field empty if you wish to process all transactions as on-hold transactions. " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:303 +#: includes/gateways/class-novalnet-sepa.php:318 +msgid "Payment guarantee configuration" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:317 +#: includes/gateways/class-novalnet-sepa.php:332 +msgid "Payment guarantee requirements: " +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:318 +#: includes/gateways/class-novalnet-sepa.php:333 +msgid "Allowed countries: DE, AT, CH" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:319 +#: includes/gateways/class-novalnet-sepa.php:334 +msgid "Allowed currency: EUR" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:320 +#: includes/gateways/class-novalnet-sepa.php:335 +msgid "Minimum order amount: 9,99 EUR or more" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:321 +#: includes/gateways/class-novalnet-sepa.php:336 +msgid "Age limit: 18 years or more" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:322 +#: includes/gateways/class-novalnet-sepa.php:337 +msgid "The billing address must be the same as the shipping address" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:328 +#: includes/gateways/class-novalnet-sepa.php:344 +msgid "Enable payment guarantee" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:333 +#: includes/gateways/class-novalnet-invoice.php:337 +#: includes/gateways/class-novalnet-paypal.php:229 +#: includes/gateways/class-novalnet-paypal.php:233 +#: includes/gateways/class-novalnet-przelewy24.php:196 +#: includes/gateways/class-novalnet-przelewy24.php:200 +#: includes/gateways/class-novalnet-sepa.php:349 +#: includes/gateways/class-novalnet-sepa.php:353 +msgid "Payment status for the pending payment" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:338 +#: includes/gateways/class-novalnet-paypal.php:234 +#: includes/gateways/class-novalnet-przelewy24.php:201 +#: includes/gateways/class-novalnet-sepa.php:354 +msgid "Status to be used for pending transactions." +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:342 +#: includes/gateways/class-novalnet-invoice.php:345 +#: includes/gateways/class-novalnet-sepa.php:358 +#: includes/gateways/class-novalnet-sepa.php:362 +msgid "Minimum order amount for payment guarantee" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:346 +#: includes/gateways/class-novalnet-sepa.php:363 +msgid "Enter the minimum amount (in cents) for the transaction to be processed with payment guarantee. For example, enter 100 which is equal to 1,00. By default, the amount will be 9,99 EUR." +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:350 +#: includes/gateways/class-novalnet-invoice.php:357 +#: includes/gateways/class-novalnet-sepa.php:367 +#: includes/gateways/class-novalnet-sepa.php:374 +msgid "Force Non-Guarantee payment" +msgstr "" + +#: includes/gateways/class-novalnet-invoice.php:358 +#: includes/gateways/class-novalnet-sepa.php:375 +msgid "Even if payment guarantee is enabled, payments will still be processed as non-guarantee payments if the payment guarantee requirements are not met. Review the requirements under 'Enable Payment Guarantee' in the Installation Guide. " +msgstr "" + +#: includes/gateways/class-novalnet-paypal.php:84 +#: includes/gateways/class-novalnet-paypal.php:102 +msgid "PayPal" +msgstr "" + +#: includes/gateways/class-novalnet-paypal.php:114 +msgid "You will be redirected to PayPal. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-paypal.php:194 +#, php-format +msgid "To accept PayPal transactions, configure your PayPal API info in the Novalnet Admin Portal: > PROJECT > Choose your project > Payment Methods > Paypal > Configure." +msgstr "" + +#: includes/gateways/class-novalnet-prepayment.php:82 +#: includes/gateways/class-novalnet-prepayment.php:100 +msgid "Prepayment" +msgstr "" + +#: includes/gateways/class-novalnet-prepayment.php:112 +#: templates/invoice-template.php:32 +msgid "You will receive an e-mail with the Novalnet account details to complete the payment." +msgstr "" + +#: includes/gateways/class-novalnet-przelewy24.php:67 +#: includes/gateways/class-novalnet-przelewy24.php:83 +#: includes/gateways/class-novalnet-przelewy24.php:183 +msgid "Novalnet Przelewy24" +msgstr "" + +#: includes/gateways/class-novalnet-przelewy24.php:84 +#: includes/gateways/class-novalnet-przelewy24.php:102 +msgid "Przelewy24" +msgstr "" + +#: includes/gateways/class-novalnet-przelewy24.php:114 +msgid "You will be redirected to Przelewy24. Please don’t close or refresh the browser until the payment is completed" +msgstr "" + +#: includes/gateways/class-novalnet-sepa.php:102 +#: includes/gateways/class-novalnet-sepa.php:126 +msgid "Direct Debit SEPA" +msgstr "" + +#: includes/gateways/class-novalnet-sepa.php:276 +msgid "Number of days after which the payment is debited (must be between 2 and 14 days)." +msgstr "" + +#: includes/novalnet-functions.php:135 +msgid "Configuration" +msgstr "" + +#: includes/novalnet-functions.php:196 +msgid "Payment was not successful. An error occurred." +msgstr "" + +#: includes/novalnet-functions.php:213 +msgid "Pay now with Barzahlen/viacash" +msgstr "" + +#: includes/novalnet-functions.php:365 +msgid "The amount is invalid" +msgstr "" + +#: includes/novalnet-functions.php:376 +msgid "Multiple subscription can not be purchased at the same time " +msgstr "" + +#: includes/novalnet-functions.php:586 +msgid "Customer name/email fields are not valid" +msgstr "" + +#: includes/novalnet-functions.php:639 +msgid "You are now redirected automatically" +msgstr "" + +#: includes/novalnet-functions.php:639 +msgid "Please wait..." +msgstr "" + +#: includes/novalnet-functions.php:733 +#, php-format +msgid "Successfully updated the payment and customer billing details for upcoming subscriptions on date: %s" +msgstr "" + +#: includes/novalnet-functions.php:930 includes/novalnet-functions.php:987 +msgid "While redirecting some data has been changed. The hash check failed" +msgstr "" + +#: includes/novalnet-functions.php:939 +#, php-format +msgid "Recurring change payment method has been failed due to %s" +msgstr "" + +#: includes/novalnet-functions.php:1019 +msgid "Product is costly" +msgstr "" + +#: includes/novalnet-functions.php:1020 +msgid "Cheating" +msgstr "" + +#: includes/novalnet-functions.php:1021 +msgid "Partner interfered" +msgstr "" + +#: includes/novalnet-functions.php:1022 +msgid "Financial problem" +msgstr "" + +#: includes/novalnet-functions.php:1023 +msgid "Content does not match my likes" +msgstr "" + +#: includes/novalnet-functions.php:1024 +msgid "Content is not enough" +msgstr "" + +#: includes/novalnet-functions.php:1025 +msgid "Interested only for a trial" +msgstr "" + +#: includes/novalnet-functions.php:1026 +msgid "Page is very slow" +msgstr "" + +#: includes/novalnet-functions.php:1027 +msgid "Satisfied customer" +msgstr "" + +#: includes/novalnet-functions.php:1028 +msgid "Logging in problems" +msgstr "" + +#: includes/novalnet-functions.php:1444 +msgid "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." +msgstr "" + +#: includes/novalnet-functions.php:1446 +msgid "Please transfer the amount to the below mentioned account." +msgstr "" + +#: includes/novalnet-functions.php:1449 +msgid "Due date: " +msgstr "" + +#: includes/novalnet-functions.php:1451 +msgid "Account holder: " +msgstr "" + +#: includes/novalnet-functions.php:1459 +msgid "Amount: " +msgstr "" + +#: includes/novalnet-functions.php:1462 +msgid "Please use the following payment reference for your money transfer, as only through this way your payment is matched and assigned to the order:" +msgstr "" + +#: includes/novalnet-functions.php:1470 +#, php-format +msgid "Payment Reference %s: " +msgstr "" + +#: includes/novalnet-functions.php:1492 +msgid "Slip expiry date" +msgstr "" + +#: includes/novalnet-functions.php:1495 +msgid "Store(s) near you" +msgstr "" + +#: includes/novalnet-functions.php:1681 +msgid "This is processed as a guarantee payment" +msgstr "" + +#: includes/novalnet-functions.php:1683 +#, php-format +msgid "Novalnet transaction ID: %s" +msgstr "" + +#: includes/novalnet-functions.php:1684 +msgid "Test order" +msgstr "" + +#: includes/novalnet-functions.php:1686 +msgid "Your order is under verification and we will soon update you with the order status. Please note that this may take upto 24 hours." +msgstr "" + +#: includes/novalnet-functions.php:1733 +msgid "Only Germany, Austria or Switzerland are allowed" +msgstr "" + +#: includes/novalnet-functions.php:1736 +msgid "Only EUR currency allowed" +msgstr "" + +#: includes/novalnet-functions.php:1740 +#, php-format +msgid "Minimum order amount must be %s" +msgstr "" + +#: includes/novalnet-functions.php:1773 +msgid "Please enter your date of birth" +msgstr "" + +#: includes/novalnet-functions.php:1775 +msgid "The date format is invalid" +msgstr "" + +#: includes/novalnet-functions.php:1777 +msgid "You need to be at least 18 years old" +msgstr "" + +#: templates/invoice-template.php:67 templates/sepa-template.php:67 +#, php-format +msgid "The payment cannot be processed, because the basic requirements for the payment guarantee are not met %s " +msgstr "" + +#: templates/invoice-template.php:79 templates/sepa-template.php:82 +msgid "Please enable the Javascript in your browser to load the payment form" +msgstr "" + +#: templates/invoice-template.php:87 templates/sepa-template.php:106 +msgid "Your date of birth" +msgstr "" + +#: templates/invoice-template.php:91 templates/sepa-template.php:110 +msgid "DD" +msgstr "" + +#: templates/invoice-template.php:92 templates/sepa-template.php:111 +msgid "MM" +msgstr "" + +#: templates/invoice-template.php:93 templates/sepa-template.php:112 +msgid "YYYY" +msgstr "" + +#: templates/sepa-template.php:32 +msgid "The amount will be debited from your account by Novalnet" +msgstr "" + +#: templates/sepa-template.php:89 templates/sepa-template.php:92 +msgid "Account holder" +msgstr "" + +#: templates/sepa-template.php:96 +msgid "IBAN " +msgstr "" + +#: templates/sepa-template.php:99 +msgid "IBAN" +msgstr "" + +#: templates/sepa-template.php:120 +msgid "I hereby grant the mandate for the SEPA direct debit (electronic transmission) and confirm that the given bank details are correct!" +msgstr "" + +#: templates/sepa-template.php:123 +msgid "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." +msgstr "" + +#: templates/sepa-template.php:126 +msgid "Creditor identifier: " +msgstr "" + +#: templates/sepa-template.php:128 +msgid "Note: " +msgstr "" + +#: templates/sepa-template.php:128 +msgid "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." +msgstr "" diff --git a/languages/messages.mo b/languages/messages.mo new file mode 100644 index 0000000..de0510b Binary files /dev/null and b/languages/messages.mo differ diff --git a/novalnet-install.php b/novalnet-install.php new file mode 100755 index 0000000..fe8b860 --- /dev/null +++ b/novalnet-install.php @@ -0,0 +1,113 @@ +get_charset_collate(); + $edd_recurring_version = preg_replace( '/[^0-9.].*/', '', get_option( 'edd_recurring_version' ) ); + if ( version_compare($edd_recurring_version, '2.7', '>=') ) { + $sub_details = $wpdb->get_results( "SELECT id, parent_payment_id FROM {$wpdb->prefix}edd_subscriptions" ); + foreach ( $sub_details as $row ) { + $result = $wpdb->get_results( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} where post_parent = '%d' AND post_type='edd_payment'", array( $row->parent_payment_id ) ) ); + foreach ( $result as $post_id ) { + update_post_meta( $post_id->ID, 'subscription_id', $row->id ); + } + } + } + require_once ABSPATH . 'wp-admin/includes/upgrade.php'; + + if ( ! get_option( 'novalnet_db_version' ) || NOVALNET_VERSION !== get_option( 'novalnet_db_version' ) ) { + dbDelta( + " + CREATE TABLE IF NOT EXISTS {$wpdb->prefix}novalnet_transaction_detail ( + id int(11) NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID', + order_no bigint(20) unsigned NOT NULL COMMENT 'Post ID for the order in shop', + vendor_id int(8) unsigned NOT NULL COMMENT 'Novalnet Vendor ID', + auth_code varchar(30) NOT NULL COMMENT 'Novalnet Authentication code', + product_id int(8) unsigned NOT NULL COMMENT 'Novalnet Project ID', + tariff_id int(8) unsigned NOT NULL COMMENT 'Novalnet Tariff ID', + payment_id int(8) unsigned NOT NULL COMMENT 'Payment ID', + payment_type varchar(50) NOT NULL COMMENT 'Executed Payment type of this order', + tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + subs_id int(8) unsigned DEFAULT NULL COMMENT 'Subscription Status', + amount int(11) NOT NULL COMMENT 'Transaction amount in cents', + callback_amount int(11) DEFAULT '0' COMMENT 'Transaction paid amount in cents', + currency varchar(5) NOT NULL COMMENT 'Transaction currency', + gateway_status int(11) DEFAULT NULL COMMENT 'Novalnet transaction status', + test_mode tinyint(1) unsigned DEFAULT NULL COMMENT 'Transaction test mode status', + customer_id int(11) unsigned DEFAULT NULL COMMENT 'Customer ID from shop', + customer_email varchar(50) DEFAULT NULL COMMENT 'Customer ID from shop', + date datetime NOT NULL COMMENT 'Transaction Date for reference', + PRIMARY KEY (id), + INDEX tid (tid), + INDEX customer_id (customer_id), + INDEX order_no (order_no) + ) $charset_collate COMMENT='Novalnet Transaction History';" + ); + + dbDelta( + " + CREATE TABLE IF NOT EXISTS {$wpdb->prefix}novalnet_subscription_details ( + id int(11) NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID', + order_no bigint(20) NOT NULL COMMENT 'Post ID for the order in shop', + payment_type varchar(50) NOT NULL COMMENT 'Payment Type', + recurring_payment_type varchar(50) NOT NULL COMMENT 'Recurring Payment Type', + recurring_amount int(11) DEFAULT NULL COMMENT 'Amount in cents', + tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + recurring_tid bigint(20) unsigned NOT NULL COMMENT 'Novalnet Transaction Reference ID', + subs_id int(8) unsigned DEFAULT NULL COMMENT 'Subscription Status', + signup_date datetime DEFAULT NULL COMMENT 'Subscription signup date', + next_payment_date datetime DEFAULT NULL COMMENT 'Subscription next cycle date', + termination_reason varchar(255) DEFAULT NULL COMMENT 'Subscription termination reason by merchant', + termination_at datetime DEFAULT NULL COMMENT 'Subscription terminated date', + subscription_length int(8) NOT NULL DEFAULT 0 COMMENT 'Length of Subscription', + PRIMARY KEY (id), + INDEX order_no (order_no), + INDEX tid (tid) + ) $charset_collate COMMENT='Novalnet Subscription Payment Details';" + ); + + update_option( 'novalnet_version_update', true ); + if ( ! get_option( 'novalnet_db_version' ) ) { + add_option( 'novalnet_db_version', NOVALNET_VERSION ); + } elseif ( NOVALNET_VERSION !== get_option( 'novalnet_db_version' ) ) { + + if ( version_compare(get_option( 'novalnet_db_version' ), '2.1.1', '<=') ) { + + $edd_settings = get_option('edd_settings'); + + $store_temp_subs_payment = array(); + + if( isset($edd_settings['novalnet_subs_payments']) && !empty( $edd_settings['novalnet_subs_payments'] ) ) { + $store_temp_subs_payment = array( + 'novalnet_subs_payments' => array_keys($edd_settings['novalnet_subs_payments']) + ); + } + + update_option('edd_settings', array_merge( $edd_settings, $store_temp_subs_payment )); + } + update_option( 'novalnet_db_version', NOVALNET_VERSION ); + } + + }// End if(). +} diff --git a/templates/invoice-template.php b/templates/invoice-template.php new file mode 100755 index 0000000..4381c44 --- /dev/null +++ b/templates/invoice-template.php @@ -0,0 +1,100 @@ + + +
+ + + %s ', 'edd-novalnet' ), $invoice_error_msg ); + echo __( $invoice_error_msg, 'edd-novalnet' ); + } + ?> + + +
+ + * + + + + + + +
+ + + %s ', 'edd-novalnet' ), $error_msg ); + echo __( $error_msg, 'edd-novalnet' ); + } + ?> + + +
+ + * + + +
+ + + +