=== TINXDK EAN Betaling Pro ===
Contributors: tinxdk
Tags: woocommerce, ean, nemhandel, cvr, payment gateway
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 8.2.35
Requires Plugins: tinxdk-ean-betaling, woocommerce
WC requires at least: 8.0
WC tested up to: 11.2
Stable tag: 2.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Pro add-on for TINXDK EAN Betaling Lite: live EAN/CVR lookup, production units, risk assessment, handling fee and Subscriptions support.

== Description ==

**English**

TINXDK EAN Betaling Pro extends the free plugin "TINXDK EAN Betaling Lite" (which must be installed and active) with the features that need a licence key from tinxdkcloud.dk:

* Live lookup of the EAN number in NemHandel/Peppol (directory.peppol.eu, with the public NemHandel Register registration.nemhandel.dk as fallback for NemHandel-only participants) and of the company in the Danish CVR register (cvrapi.dk). "Reject unknown EAN numbers", cache lifetime and optional (throttled) API error emails.
* Selectable active production units (P-numbers) for the company behind the EAN number.
* Risk assessment per order with severity levels (info / warning / danger): unknown EAN, failed lookup, ended or bankrupt company, ended production unit, shipping postcode mismatch, first use, usage history and locally reported misuse; re-fetch of the EAN data and misuse reports on the order screen.
* Optional handling fee that only applies when the EAN method is chosen.
* WooCommerce Subscriptions support (EAN data is copied to renewal orders, subscriptions can be kept active on renewal, and customers can change a subscription's payment method to EAN).
* Automatic updates from the TINXDK licence server (needs an active licence).

Everything the free plugin does keeps working without this add-on and without a licence: the EAN payment method, validation, reference/requisition fields, order display, Checkout Blocks, HPOS and ALTCHA. Without an active licence the Pro settings are shown disabled and your saved values are kept. Enter the key under WooCommerce > Settings > Payments > EAN payment > License.

If the free plugin is missing or older than 2.0.0 this add-on shows a notice and does nothing.

**Dansk**

Tillæg til det gratis plugin "TINXDK EAN Betaling Lite" (skal være installeret og aktivt). Kræver en licensnøgle fra tinxdkcloud.dk og giver live-opslag i NemHandel/Peppol og CVR-registeret, valg af produktionsenhed (P-nummer), risikovurdering pr. ordre, håndteringsgebyr, understøttelse af WooCommerce Subscriptions og automatiske opdateringer. Det gratis plugin virker uændret uden tillægget. Indtast licensnøglen under WooCommerce > Indstillinger > Betalinger > EAN-betaling > Licens. Dansk oversættelse er inkluderet.

== Installation ==

1. Install and activate the free plugin "TINXDK EAN Betaling Lite" (and WooCommerce).
2. Upload the folder `tinxdk-ean-betaling-pro` to `/wp-content/plugins/` and activate it.
3. Go to WooCommerce > Settings > Payments > EAN payment and enter your licence key in the License section.

== Frequently Asked Questions ==

= I used the licensed version of "TINXDK WP EAN Betaling" before =
Deactivate and delete the old plugin, install "TINXDK EAN Betaling Lite" (free) and this Pro add-on, and activate your licence key again. Settings and order data are kept (option names, meta keys and the gateway id are unchanged).

= What happens without a licence, or when I deactivate the Pro add-on? =
The free plugin keeps working unchanged. The Pro features are off, and the Pro settings you saved are kept in the database and apply again when the add-on is active and licensed.

= Which hooks can I use? =
See README.md in the plugin folder (filters `tinxdk_ean_risk_flags`, `tinxdk_ean_ean_registry`, `tinxdk_ean_company_registry`, `tinxdk_ean_http_timeout` and more).

== External services ==

This add-on connects to the following external services. Nothing is sent before the licence is activated or an EAN/CVR number is entered; results are cached on your server (24 hours by default).

* **Peppol Directory** (https://directory.peppol.eu/, operated by OpenPeppol): when a customer enters an EAN number at checkout (or an administrator re-fetches the EAN data of an order), the EAN number is sent to look up the participant. Terms and privacy information: https://peppol.eu/
* **NemHandel Register** (https://registration.nemhandel.dk/, operated by the Danish Agency for Digital Government): if the Peppol Directory does not know the EAN number, the EAN number is sent to check the public register. Terms and privacy information: https://digst.dk/
* **cvrapi.dk** (https://cvrapi.dk/): the CVR number found for the EAN number is sent to fetch the company name, address, status and production units from the Danish CVR register. Terms and privacy information: https://cvrapi.dk/
* **TINXDK licence server** (https://licens.tinxdkcloud.dk/, operated by TINXDK ApS): when the licence is activated, deactivated, checked (twice a day) and when WordPress checks for updates, the licence key, the site URL and the versions of the plugin, WordPress and PHP are sent. Terms and privacy information: https://tinxdkcloud.dk/

== Upgrade Notice ==

= 2.0.1 =
The free plugin is now called TINXDK EAN Betaling Lite (no functional change).

= 2.0.0 =
First release of the Pro add-on. It replaces the licensed features of "TINXDK WP EAN Betaling" 1.x and needs the free plugin "TINXDK EAN Betaling Lite" 2.0.0 or newer.

== Changelog ==

= 2.0.1 =
* Changed: The free plugin is now called TINXDK EAN Betaling Lite; this add-on's texts follow. No functional change.

= 2.0.0 =
* New: The licence-gated features of "TINXDK WP EAN Betaling" 1.x now live in this separate add-on (plugin folder tinxdk-ean-betaling-pro, text domain tinxdk-ean-betaling-pro, namespace Tinxdk\EanBetalingPro): live EAN lookup (NemHandel/Peppol), CVR company lookup, production units, risk assessment with re-fetch and misuse reports, handling fee, WooCommerce Subscriptions support, API error emails, the licence client and automatic updates. The free plugin "TINXDK EAN Betaling Lite" 2.0.0 contains everything else.
* New: Needs the free plugin (header "Requires Plugins"); boots when the free plugin has loaded and shows a notice and does nothing when it is missing or older than 2.0.0.
* Changed: Option names, order meta keys, the gateway id, licence option names and all constants are unchanged, so settings, licence state and orders carry over.
