=== PakiCheckout ===
Contributors: pakicheckout
Tags: woocommerce, payment gateway, pakicheckout, checkout, payments
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 1.2.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept US payments through PakiCheckout's hosted checkout. Seamlessly integrates with WooCommerce.

== Description ==

PakiCheckout for WooCommerce enables your online store to accept payments through PakiCheckout's secure hosted checkout experience. Customers are redirected to PakiCheckout to complete their payment, then returned to your store upon completion.

**Key Features:**

* Hosted checkout — customers pay on PakiCheckout's secure platform
* Automatic order status updates via webhooks
* Sandbox mode for testing before going live
* Refund support directly from WooCommerce
* Debug logging for troubleshooting
* Compatible with WooCommerce High-Performance Order Storage (HPOS)

**How It Works:**

1. Customer selects PakiCheckout at checkout
2. Customer is redirected to PakiCheckout's hosted payment page
3. After payment, the customer returns to your store
4. Order status is updated automatically via webhooks

== Installation ==

1. Upload the `pakicheckout` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to WooCommerce > Settings > Payments > PakiCheckout to configure.
4. Enter your API Key and Secret Key from your PakiCheckout Dashboard.
5. Set the Webhook URL in your PakiCheckout Dashboard to the URL shown on the settings page.
6. Enable the payment method and save changes.

**Sandbox Testing:**

1. Enable Sandbox Mode in the plugin settings.
2. Use your sandbox API credentials from the PakiCheckout Dashboard.
3. Process test transactions to verify the integration.
4. Disable Sandbox Mode and enter live credentials when ready to go live.

== Frequently Asked Questions ==

= Where do I get my API credentials? =

Log in to your PakiCheckout Dashboard at https://pakicheckout.com and navigate to Settings > API to find your API Key and Secret Key.

= How do I set up webhooks? =

In your PakiCheckout Dashboard, go to Settings > Webhooks and add the webhook URL shown on the plugin settings page. The URL follows this format: https://yourstore.com/wp-json/pakicheckout/v1/webhook

= Does this plugin support refunds? =

Yes. You can process full and partial refunds directly from the WooCommerce order screen. The refund will be sent to PakiCheckout for processing.

= Is sandbox mode available? =

Yes. Enable Sandbox Mode in the plugin settings and use your sandbox API credentials to test the integration without processing real payments.

= What currencies are supported? =

PakiCheckout currently supports USD payments. Additional currencies may be added in the future.

= Is this plugin compatible with WooCommerce HPOS? =

Yes. The plugin is fully compatible with WooCommerce High-Performance Order Storage (Custom Order Tables).

= Where can I find debug logs? =

Enable Debug Logging in the plugin settings, then view logs at WooCommerce > Status > Logs. Look for log files prefixed with "pakicheckout".

== Screenshots ==

1. Payment gateway settings page
2. Checkout page with PakiCheckout option
3. Connection test result
4. Order details with PakiCheckout payment info

== Changelog ==

= 1.2.4 =
* Improved HPOS compatibility
* Enhanced webhook signature verification
* Updated error handling for API responses
* Minor bug fixes and performance improvements

= 1.2.3 =
* Added duplicate webhook event detection
* Improved order lookup for webhook events
* Better handling of partial refunds

= 1.2.2 =
* Added connection test button on settings page
* Improved admin UI with status indicators
* Enhanced debug logging

= 1.2.1 =
* Fixed sandbox mode URL configuration
* Improved error messages for failed payments
* Added order key verification for webhooks

= 1.2.0 =
* Added refund support
* Added webhook secret verification
* Improved order notes with payment details
* Added sandbox/production URL configuration

= 1.1.0 =
* Added webhook handler for automatic order updates
* Improved checkout session data
* Added customer and shipping data to API requests

= 1.0.0 =
* Initial release
* Hosted checkout integration
* Basic payment processing
* WooCommerce payment gateway integration

== Upgrade Notice ==

= 1.2.4 =
Recommended update. Includes improved HPOS compatibility and enhanced security for webhook handling.
