=== PagaPay ===
Contributors: pagapay
Tags: woocommerce, payments, gateway, checkout, blocks
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

PagaPay is a WooCommerce payment gateway compatible with classic checkout, block-based checkout, and High-Performance Order Storage (HPOS).

== Description ==

PagaPay is a payment gateway for WooCommerce that redirects customers to a secure external checkout and confirms payments via webhooks.

Main features:

* Compatible with classic checkout and WooCommerce Blocks.
* Supports High-Performance Order Storage (HPOS).
* Integration via external REST API.
* Webhook support for payment confirmation.
* Automatic order status management (pending, processing, failed).
* Webhook event logging and tracking.
* Simple configuration from the WooCommerce admin panel.

Payment flow:

1. The customer places an order in WooCommerce.
2. The customer is redirected to the PagaPay external checkout.
3. The payment is processed.
4. PagaPay sends a webhook to your store.
5. WooCommerce automatically updates the order status.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin from the "Plugins" menu in WordPress.
3. Go to WooCommerce → Settings → Payments.
4. Enable "PagaPay".
5. Configure your credentials (API Key, Secret Key, API Endpoint, and Merchant Code).

== Configuration ==

After activating the plugin:

1. Go to WooCommerce → Settings → Payments → PagaPay.
2. Enter:
   * API Key
   * Secret Key
   * API Endpoint
   * Merchant Code
   * Enable the checkbox "Enable this payment method"
3. Save changes.

== Frequently Asked Questions ==

= Is this plugin compatible with WooCommerce Blocks? =

Yes, the plugin is fully compatible with block-based checkout.

= Does it support HPOS? =

Yes, it is compatible with High-Performance Order Storage.

= Can it be used in sandbox mode? =

Yes, you can configure test endpoints.

= What happens if the payment fails? =

The order will be automatically marked as "failed".

= Where are logs stored? =

Logs are stored using the WooCommerce logging system.

== Screenshots ==

1. Payment method configuration in WooCommerce.
2. Checkout using PagaPay.
3. Example of a processed order.

== Changelog ==

= 1.0.0 =
* Initial release.
* Classic checkout support.
* Blocks support.
* HPOS compatibility.
* Webhook implementation.

== Upgrade Notice ==

= 1.0.0 =
Initial release.

== License ==

This plugin is licensed under the GPLv2 or later.