=== Duplo Checkout for WordPress ===
Contributors: duplo
Tags: woocommerce, payment gateway, checkout, payments, ecommerce
Requires at least: 6.2
Tested up to: 7.0
Stable tag: 0.1.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WooCommerce payment gateway for hosted Duplo Atlas Checkout with callback verification, return verification, and retry handling.

== Description ==

Duplo Checkout for WordPress adds a WooCommerce payment gateway for businesses using Duplo Atlas hosted checkout.

The plugin creates Duplo checkout sessions from WooCommerce, stores the checkout reference on the order, and verifies payment status before marking orders as paid.

Features include:

* Hosted checkout session creation from WooCommerce
* Browser return verification and server callback verification
* Scheduled verification retries with WP-Cron
* Redirect, modal, and inline launcher formats
* WooCommerce shortcode support with `[duplo_checkout]`
* WooCommerce Blocks checkout support

This plugin requires:

* WordPress 6.2 or newer
* WooCommerce
* PHP 7.4 or newer
* A Duplo Atlas account and API credentials

External service disclosure:

* This plugin connects to Duplo Atlas to create and verify hosted checkout sessions.
* When a merchant enables and configures the gateway, the plugin sends checkout-related order data to Duplo, including the billing first name, billing last name, billing email, currency, order total, merchant reference, and return URL required for payment processing.
* The plugin stores Duplo checkout references and verification payloads in WooCommerce order metadata for reconciliation and status updates.
* The plugin does not load third-party marketing scripts, tracking libraries, or remote checkout SDK assets on the storefront. Its bundled JavaScript is shipped locally with the plugin, and customers are sent to Duplo only when they begin payment.

Duplo service links:

* Duplo website: https://tryduplo.com/
* Duplo developer resources: https://developers.tryduplo.com/

For the latest Duplo legal and privacy information, review the Legal links published on the Duplo website.

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory or install it through the WordPress plugin screen.
2. Activate the plugin through the `Plugins` screen in WordPress.
3. Ensure WooCommerce is installed and active.
4. Go to `WooCommerce > Settings > Payments > Duplo`.
5. Enable `Duplo Checkout`.
6. Add your Duplo Atlas API key.
7. Copy the WooCommerce callback URL shown in the gateway settings screen.
8. Configure Duplo Atlas to send checkout callbacks to that URL.
9. Place a test order and confirm the return and callback flows update the WooCommerce order correctly.

== Frequently Asked Questions ==

= Does this plugin require a Duplo account? =

Yes. You need a Duplo Atlas account and valid API credentials to create hosted checkout sessions and verify payment status.

= What data is sent to Duplo? =

The plugin sends the order amount, currency, billing first name, billing last name, billing email, a merchant source reference, and the WooCommerce return URL needed to complete the hosted checkout flow.

= Does the plugin track users or load remote scripts? =

No marketing or analytics scripts are loaded by the plugin. The plugin ships its frontend JavaScript locally, uses server-to-server requests to Duplo API endpoints for payment session creation and verification, and sends customers to Duplo only when they choose to pay.

= How are Duplo callbacks secured? =

The webhook endpoint is public, so the plugin verifies each webhook's origin by looking up the payload source reference against the authenticated Duplo Atlas checkout API. A webhook is only processed when Atlas returns a matching checkout record for that source reference.

= How does the plugin verify payment status? =

The plugin verifies checkout status through Duplo return handling, server callbacks, and scheduled WP-Cron retries for active or processing checkouts.

== Changelog ==

= 0.1.1 =

* Initial public release candidate for WordPress.org packaging.
