=== Chai Tip - UPI Tip Jar & Donation Button ===
Contributors: rohitdangar91
Tags: upi, tips, donations, support, india
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A tiny "support this blog" box for Indian creators. Visitors pay straight to your own UPI ID from any UPI app. No account, no KYC, no fees, no middleman.

== Description ==

Buy Me a Coffee and Ko-fi do not work well for Indian bloggers: payouts need PayPal or Stripe, and readers in India pay with UPI. Chai Tip is the simple, India-first answer.

* Readers tap a button and their own UPI app opens (GPay, PhonePe, Paytm, BHIM, any UPI app) with your UPI ID, name and amount already filled.
* On a computer, readers scan a QR code instead. The QR is drawn in the browser by this plugin, not by any outside service.
* The money moves directly between the reader's bank account and yours. This plugin is not a payment gateway and never sees, holds or charges the money.
* No account to create, no KYC, no commission, no fees. Your UPI ID is the only thing you enter.
* No jQuery, no tracking, no cookies, no external calls. One small stylesheet and script, loaded only on pages that show the tip box.
* Place it automatically after your posts, or by hand with the shortcode `[chai_tip]` or the block "Chai Tip".
* Suggested amounts (default ₹20 / ₹50 / ₹100) plus an optional custom amount field.
* Your own heading, message, button text and accent colour (8 presets or any custom colour). Hindi, Gujarati and other non-Latin text works everywhere.
* Optional: show your own QR image (the one from your UPI app) instead of the generated one.

= What a reader sees =

A small box under your post: "Like this post? Buy me a chai", a few amount chips and a "Tip with UPI" button. That is all.

= This plugin is not =

* Not a payment gateway. There is nothing to settle, reconcile or refund, because money never passes through the plugin or this website.
* Not for shops. For WooCommerce payments, use a UPI gateway plugin made for stores.

= Privacy =

This plugin does not collect data, set cookies or contact any external service. The QR code is generated locally in the reader's browser. The payment itself happens entirely inside the reader's own UPI app, under that app's own privacy policy.

UPI is a product of the National Payments Corporation of India (NPCI). This plugin is an independent project and is not made by, endorsed by or connected with NPCI or any UPI app.

== Installation ==

1. Upload the plugin and activate it.
2. Go to Settings > Chai Tip and enter your UPI ID (for example yourname@okhdfcbank - find it in any UPI app under your profile).
3. The tip box now appears after your posts. Or place it by hand with the shortcode `[chai_tip]` or the block "Chai Tip".

== Frequently Asked Questions ==

= Do I need a merchant account or KYC? =
No. Tips go to your personal UPI ID, exactly like a friend sending you money.

= Are there any fees? =
None from this plugin. Normal UPI transfers between people are free.

= How do I get the money? =
It lands in the bank account linked to your UPI ID, the moment the reader pays.

= Does the QR code use an external service? =
No. It is drawn in the reader's browser by a small bundled library (qrcode-generator by Kazuhiko Arase, MIT licence). Nothing is sent anywhere. If you upload your own QR image, that image is shown instead, straight from your own site.

= Does it work with Hindi or other Indian languages? =
Yes. Your heading, message, name and payment note can be in any script.

= Can I change the amounts? =
Yes. Set up to 4 suggested amounts, and switch the custom amount field on or off. Paise work too (for example Rs 1.50).

= Does the "Tip with UPI" button work with every UPI app? =
The plugin builds a standard upi:// payment link (and QR) with your UPI ID, name, note and amount. That link format is the NPCI standard and is tested for correctness. Opening it hands over to the visitor's own phone and UPI app, which is outside this plugin's control - we could not test every UPI app on every phone.

= What does uninstall remove? =
Only this plugin's own settings. Nothing else is touched.

== Screenshots ==

1. The tip box under a post, with amount chips and the UPI button.
2. The QR code view for readers on a computer.
3. The settings page: your UPI ID is the only thing you need.

== Changelog ==

= 0.1.4 =
* Invalid custom amounts now remove the payment link destination, leave the keyboard tab order, and block keyboard and programmatic click activation. Valid amounts and suggested chips restore the link.

= 0.1.3 =
* Fix: preset chip no longer stays highlighted while typing a custom amount.
* Fix: alignment of the Custom amount field with the amount chips on themes that do not style .screen-reader-text (e.g. Twenty Twenty-One); hardened the box CSS further against theme button and label styles.

= 0.1.2 =
* Box styling hardened so theme CSS cannot reshape the chips, amount field or button.

= 0.1.1 =
* Colour preset swatches plus the custom colour picker.
* Optional "use my own QR image" setting (media library picker).
* Amounts accept paise (for example Rs 1.50); invalid custom amounts show an inline error and pause the tip button and QR until fixed.
* A second copy of the box no longer appears when the block or shortcode is placed by hand on an auto-placement post type.
* An invalid UPI ID no longer wipes the saved one; a clear error is shown once.

= 0.1.0 =
* First release.

== Upgrade Notice ==

= 0.1.4 =
Closes keyboard activation of a stale payment amount while the custom amount is invalid.

= 0.1.3 =
Fixes Custom amount field alignment with the chips and further hardens box styling against theme CSS.
