=== Solidgate Subscription for WooCommerce ===
Contributors: ryapko
Tags: payment, gateway, subscription, woocommerce, checkout
Requires at least: 5.6
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Subscription payments via Solidgate. Supports card payments and APMs (BLIK, MB Way, Bizum) with an inline form.

== Description ==

Solidgate Subscription for WooCommerce integrates the [Solidgate](https://solidgate.com) subscription payment platform into your WooCommerce store. Customers can subscribe to plans and pay by credit or debit card directly on your checkout page using an embedded payment form.

= Key features =

* **Inline subscription form** -- card fields and APM buttons appear directly inside the checkout payment section as soon as the customer selects this gateway.
* **BLIK** -- automatically rendered for PLN orders with a Poland billing address.
* **MB Way** -- automatically rendered for EUR orders with a Portugal billing address.
* **Bizum** -- automatically rendered for EUR orders with a Spain billing address.
* **Webhook-based subscription updates** -- subscription status (authorized, settled, declined, refunded, paused, resumed) is updated in real time via Solidgate webhooks.
* **Subscription lifecycle management** -- pause, resume, and restore subscriptions directly from WooCommerce admin.
* **HPOS compatible** -- fully supports WooCommerce High-Performance Order Storage (custom order tables).
* **Logging** -- optional debug logging to the WooCommerce log for troubleshooting.

= Third-Party Service =

This plugin connects to the **Solidgate** payment platform (https://solidgate.com) to process payments. Solidgate is a third-party service -- by using this plugin you are subject to their terms and privacy policy.

* Solidgate Terms of Service: https://solidgate.com/terms/
* Solidgate Privacy Policy: https://solidgate.com/privacy-policy/

= Requirements =

* WordPress 5.6 or later
* WooCommerce 6.0 or later
* WooCommerce Subscriptions 2.0 or later
* PHP 7.4 or later
* A Solidgate merchant account -- [sign up at solidgate.com](https://solidgate.com)

== Installation ==

1. Upload the `solidgate-subscription-for-woocommerce` folder to `/wp-content/plugins/`, or install via **Plugins > Add New** in WordPress admin.
2. Activate the plugin through the **Plugins** screen.
3. Go to **WooCommerce > Settings > Payments** and click **Set up** next to "Solidgate Subscription for WooCommerce".
4. Enter your credentials from the Solidgate merchant dashboard:
   * Public Key
   * Private Key
   * Webhook Public Key
   * Webhook Private Key
5. In the Solidgate dashboard, set your webhook URL to:
   `https://yoursite.com/?wc-api=solid_subscribe_hook`

== Frequently Asked Questions ==

= Where do I get my API keys? =

Log in to your [Solidgate merchant dashboard](https://merchant.solidgate.com) and navigate to **Settings > API Keys**.

= Does this plugin require WooCommerce Subscriptions? =

Yes. This plugin extends WooCommerce Subscriptions to add Solidgate as a subscription payment method. WooCommerce Subscriptions 2.0 or later must be active.

= How do I set up the webhook? =

In your Solidgate merchant dashboard, add a webhook endpoint pointing to `https://yoursite.com/?wc-api=solid_subscribe_hook`. Solidgate will send subscription lifecycle events to this URL, and the plugin will update the corresponding WooCommerce subscription automatically.

= Which countries and currencies are supported for APMs? =

* **BLIK** -- PLN (Polish Zloty), billing country: Poland
* **MB Way** -- EUR, billing country: Portugal
* **Bizum** -- EUR, billing country: Spain

APM buttons appear automatically when the order matches the required currency and country.

= Is PCI compliance maintained? =

Yes. Card data is entered directly inside a Solidgate-hosted iframe served from `cdn.solidgate.com`. Your server never handles raw card numbers.

== Screenshots ==

1. Gateway settings screen in WooCommerce admin.
2. Inline subscription payment form on classic checkout.
3. BLIK, MB Way, and Bizum APM buttons rendered alongside the card form.

== Changelog ==

= 2.0.0 =
* Changed: Plugin renamed to "Solidgate Subscription for WooCommerce" for WP.org compliance.
* Changed: Inline payment form via Solidgate SDK -- card fields render directly in checkout.
* Changed: Full WooCommerce HPOS compatibility.
* Added: APM support -- BLIK, MB Way, Bizum.
* Added: License and License URI headers.
* Added: readme.txt with full WP.org format.
* Added: Requires Plugins header.
* Fixed: Text domain updated to match plugin slug.
* Fixed: load_plugin_textdomain() removed (auto-loaded since WP 4.6).
* Fixed: All translators comments added to sprintf/__() calls.
* Fixed: Webhook nonce check suppressed with explanation (HMAC-verified server-to-server).
* Fixed: Slow DB query notices suppressed with explanation.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 2.0.0 =
Plugin renamed to `solidgate-subscription-for-woocommerce` for WP.org submission. Existing settings are unaffected. Deactivate the old plugin before installing this version.
