=== Datman Payment Gateway for WooCommerce ===
Contributors: datmanwps
Tags: payment, gateway, datman, woocommerce, credit card
Requires at least: 5.6
Tested up to: 7.0
Requires PHP: 7.4
WC requires at least: 3.0
WC tested up to: 9.0
Stable tag: 1.0.0
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Accept card payments on your WooCommerce store via Datman Pay — a secure hosted payment page.

== Description ==

The Datman Payment Gateway plugin integrates your WooCommerce store with the Datman Pay platform.
When a customer checks out, a secure payment link is created via the Datman API and the customer
is redirected to a hosted payment page. On completion, they are returned to your store and the
order status is updated automatically via webhook.

== Installation ==

1. Upload the plugin folder to /wp-content/plugins/
2. Activate the plugin via the WordPress Plugins menu
3. Go to WooCommerce → Settings → Payments and click "Datman Pay"
4. Fill in your API Token, Merchant Domain, Merchant ID, and Account Email
5. Copy the Webhook URL shown in the settings and paste it into your Datman merchant portal
6. Save changes and enable the gateway

== Configuration ==

= API Credentials =
All credentials are available in your Datman merchant portal.

* API Token       – Your Datman API token
* Merchant Domain – e.g. xyz-business.com
* Merchant ID     – Your numeric merchant ID
* Account Email   – The email address tied to your Datman account

= Payment Settings =
* Payment Link Expiry – How many hours the generated link remains valid (default 24)

= Webhook =
Copy the displayed webhook URL into your Datman portal so that payment status updates
are sent back to your store automatically.

== Frequently Asked Questions ==

= Do I need a Datman merchant account? =
Yes. This plugin requires an active Datman Pay merchant account. Visit https://datman.je to get started.

= Where do I find my API Token and Merchant ID? =
Both are available in your Datman merchant portal.

= What happens if the webhook is not received? =
The order will remain in "Pending payment" status. The thank-you page automatically polls for up to 2 minutes and shows a fallback message if no confirmation arrives. Admins can also update the order status manually from the WooCommerce Orders screen.

= Is customer payment data stored on my server? =
No. Customers are redirected to a Datman-hosted payment page. Card details never pass through your WordPress site.

== Screenshots ==

1. The Datman Pay settings screen in WooCommerce (Payments tab).
2. The payment method displayed at checkout.

== External Services ==

This plugin connects to the Datman Pay API to generate hosted payment links.
The following data is transmitted when a customer checks out: order amount, customer
name, customer email address, billing phone number, and WooCommerce order ID.

API endpoint: https://payments.datmanpay.com

This service is operated by Datman (https://datman.je).

* Privacy Policy: https://datman.je/privacy-policy/
* Terms of Service: https://datman.je/wp-content/uploads/2024/10/My-Pay-Limited-Terms-Conditions-of-Business-as-per-PP-Manual.pdf

No data is sent to external servers unless a customer completes checkout using this gateway.

== Changelog ==

= 1.0.0 =
* Initial release
