=== Nomba for WooCommerce ===
Contributors: duro
Tags: payments, nomba, duro, nigeria, checkout, refunds
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept card, bank transfer, and USSD payments through Nomba or Duro hosted checkout, with signed webhook confirmation and refunds.

== Description ==

This plugin adds two independent payment gateways: Nomba and Duro. Either or
both can be enabled at the same time.

Nomba for WooCommerce adds Nomba as a payment method. Shoppers are redirected to
Nomba hosted checkout and returned to the store after paying. Payment is
confirmed two ways: the plugin re-verifies the transaction with the Nomba API
when the shopper returns, and when Nomba sends a signed payment_success
webhook, the plugin checks the signature and then re-verifies that same
transaction with the Nomba API before completing the order, so the API
response, not the webhook payload, is what grants value. Full and partial
refunds run from the WooCommerce order screen. A test mode switches the
plugin to the Nomba sandbox.

Duro for WooCommerce adds Duro as a second, independent hosted-redirect
payment method with saved cards and recovery. Shoppers are redirected to
Duro hosted checkout and returned to the store after paying. Payment is
confirmed two ways: the plugin re-verifies the session with the Duro API when
the shopper returns, and when Duro sends a signed checkout_completed webhook,
the plugin checks the duro-signature header and then re-verifies that same
session with the Duro API before completing the order. Duro checkouts are
one-off and create no refundable invoice, so refunds are not offered for
Duro; use the Nomba gateway when refunds are required.

== Installation ==

1. Upload the plugin zip via Plugins, Add New, Upload Plugin, then activate it.
2. Open WooCommerce, Settings, Payments.

= Nomba =

3. Open the Nomba payment method. Enter the Account ID, Client ID, and Client
   secret from the Nomba dashboard (dashboard.nomba.com, API Keys). Use the
   parent (business) Account ID; a sub-account ID is rejected at
   authentication. Test keys work with test mode on.
4. Enter the Webhook signature key from the dashboard webhook settings.
   Optionally set a Sub-account ID to deposit payments into a sub-account.
5. In the Nomba dashboard, set the webhook URL to
   https://your-store.example/wp-json/nomba/v1/webhook
6. Enable the gateway and save.

= Duro =

3. Open the Duro payment method. Enter the Secret key from the Duro dashboard
   (Developers, API keys); a sk_test_ key selects the sandbox and a sk_live_
   key selects live, and the Checkout base URL (default
   https://pay.useduro.com).
4. Enter the Webhook signing secret from the registered Duro webhook endpoint.
5. Register a webhook endpoint in the Duro dashboard pointing at
   https://your-store.example/wp-json/duro/v1/webhook
6. Enable the gateway and save.

== Frequently Asked Questions ==

= Why is an order on hold? =

The amount or currency the gateway reported did not match the order. Review
the order notes and the Nomba or Duro dashboard before fulfilling.

= Why can I not refund an order? =

For Nomba, refunds need the Nomba transaction id, which is recorded when the
payment is confirmed by webhook or return verification. If it is missing,
confirm the payment first.

Duro does not support refunds through this plugin. A one-off Duro checkout
creates no refundable invoice, so there is nothing for the Duro API to refund
against.

== Changelog ==

= 1.0.0 =
* Nomba: hosted checkout, signed webhook confirmation with replay protection,
  return-path verification, full and partial refunds, sandbox test mode.
* Duro: hosted checkout, signed webhook confirmation with replay protection,
  return-path verification. No refunds (one-off checkouts have no
  refundable invoice).
