=== PayXra for ProfilePress ===
Contributors: sharpwebtech
Tags: payxra, profilepress, payment gateway, stablecoin, usdt
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept stablecoins (USDT / USDC) and local fiat directly on ProfilePress checkout forms with zero chargebacks and automated NGN bank payouts.

== Description ==

[Website](https://payxra.africa) 

**PayXra for ProfilePress** is the official standalone WordPress payment gateway plugin connecting ProfilePress membership forms, course sales, and digital product checkouts directly to the PayXra payment infrastructure.

= Key Features =
* **0% Chargebacks:** Eliminate fraud and chargeback risks using instant stablecoin collections and verified bank transfers.
* **Stablecoin Support:** Accept USDT (BEP20, TRC20) and USDC seamlessly at checkout.
* **Direct NGN Bank Payouts:** Automatic local bank account settlement in Nigerian Naira (NGN).
* **Native ProfilePress Integration:** Hooks into ProfilePress checkout forms, activating subscriptions and memberships instantly upon payment verification.
* **HMAC-SHA256 Webhook Security:** Cryptographically signed webhook payloads with timing-safe verification and 300-second timestamp replay attack defenses.

== Installation ==

1. Upload the `payxra-profilepress` directory to your `/wp-content/plugins/` folder, or install directly via the WordPress Plugins menu.
2. Activate **PayXra for ProfilePress** through the 'Plugins' menu in WordPress.
3. Navigate to **ProfilePress > Settings > Payments > PayXra**.
4. Enter your **PayXra Merchant API Key** and **Webhook Secret Key** obtained from your PayXra Developer Dashboard.
5. Copy the displayed Webhook Endpoint URL (`https://your-domain.com/wp-json/payxra-pp/v1/webhook`) and save it in your PayXra Developer Portal.
6. Click **Save Changes** and run **Test PayXra Connection** to verify API connectivity.

== Frequently Asked Questions ==

= How does membership activation work? =
When a customer completes a payment on the PayXra payment overlay, PayXra sends a cryptographically signed webhook notification to your website. The plugin verifies the signature and instantly updates the ProfilePress order to 'Completed', activating the user's membership or course plan.

= Who pays the transaction processing fee? =
As the site administrator, you can configure the **Fee Bearer** under **ProfilePress > Settings > Payments > PayXra**. You can choose to bear the fee as a merchant or pass it onto the customer at checkout.

= Does this plugin support recurring subscriptions? =
Yes, PayXra for ProfilePress supports ProfilePress membership subscription checkouts and one-off plan payments.

== Screenshots ==

1. PayXra payment gateway listed and enabled under ProfilePress > Settings > Payments.
2. ProfilePress checkout form displaying PayXra (USDT / USDC / Local Fiat) as the selected payment method.
3. PayXra modal overlay displaying supported cryptocurrency selection options (Tether USDT, USD Coin USDC).
4. Dynamic crypto deposit address allocation modal with QR code, amount, copy address, and live polling.
5. ProfilePress order success page confirming completed order status after payment verification.

== External Services ==

This plugin relies on the external PayXra API service to initialize transactions, retrieve cryptocurrency exchange rates, allocate blockchain deposit addresses, and verify payment settlements.

- **Service Provider:** PayXra
- **API Base URL:** `https://api.payxra.africa/api/v1`
- **Data Sent:** Order totals, fiat currency type, transaction references, customer metadata (email, name, phone).
- **Service Terms:** [Terms of Service](https://payxra.africa/terms-of-service)
- **Privacy Policy:** [Privacy Policy](https://payxra.africa/privacy-policy)

== Changelog ==

= 1.0.4 =
* Fixed ProfilePress receipt URL redirect generation by passing order_key to ppress_get_success_url.
* Fixed subscription activation flow by invoking activate_subscription on ProfilePress SubscriptionEntity upon payment completion.

= 1.0.3 =
* Fixed subscription activation flow by invoking activate_subscription on ProfilePress SubscriptionEntity upon payment completion.

= 1.0.2 =
* Replaced external QR code API with 100% client-side local JS QR code rendering.
* Added EUR, GBP, and zero-amount minimum transaction validation checks.

= 1.0.1 =
* Fixed REST API permission callback for dynamic payment allocation and live order status verification.

= 1.0.0 =
* Initial release of PayXra for ProfilePress standalone payment gateway plugin.
