=== NetDebit for WooCommerce ===
Contributors: netdebitdev
Tags: woocommerce, payment-gateway, netdebit, adult-entertainment, high-risk
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 1.0.1
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

NetDebit® Payments for WooCommerce: Reliable payments for Europe, specialized in adult entertainment and high-risk industries.

== Description ==

**NetDebit® is a professional payment solution for merchants in the adult entertainment industry and other high-risk sectors.**

This plugin integrates NetDebit directly into your WooCommerce store. Many payment providers refuse to work with merchants in industries they deem "high-risk." NetDebit is your reliable partner that understands the **adult entertainment** business model and offers fair, transparent conditions.

This gateway is ideal for selling **virtual products (videos, digital content) and subscriptions**.

**Why Choose NetDebit for WooCommerce?**

* **Built for Your Industry:** Specifically for sectors often underserved by other providers.
* **Full Subscription Support:** Fully compatible with "WooCommerce Subscriptions" and "YITH Subscriptions for WooCommerce".
* **Active Risk Management:** Automated user blocking after chargebacks.
* **Stable & Future-Proof:** Built on the official NetDebit SDK.

Currently, this plugin fully supports the **classic Shortcode-based Checkout**.

[Open a partner account @ NetDebit®](https://www.netdebit-payment.de/webmaster/registration)

== Installation ==

1. Upload the plugin directory to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **WooCommerce > Settings > Payments** and select "NetDebit Payment" to configure.

== Frequently Asked Questions ==

= Do I need a NetDebit merchant account? =

Yes, an active merchant account is mandatory.

= Does it work with WooCommerce Subscriptions? =

Yes, this plugin fully supports recurring payments.

== Screenshots ==

1. The settings page in WooCommerce.
2. The checkout page showing NetDebit as a payment option.

== Changelog ==
= 1.0.1 =
* **Fix** YITH subscriptions are now correctly paused on chargebacks. (WooCommerce Subscriptions were always working correctly.) Checkout blocking for chargeback users was already active - this fix extends the behavior to YITH subscriptions.
= 1.0.0 =
* **Release:** Official public release on WordPress.org plugin repository.
=0.3.2=
* **Fix** Distinction between YITH subscriptions and cart products restored.
=0.3.1=
* **Fix** Sanitation issues resolved.
=0.3.0=
* **Feature** Using the clients language as defalt for the netdebit page (English). German is used only if the browser is set to German
* **Feature** Support for YITH woocommerce subscription free and paid version too.
= 0.2.9 =
* **Security:** Hardened all admin settings and legacy API endpoints with strict nonce verification and sanitized input handling.
* **Fix:** Resolved Plugin-Check warnings regarding translator comments and dynamic hook naming.
* **Refactor:** Improved Subscription renewal detection by utilizing order state instead of redundant request parameters.
* **Build:** Enhanced build script to recursively exclude system-specific metadata and development binaries (composer.phar).
* **Fix:** Standardized script registration for admin order views to prevent caching issues.

= 0.2.8 =
* **Fix:** Resolved critical Case-Sensitivity issues in the vendor directory for Linux-based environments.
* **Fix:** Corrected REST API parameter validation for the 'Thank You' redirect (added mandatory ndVar2 and order_key).
* **Fix:** Hardened permission_callback in REST hooks to support guest checkouts via Order Key validation.
* **Build:** Implemented LF (Line Feed) normalization in the build script to prevent CRLF conflicts.

= 0.2.7 =
* **Security:** Hardened the build process to strictly exclude development artifacts.
* **Security:** Enhanced REST API Webhook security by moving authentication logic into permission_callback.
* **Performance:** Optimized loading of installation scripts.
* **Fix:** Improved sanitization and output escaping for WordPress Coding Standards compliance.

= 0.2.6 =
* **Compatibility:** Enforced Classic Shortcode Checkout for correct tax calculation.
* **Feature:** Added admin notice for Checkout Block detection with "One-Click-Fix".
* **Fix:** Refactored VAT exclusion logic to use safe JavaScript injection.

= 0.2.5 =
* **Feature:** Automated user blocking after chargebacks.
* **Feature:** Support for WooCommerce Subscriptions.
* **Feature:** Option to suppress duplicate WooCommerce order emails.
* **Tweak:** Refactored payment transactions to use the official NetDebit SDK.

= 0.1.0 =
* Initial public release.

== Upgrade Notice ==

= 1.0.0 =
Official public release. All users can safely upgrade.

= 0.2.8 =
Critical fix for Linux server compatibility (Case-Sensitivity) and REST API redirect permissions. All users should update immediately.

== For Developers ==

This plugin is built with extensibility in mind.

* **Action Hooks:**
    * `NetDebit\WooCommerceGateway\Events\ChargebackReceivedEvent::HOOK`
    * `NetDebit\WooCommerceGateway\Events\SettlementReceivedEvent::HOOK`

Example usage:
```php
add_action( 'netdebit_chargeback_received', function( $event ) {
    $order = $event->getOrder();
    error_log( 'Chargeback for order: ' . $order->get_id() );
}, 10, 1 );