=== Mega Backing ===
Contributors: megabacking, m-khaled
Tags: donate, donation, tips, stripe, fundraising
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 1.0.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A social donation and tipping plugin powered by Mega Backing. Scrollable gift cards, live shoutouts, confetti, and Stripe Connect.

== Description ==

Mega Backing is a free WordPress plugin that connects your website to the **Mega Backing donation platform**. It lets charities, content creators, influencers, and anyone raising funds collect donations or tips from their audience in a fun, social, and engaging way.

**How it works:** This plugin is the WordPress connector for the Mega Backing platform. When a donor gives, their payment is processed through Stripe (connected to your own Stripe account via Mega Backing's Stripe Connect platform). The Mega Backing platform charges a **2.5% service fee** on each successful transaction — this is how the platform is maintained and kept free for site owners to install and use. There is no monthly subscription or setup fee.

**Key Features:**

* **Stripe Connect** — One-click onboarding. Connect your own Stripe account and start accepting payments.
* **Scrollable Gift Cards** — Horizontally scrollable donation tier cards with emoji labels.
* **One-Off and Monthly Donations** — Both payment types supported.
* **Live Shoutout Wall** — Donors can leave public messages (with GIFs) that appear like a live chat feed.
* **Slot Machine Spin** — Optional gamification: a spin wheel that randomly selects a donation amount.
* **20 Pre-Built Themes** — Dark Gaming, Pop, Beige Aesthetic, Glassmorphic, Patriotic UK, Patriotic USA, Ocean Deep, Forest Green, Golden Sunset, Rose Gold, Midnight Luxe, Clean Minimal, Coral Summer, Cyberpunk Neon, Vintage Retro, Soft Pastel, Luxury Black & Gold, Deep Tech, Autumn Harvest, Cherry Blossom.
* **Custom Theme Builder** — Choose your own colours, fonts, and border radius.
* **Hero Media** — Add an image or video above the donation cards.
* **Donation Goal Bar** — Optional progress bar. Resettable.
* **Confetti & Floating Hearts** — Animations on tier selection and successful payment.
* **Fee Coverage** — Let donors optionally cover transaction fees.
* **Profanity Filter** — Automatically sanitises shoutout messages.
* **GIF Support** — Donors can attach GIPHY GIFs to their shoutouts (requires free GIPHY API key).
* **Email Templates** — Editable confirmation email for donors and notification for site owners.
* **Reports Dashboard** — View all donations by date, filter by status, download as CSV.
* **GDPR Compliant** — Configurable data retention. Integrates with WordPress Privacy Tools.
* **Shortcode + Gutenberg Block** — `[mega_backing]` (button) or `[mega_backing_full]` (embedded panel).

**Designed for:**
* Small charities and nonprofits
* Content creators and influencers
* Freelancers and consultants
* Anyone collecting tips or appreciation payments from their audience

== Installation ==

1. Upload the `mega-backing` folder to `/wp-content/plugins/`.
2. Activate the plugin via **Plugins → Installed Plugins**.
3. Navigate to **Mega Backing → Stripe Connect** and click **Connect with Stripe**.
4. Follow the Stripe onboarding to connect your account to the Mega Backing platform.
5. Customise your donation tiers, theme, and emails.
6. Add `[mega_backing]` to any page or post to display the donation button.

== Frequently Asked Questions ==

= What does Mega Backing charge? =
The Mega Backing platform charges a **2.5% service fee** on each successful transaction, collected automatically via Stripe Connect. This fee supports the maintenance of the platform. Stripe's own processing fees also apply (e.g. 2.9% + $0.30 in the US; 1.5% + £0.20 in the UK). There is no monthly subscription or setup cost.

= Do I need a Stripe account? =
Yes. You need a free Stripe account to accept payments. Mega Backing guides you through connecting it during setup.

= Can donors cover the fees? =
Yes. You can enable a "Cover transaction fees" checkbox. When ticked, the amount is silently grossed up so you receive the full original donation.

= Are monthly donations supported? =
Yes. Monthly recurring donations use Stripe Subscriptions. Donors receive a cancellation link in their confirmation email.

= Is the plugin GDPR compliant? =
Yes. Personal data is stored with a configurable retention period (default 7 years for financial records). Anonymisation runs automatically on a daily cron. The plugin integrates with WordPress's built-in data export and erasure tools.

= What is the Mega Backing relay server? =
The relay server is part of the Mega Backing platform infrastructure. It handles the one-time Stripe Connect OAuth authorisation flow — specifically exchanging an authorisation code for your Stripe account credentials. No payment data passes through it.

= Can I add GIFs to shoutouts? =
Yes. Enable GIF support in General settings and enter a free GIPHY API key (available at developers.giphy.com). Note that search queries will be sent to GIPHY's servers when donors search for GIFs.

= Where can I put the donation button? =
Use `[mega_backing]` for a button that opens a modal, or `[mega_backing_full]` for a full embedded panel. A Gutenberg block is also available.

== Screenshots ==

1. Donation modal with Dark Gaming theme — scrollable gift cards and shoutout wall
2. Admin General Settings — tiers, goal bar, shoutouts, fee coverage
3. Theme Picker — 20 pre-built themes
4. Stripe Connect page — one-click onboarding
5. Reports Dashboard — donations, stats, and CSV export
6. Slot Machine spin feature — gamified amount selection

== Pricing ==

Mega Backing is **free to install and use**. The Mega Backing platform charges a **2.5% service fee** on each successful donation processed through the plugin. This fee is deducted automatically via Stripe Connect — there is nothing to pay upfront and no monthly subscription. Stripe's own processing fees are separate and vary by country (e.g. 2.9% + $0.30 in the US; 1.5% + £0.20 in the UK).

== External Services ==

This plugin connects to the following external services. By activating and using this plugin you agree to the terms and privacy policies of each service listed below.

= Stripe =
Used to process donation payments. Card details are collected by Stripe.js (loaded from Stripe's CDN) and sent directly to Stripe's servers. Donor payment information never touches your WordPress server. Stripe also handles monthly subscription billing and platform fee collection.

* Data sent: payment details, donor email (for receipt), donation amount and currency.
* Service URL: https://stripe.com
* Privacy Policy: https://stripe.com/privacy
* Terms of Service: https://stripe.com/ssa

= Mega Backing Platform =
The Mega Backing platform handles Stripe Connect account authorisation and collects the 2.5% service fee on each transaction via Stripe Connect application fees. When you click "Connect with Stripe", you are redirected to Stripe and then back through the Mega Backing relay server, which exchanges the authorisation code for your Stripe account credentials. The relay server does not process, store, or have access to any donor payment data — it is only involved in the one-time account connection step.

* Data sent during setup: Stripe OAuth authorisation code (one-time only).
* Data sent on each transaction: 2.5% service fee collected by Stripe on behalf of Mega Backing.
* Relay URL: https://megabacking.com/relay/
* Privacy Policy: https://megabacking.com/privacy

= GIPHY =
Used for GIF search in the optional shoutout section. GIF search is **disabled by default** and only activates when a free GIPHY API key is entered in plugin settings. When a donor searches for a GIF, their search query is sent to GIPHY's API.

* Data sent: GIF search query text.
* Only active when: GIF feature is enabled AND a GIPHY API key has been configured in Mega Backing → General settings.
* Service URL: https://giphy.com
* Privacy Policy: https://support.giphy.com/hc/en-us/articles/360032872931

= Google Fonts =
Used to load custom fonts when the Custom Theme Builder is enabled and a Google Font is selected in Mega Backing → Appearance. The font name is sent to Google's servers to retrieve the font stylesheet. This only occurs on the frontend when a visitor views a page containing the donation widget and a custom Google Font has been configured.

* Data sent: Font family name (no personal data).
* Only active when: Custom Theme Builder is enabled AND a Google Font name is entered in appearance settings.
* Service URL: https://fonts.google.com
* Privacy Policy: https://policies.google.com/privacy

== Privacy ==

Mega Backing stores the following personal data when a donation is made:

* Donor name and email address — used for confirmation emails and shoutout display.
* Donation amount, currency, and Stripe transaction IDs — stored for financial reporting.
* Optional message/shoutout text and GIF URL — displayed publicly on the shoutout wall if submitted.

Personal data is automatically anonymised after the retention period configured in **Mega Backing → Privacy** (default: 7 years, in line with standard financial record-keeping requirements). Data can be exported or erased via **Tools → Export/Erase Personal Data**.

No personal data is shared with the Mega Backing relay server. Payment data is handled entirely by Stripe.

== Changelog ==

= 1.0.3 =
* Fixed a bug where the Stripe Connect OAuth callback checked for the wrong query parameter on the relay redirect, causing the connection to always silently fail and report as "Not Connected" even after completing the Stripe authorisation flow. The account now connects and saves correctly on the first attempt.

= 1.0.2 =
* Plugin Check / PHPCS pass: added a missing translators comment, clarified intentionally-unversioned third-party CDN script enqueue, and annotated remaining direct-database-query exceptions on the custom donations table; trimmed short description and tag list to meet WordPress.org readme limits.

= 1.0.1 =
* Internal code review fixes ahead of initial WordPress.org release: renamed all functions, classes, defines, and options to use a unique plugin-specific prefix; added per-field sanitisation for all settings; hardened inline CSS output.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.3 =
Fixes a bug that prevented Stripe Connect from completing successfully. Please reconnect your Stripe account after updating.

= 1.0.2 =
Code-quality pass following WordPress.org Plugin Check review. No functional changes.

= 1.0.1 =
Internal naming and sanitisation fixes ahead of first public release.

= 1.0.0 =
Initial release. No upgrade needed.
