=== Nass Payment Gateway for WooCommerce ===
Contributors: nasspayment
Donate link: https://nass.iq/
Tags: woocommerce, payment, gateway, iraq, nass
Requires at least: 5.8
Tested up to: 6.9
Stable tag: 1.1.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Accept payments securely via Nass Payment Gateway in your WooCommerce store. A reliable payment solution for businesses in Iraq.

== Description ==

Nass Payment Gateway for WooCommerce enables Iraqi businesses to accept secure online payments through WooCommerce.

= Features =

* **Secure Payments** - PCI DSS compliant payment processing
* **Easy Setup** - Simple configuration through WooCommerce settings
* **WooCommerce Blocks Support** - Works with both classic and block-based checkout
* **Automatic Order Updates** - Orders are automatically updated when payment is confirmed
* **Webhook Support** - Real-time payment notifications
* **Multi-currency** - Support for Iraqi Dinar (IQD) and other currencies
* **Refund Support** - Process refunds through the Nass dashboard

= Requirements =

* WordPress 5.8 or higher
* WooCommerce 7.0 or higher
* PHP 7.4 or higher
* SSL certificate (HTTPS)
* Nass merchant account

= Third-Party Service =

This plugin connects to the Nass Payment Gateway API to process payments. When a customer makes a payment:

* **Service Provider:** Nass Payment Gateway
* **Service Website:** [https://nass.iq/](https://nass.iq/)
* **Data Sent:** Order details (amount, currency, order ID), customer billing information (name, email, phone) required for payment processing
* **When Data is Sent:** During checkout when customer initiates payment, and when receiving webhook notifications for payment status updates
* **Privacy Policy:** [https://nass.iq/privacy-policy](https://nass.iq/privacy-policy)
* **Terms of Service:** [https://nass.iq/terms-of-service](https://nass.iq/terms-of-service)

= Getting Started =

1. Install and activate the plugin
2. Go to WooCommerce → Settings → Payments → Nass Payment Gateway
3. Enter your merchant credentials provided by Nass
4. Select your environment (UAT for testing, Production for live)
5. Save changes and start accepting payments!

== Installation ==

= Automatic Installation =

1. Log in to your WordPress admin panel
2. Go to Plugins → Add New
3. Search for "Nass Payment Gateway"
4. Click "Install Now" and then "Activate"

= Manual Installation =

1. Download the plugin ZIP file
2. Log in to your WordPress admin panel
3. Go to Plugins → Add New → Upload Plugin
4. Choose the ZIP file and click "Install Now"
5. Activate the plugin

= Configuration =

1. Go to WooCommerce → Settings → Payments
2. Click on "Nass Payment Gateway"
3. Enable the gateway and enter your credentials
4. Configure additional settings as needed
5. Save changes

== Frequently Asked Questions ==

= Do I need a Nass merchant account? =

Yes, you need to register for a merchant account with Nass to obtain your API credentials.

= Is this plugin secure? =

Yes, the plugin follows WordPress and WooCommerce security best practices. All sensitive data is transmitted securely via HTTPS.

= Does it support WooCommerce Blocks checkout? =

Yes, the plugin fully supports both the classic checkout and the new WooCommerce Blocks-based checkout.

= What currencies are supported? =

The plugin primarily supports Iraqi Dinar (IQD) but can be configured for other currencies supported by Nass.

= How do I test the integration? =

Use the UAT (testing) environment with test credentials provided by Nass before switching to production.

== Screenshots ==

1. Payment gateway settings page
2. Checkout page with Nass payment option
3. Payment redirect page
4. Order confirmation

== Changelog ==

= 1.0.6 =
* Fixed: Payment return verification now works correctly when Nass redirects without order key
* Security: Added Nass order ID matching verification as alternative to order key

= 1.0.5 =
* Security: Removed HEREDOC/NOWDOC syntax for code scanner compatibility
* Security: Removed file_put_contents - JS file now shipped with plugin instead of generated
* Security: Webhook endpoint now requires token configuration (mandatory)
* Security: Payment return handler now always verifies via API before confirming payment
* Security: Order key validation is now mandatory for payment returns
* Security: Added payment method verification on return handler

= 1.0.4 =
* Security: Removed debug logging of sensitive request data
* Security: Converted inline scripts and styles to use wp_enqueue
* Security: Improved webhook endpoint security validation
* Added: Requires Plugins header for WooCommerce dependency
* Added: Third-party service disclosure documentation
* Fixed: Text domain updated to match plugin slug

= 1.0.3 =
* Fixed: Failed payment redirect issue
* Fixed: Plugin/Author URI validation
* Fixed: WordPress coding standards compliance

= 1.0.2 =
* Added WooCommerce Blocks checkout support
* Improved webhook handling
* Added Check Status button for manual verification
* Fixed order status updates
* Security improvements and code optimization

= 1.0.1 =
* Improved error handling
* Added debug logging
* Fixed redirect issues

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.2 =
This version adds WooCommerce Blocks support and improves payment status handling. Recommended for all users.

== Additional Info ==

For support, please contact Nass Payment Solutions or visit https://nass.iq/

= Privacy =

This plugin sends payment data to Nass payment servers for processing. Please review Nass's privacy policy for information about how payment data is handled.
