=== 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.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A powerful WooCommerce payment gateway for manual payments with proof upload functionality, custom order statuses, and comprehensive admin management.

== Description ==

AfriDirect Payment Plugin is a complete solution for WooCommerce stores that accept manual payments (bank transfers, Zelle, PayPal, 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, 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, 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, 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. Payment method configuration
2. Payment form builder
3. Customer checkout with payment method selection
4. Order page with countdown timer and proof upload
5. Admin dashboard for reviewing proofs
6. Order review modal with proof preview
7. Receipt page

== Changelog ==

= 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.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.

