=== AfriDirect Payment ===
Contributors: Afrirates
Tags: woocommerce, payment, manual payment, proof upload, bank transfer
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let customers pay by bank transfer, mobile money, Zelle or crypto, then upload proof. You review and approve. WooCommerce or standalone forms.

== Description ==

AfriDirect Payment Plugin is a complete solution for WooCommerce stores that accept manual payments (bank transfers, Zelle, PayPal, Venmo, Cash App, Wise, Payoneer, Skrill, mobile money, cryptocurrency, or custom methods). The plugin provides a seamless experience for both customers and store administrators.

= Key Features =

* **Multiple Payment Methods**: Support for bank transfers, Zelle, PayPal, Venmo, Cash App, Wise, Payoneer, Skrill, mobile money, cryptocurrency, and custom payment methods
* **Payment Forms Builder**: Create unlimited payment forms with different method combinations
* **Payment Methods Library**: Reusable payment method profiles with rich instructions, QR codes, and copy-to-clipboard fields
* **Proof Upload System**: Customers can upload payment proof (images or PDFs) with drag-and-drop interface
* **Custom Order Statuses**: Track orders through pending payment, proof uploaded, approved, rejected, and expired statuses
* **Countdown Timer**: Visual countdown showing payment deadline
* **Admin Dashboard**: Comprehensive review system for payment proofs with approve/reject functionality
* **Email Notifications**: Automated emails for all order status changes
* **Receipt Generation**: Automatic receipt number generation with year-based counters
* **HPOS Compatible**: Fully compatible with WooCommerce High-Performance Order Storage
* **Accessibility**: WCAG 2.1 AA compliant with keyboard navigation and screen reader support
* **Mobile Responsive**: Beautiful, mobile-first design

= How It Works =

1. Customer selects AfriDirect Payment Plugin at checkout
2. Customer chooses a payment method from available options
3. Order is created with pending payment status and countdown timer
4. Customer completes payment and uploads proof
5. Admin reviews proof in dashboard
6. Admin approves or rejects with notes
7. Customer receives email notification and receipt (if approved)

= Payment Methods Library =

Create reusable payment method profiles with:
* Method type (bank, PayPal, Zelle, Venmo, Cash App, Wise, Payoneer, Skrill, mobile money, crypto, custom)
* Type-specific fields (account numbers, emails, wallet addresses, etc.)
* Rich text instructions
* Optional QR code images
* Copy-to-clipboard fields

= Payment Forms Builder =

Build unlimited payment forms by:
* Selecting which payment methods to include
* Setting default timer duration
* Drag-and-drop method ordering
* Per-method timer overrides

= Security Features =

* Nonce verification on all forms
* Capability checks for admin functions
* Input sanitization and output escaping
* Secure file upload validation
* Access control for receipts

== Installation ==

= Automatic Installation =

1. Go to Plugins > Add New in your WordPress admin
2. Search for "AfriDirect Payment Plugin"
3. Click "Install Now" and then "Activate"

= Manual Installation =

1. Upload the `afridirect-payment` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to WooCommerce > Settings > Payments
4. Enable "AfriDirect Payment Plugin" payment gateway
5. Configure your payment methods and forms

= Configuration =

1. **Set Up Payment Methods**:
   - Go to WooCommerce > AfriDirect Payment Plugin > AfriDirect Methods
   - Add payment methods (bank accounts, PayPal emails, etc.)
   - Configure instructions and optional QR codes

2. **Create Payment Forms**:
   - Go to WooCommerce > AfriDirect Payment Plugin > AfriDirect Forms
   - Create forms and select which methods to include
   - Set timer durations and method order

3. **Configure Gateway**:
   - Go to WooCommerce > Settings > Payments > AfriDirect Payment Plugin
   - Select default payment form
   - Customize gateway title and description

4. **Review Orders**:
   - Go to WooCommerce > AfriDirect Payment Plugin
   - Review uploaded proofs
   - Approve or reject orders with notes

== Frequently Asked Questions ==

= What payment methods are supported? =

The plugin supports bank transfers, Zelle, PayPal, Venmo, Cash App, Wise, Payoneer, Skrill, mobile money, cryptocurrency, and custom payment methods. You can create unlimited payment method profiles.

= Can I customize the payment instructions? =

Yes! Each payment method supports rich text instructions, and you can include QR codes and copy-to-clipboard fields.

= How long do customers have to upload proof? =

You can set a default timer per payment form, and override it per payment method. The timer is displayed as a countdown on the order page.

= What file types are accepted for proof upload? =

Accepted formats: JPG, JPEG, PNG, WEBP, PDF. Maximum file size: 5MB.

= Is this plugin compatible with HPOS? =

Yes! AfriDirect Payment Plugin is fully compatible with WooCommerce High-Performance Order Storage (HPOS).

= Can customers re-upload proof if rejected? =

Yes, if an order is rejected, customers can upload a new proof file. The status will automatically update to "proof uploaded" for review.

= Are emails customizable? =

Yes, all emails use WooCommerce email templates and can be customized through WooCommerce > Settings > Emails.

= What happens if payment deadline expires? =

Orders automatically move to "expired" status, and customers receive an email notification. They can contact you to resolve the issue.

= Is the plugin accessible? =

Yes, the plugin follows WCAG 2.1 AA guidelines with keyboard navigation, screen reader support, and proper ARIA attributes.

== Screenshots ==

1. Dashboard: payment stats, proofs waiting for review and a setup checklist
2. Payment methods shown as cards, with account details you set once and reuse
3. Settings: turn on payments at checkout, set the name, message and payment form
4. Customer payment form (shortcode) with payment method selection
5. Payment pending page with countdown timer, payment details, copy buttons and proof upload
6. Reviewing WooCommerce payments: view the proof, then approve or decline
7. Printable payment receipt

== Changelog ==

= 1.3.1 =
* Clearer plugin description.

= 1.3.0 =
* New payment method types: Venmo, Cash App, Wise, Payoneer, Skrill and Mobile Money (M-Pesa, MTN MoMo, Airtel Money and more).

= 1.2.2 =
* Payment receipts now show your store name instead of a fixed plugin title.

= 1.2.1 =
* Fixed: the Payment Methods page showed "You do not have sufficient permissions" on sites without WooCommerce.

= 1.2.0 =
* New modern admin interface: branded header with tabs, a Dashboard with payment stats, a review queue and a setup checklist.
* New Settings page with a toggle for checkout, default payment form and data-removal option.
* Payment methods shown as cards; payments lists restyled with status pills and clear Approve/Decline buttons.
* Responsive admin screens for tablets and phones.
* Uninstall now also removes payment forms, payment records and plugin-created pages when "delete data on uninstall" is enabled.

= 1.1.2 =
* Fixed the Settings link on the Plugins page for sites without WooCommerce (it showed "not allowed to access this page").

= 1.1.1 =
* Added author link to the plugin header.

= 1.1.0 =
* First release on WordPress.org.

= 1.0.0 =
* Initial release
* Payment methods library
* Payment forms builder
* Proof upload system
* Custom order statuses
* Admin dashboard
* Email notifications
* Receipt generation
* HPOS compatibility
* Accessibility improvements
* Mobile-responsive design

== Upgrade Notice ==

= 1.3.0 =
Adds Venmo, Cash App, Wise, Payoneer, Skrill and Mobile Money payment method types.

= 1.2.2 =
Receipts now display your store name.

= 1.2.1 =
Fixes a permissions error on the Payment Methods page for sites without WooCommerce.

= 1.2.0 =
Redesigned admin dashboard and a new Settings page. No changes to checkout or stored data.

= 1.0.0 =
Initial release of AfriDirect Payment Plugin. Install and configure your payment methods and forms to get started.

== Development ==

= Contributing =

Contributions are welcome! Please ensure all code follows WordPress coding standards and includes proper security checks.

= Support =

For support, feature requests, or bug reports, please visit the plugin support forum.

== Credits ==

Built for WooCommerce stores that need flexible manual payment solutions with proof verification.

