=== VaultsPay Payment Gateway ===
Contributors: vaultspay
Tags: woocommerce, payment gateway, vaultspay, checkout, credit card
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept payments via VaultsPay directly in your WooCommerce store — secure, fast, and easy to configure.

== Description ==

VaultsPay Payment Gateway integrates the VaultsPay Electronic Payment Gateway (EPG) with your WooCommerce store. Once configured, customers can pay at checkout using any payment method supported by your VaultsPay merchant account.

**Key Features:**

* One-click merchant authentication using your Client ID and Client Secret
* Automatic schema-code discovery — the plugin queries the VaultsPay API in real time when you configure the channel name and currency
* Compatible with the WooCommerce Block-based Checkout (as well as the classic shortcode checkout)
* Server-to-server callback (webhook) support so orders update even if the customer closes the browser
* All HTTP communication uses the WordPress HTTP API — no raw cURL required
* Translations-ready with a standard `.pot` file included

**Requirements:**

* WordPress 6.0 or later
* WooCommerce 6.0 or later
* A live or sandbox VaultsPay merchant account — [sign up at vaultspay.ae](https://vaultspay.ae/)

== Installation ==

= Automatic installation =

1. Log in to your WordPress admin panel.
2. Navigate to **Plugins → Add New**.
3. Search for *VaultsPay Payment Gateway*.
4. Click **Install Now**, then **Activate**.

= Manual installation =

1. Download the plugin ZIP file.
2. In your WordPress admin panel, go to **Plugins → Add New → Upload Plugin**.
3. Choose the downloaded ZIP and click **Install Now**, then **Activate**.

= Configuration =

1. After activation, navigate to **WooCommerce → Settings → Payments**.
2. Click **Manage** next to *VaultsPay Payment Gateway*.
3. Fill in your **EPG URL**, **Client ID**, **Client Secret**, **Channel Name**, and **Currency**.
4. Schema codes are auto-populated once you enter a valid channel name and currency — select the ones applicable to your account.
5. Click **Save changes**.

== Frequently Asked Questions ==

= Where do I find my Client ID and Client Secret? =

Log in to your VaultsPay merchant account and navigate to **Dashboard → Header → API Keys**. Your Client ID and Client Secret are displayed there.

= What currencies are supported? =

The plugin currently supports AED, USD, and EUR. Additional currencies can be requested through VaultsPay support.

= Does this plugin support the WooCommerce Block Checkout? =

Yes. The plugin declares full compatibility with the WooCommerce Cart & Checkout Blocks feature.

= Is a VaultsPay account required? =

Yes. You need a VaultsPay merchant account to use this plugin. Visit [vaultspay.ae](https://vaultspay.ae/) to register.

= What happens if the customer closes the browser before being redirected back? =

The plugin registers a server-to-server callback (webhook) URL with VaultsPay. When VaultsPay confirms the payment, it calls this URL directly and the order status is updated regardless of whether the customer returned to the site.

= Is my Client Secret stored securely? =

The Client Secret is stored in the WordPress database using WooCommerce's standard options table, the same way all WooCommerce gateway credentials are stored. It is never written to order meta or transmitted to the browser.

== Screenshots ==

1. Payment gateway settings screen — enter your VaultsPay merchant credentials here.
2. Schema code multiselect — auto-populated after entering a valid channel name and currency.
3. VaultsPay hosted payment page — customers are redirected here to complete payment.
4. WooCommerce order details — showing the VaultsPay payment ID and status.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release. No upgrade steps required.
