=== BitPal Donate ===
Contributors: bitpalpro, hosseindehnavi
Tags: donations, donate, cryptocurrency, payments, shortcode
Requires at least: 6.2
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 USDT cryptocurrency donations through BitPal with configurable amounts, a shortcode and an optional Elementor widget.

== Description ==

BitPal Donate connects your WordPress site to [BitPal](https://bitpal.pro/) for USDT donation checkout. Visit [bitpal.pro](https://bitpal.pro/) to create a merchant account and learn about the payment service.

BitPal Donate adds a secure, responsive donation form to any WordPress site:

* Fixed and custom donation amounts with a configurable minimum.
* Currency symbol, form title, description, success message and button label are all configurable.
* USDT cryptocurrency checkout through the BitPal payment service (TRC20, ERC20 or BEP20).
* Donation transactions are recorded privately in the admin area for review.
* An Elementor widget is included; Elementor is optional and not required.
* Frontend and admin strings are translation-ready.

== Usage ==

1. Upload the bitpal-donate folder to wp-content/plugins/ and activate the plugin.
2. Configure Settings > BitPal Donate.
3. Add [bitpal_donate] to any page, or use the BitPal Donate Elementor widget.

For extra security, the API key and webhook secret can be defined in wp-config.php with the BITPAL_DONATE_API_KEY and BITPAL_DONATE_WEBHOOK_SECRET constants; they then override the stored settings. Never place API keys or webhook secrets in the frontend.

== External service ==

This plugin connects to the BitPal payment service (https://bitpal.pro) to process USDT cryptocurrency donations. The service is used when a donor submits the donation form.

Data sent to BitPal, from your server, when a donation is started:

* The donation amount, rounded to two decimal places, and the USDT currency. The configurable currency symbol affects display only; the gateway always receives USDT.
* The selected network (TRC20, ERC20 or BEP20).
* A generated order reference used to match the payment later.
* The donor's optional message, as the payment description.
* The payment page language (English, Persian or Arabic). Selecting Turkish currently uses the English payment page.
* Your site's webhook callback URL.

The donor's name and email address are validated on your site but are not stored by this plugin or sent to BitPal. Other plugins using the payment filter can access the submitted donor data. Requests are authenticated with the BitPal API key you configure in the settings.

BitPal also sends webhook notifications to your site when a payment status changes. Each notification is verified with the webhook secret you configure before any data is stored.

Terms of service: https://bitpal.pro/legal/terms
Privacy policy: https://bitpal.pro/legal/privacy

Webhook notifications record provider observations only; they do not mark a donation as paid. No manual status-review interface is included.

== Payment integration ==

Connect an existing payment client with the `bitpal_donate_create_payment` filter. The filter receives the donor data and should return a payment result. For a hosted gateway redirect, return `['status' => 'created', 'redirect_url' => 'https://...']`; the frontend will redirect the donor to that URL after the server-side validation succeeds. No provider assumptions are made.

== Theme compatibility ==

The frontend styles are scoped under `.bitpal-donate`, inherit the active theme font and text color, and consume WordPress preset variables such as `--wp--preset--color--primary` and `--wp--custom--border-radius--medium` when available. The wrapper class can be extended with the `bitpal_donate_wrapper_class` filter.

== Translations ==

All PHP and frontend strings use the `bitpal-donate` text domain and follow the WordPress site locale. English is the default language. Translations are managed through translate.wordpress.org, so translation files are not bundled with the plugin.

== Changelog ==

= 1.0.0 =
* Initial release.
