=== Halfborg QR Payments for PayNow for WooCommerce ===
Contributors: alexhalfborg
Tags: paynow, singapore, woocommerce, payment-gateway, qrcode
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.50
WC tested up to: 10.8.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept Singapore PayNow payments in WooCommerce with dynamic QR codes. Free and fully functional, with no order limits.

== Description ==

Simplify payments, build trust, and get paid faster with Singapore's favourite payment method.

Halfborg QR Payments for PayNow for WooCommerce is the hassle-free way to accept Singapore's trusted PayNow payment method in your WooCommerce store. At checkout, the plugin generates a dynamic PayNow QR code — pre-filled with the payment amount, your PayNow mobile number, and the WooCommerce order number — that customers scan with any Singapore banking app to pay you directly.

PayNow is the go-to payment method for millions of Singaporeans, and this plugin lets you tap into it in minutes.

= Free and Premium =

The free plugin is **fully functional with no order or value limits** — accept unlimited PayNow payments to your registered mobile number, show the QR on the order-received page, and **embed the PayNow QR directly in order-confirmation emails**.

**Premium** (a separate licensed upgrade, sold via Freemius) adds features for businesses that want more:

- Accept by **business UEN** with your business name shown on the QR code, and **VPA** recipients (e.g. GRAB, DASH).
- **Reports &amp; analytics** — PayNow orders by status, paid vs awaiting payment, time to confirm, flagged issues, and a payment-method report across all gateways, with CSV export.
- **Reconciliation** — confirm or flag PayNow orders as paid from a dedicated screen (single and bulk actions).

You never need Premium to accept PayNow — the free plugin is complete on its own.

= Why merchants choose this plugin =

- No commissions: customer payments go directly to your bank account.
- Instant confirmation: your bank notifies you (usually by SMS) the moment a payment arrives, so you can fulfil right away.
- Easy reconciliation: each payment carries the WooCommerce order number, so you always know which payment belongs to which order.
- Familiar for customers: they pay with their own banking app (DBS digibank, OCBC, UOB TMRW, and more).
- Works everywhere: the QR code displays cleanly on desktop, laptop, and mobile, and is also emailed to the customer so they can pay at their convenience.

= Why this instead of Stripe? =

Stripe can also accept PayNow and offers deeper automation, but it takes a commission on every transaction and holds your funds before paying out. With this plugin there are no commissions — the money goes straight to your bank account, and every transaction is tagged with the WooCommerce order number for easy tracking.

= How it works =

1. The customer chooses PayNow at checkout. The plugin generates a dynamic PayNow QR code pre-filled with the amount, your PayNow mobile number, and the order number.
2. The customer scans the QR code with their banking app and pays.
3. Your bank confirms the payment (most send an SMS), and you mark the order as paid. (Premium adds a dedicated PayNow Reconciliation page for confirming and flagging orders, with single and bulk actions.)

(Premium adds business UEN and VPA recipients.)

= Who it's for =

Singapore-based WooCommerce stores of any size — small business owners, freelancers, and established e-commerce sellers who sell to Singaporean customers.

= Key features (free) =

- Quick setup: get started in under 5 minutes, no coding — just add your PayNow mobile number.
- Unlimited PayNow payments by mobile number, with no monthly order or value cap.
- Customisable QR size, colour, and the on-screen instructions shown to customers.
- QR code on the order-received page.
- WooCommerce checkout blocks support.

= Premium adds =

- Business UEN recipients (with your business name on the QR) and VPA suffixes (e.g. GRAB, DASH).
- Reports &amp; analytics with CSV export (PayNow status breakdown plus an all-gateways payment-method report).
- PayNow Reconciliation page to confirm, flag, and unflag orders as paid (single and bulk actions).

== Requirements ==

- WordPress 6.0 or higher
- WooCommerce (7.0.2 or higher recommended)
- PHP 7.4 or higher
- Store currency set to Singapore Dollar (SGD)
- A mobile number registered for PayNow with your bank (business UEN/VPA recipients are available in Premium)

== Installation ==

From your WordPress dashboard:

1. Go to Plugins → Add New and search for "Halfborg QR Payments for PayNow".
2. Click Install Now, then Activate.

Or upload manually:

1. Download the plugin zip file.
2. In WordPress admin, go to Plugins → Add New → Upload Plugin.
3. Choose the zip file and click Install Now, then Activate.

After activating:

1. Set your store currency to Singapore Dollar (SGD).
2. Go to WooCommerce → Settings → Payments → PayNow and enable it.
3. Enter your PayNow-registered mobile number and save.

== Frequently Asked Questions ==

= Is this plugin really free? =
Yes. The free plugin is fully functional with no order or value limits — accept as many PayNow payments as you like to your registered mobile number, at no cost.

= What's the difference between the free and premium versions? =
The free plugin accepts unlimited PayNow payments by mobile number and shows the QR on the order-received page and in order-confirmation emails. Premium is a separate licensed upgrade that adds business UEN and VPA recipients (with your business name on the QR), reports and analytics with CSV export, and a PayNow reconciliation page (single and bulk confirm/flag actions). You never need Premium to accept PayNow.

= Can I accept PayNow to a business UEN? =
Accepting payment to a personal mobile number works in the free plugin. Accepting payment to a business UEN (with your business name shown on the QR code) and to VPA recipients such as GRAB or DASH is available in Premium.

= Is PayNow secure? =
Yes. PayNow is widely trusted in Singapore, and payments go directly to your bank account.

= Do I need to apply for PayNow from my bank? =
Yes. Register your UEN (or mobile number) for PayNow with your bank to start accepting payments.

= How fast can I get set up? =
Under 5 minutes, with no technical skills required.

== Screenshots ==

1. Customers scan the dynamic PayNow QR on the order-received page to pay.
2. PayNow shown as a payment option on the WooCommerce block checkout.
3. Simple setup — enter your PayNow mobile number in WooCommerce payment settings.
4. The PayNow QR is embedded directly in the order-confirmation email.

== External services ==

PayNow QR codes are generated entirely on your own server. No payment, order, or customer data is sent to any third party to create the QR codes.

This plugin uses Freemius to handle licence management, plugin updates, and optional opt-in usage analytics. When you activate the plugin, Freemius shows an opt-in screen that you may accept or skip. If you opt in, Freemius may collect basic environment information (such as your site URL, WordPress and PHP versions, active plugins and theme, and your administrator email) to support licensing, updates, and product improvement. The plugin is fully functional whether or not you opt in.

- Freemius Privacy Policy: https://freemius.com/privacy/
- Freemius Terms of Service: https://freemius.com/terms/

== Changelog ==

= 1.50 =
* Fixed the PayNow QR showing as a broken image in order emails on stores that send through an API-based mail service (WP Mail SMTP's Microsoft 365 / Outlook, SendGrid, Mailgun, Brevo and similar). Those services do not preserve the inline image, so the QR is now linked from the store instead when one of them is detected.
* Order emails now always tell the customer the QR is attached as a PNG and link them back to their order page, so a QR that fails to display never leaves them unable to pay.
* The store owner's "New order" notification no longer includes the customer payment instructions and QR code, which are addressed to the buyer.
* On local or staging sites that send through a mail API, where neither an inline nor a linked image can reach the recipient, the email now omits the QR image entirely and points the customer at the attached PNG instead of showing a broken image.
* The QR image is attached to order emails more reliably when several order emails are sent in the same request.

= 1.49 =
* Premium: renamed the internal reporting engine's classes and identifiers to a unique prefix so it can no longer clash with the separate "PMOR Reports" plugin when both are installed (previously activating both could cause a fatal error). No change to how reports look or work.

= 1.48 =
* The order reconciliation feature is now fully removed from the free build (its code ships only in the premium version), so the free version no longer contains any locked functionality. Free installs show an upgrade preview, premium installs are unchanged.
* Namespaced the bundled PHP QR Code library and gave all of the plugin's classes the consistent `SGPayNowQR` prefix, to meet WordPress.org's unique-naming requirement. The WooCommerce payment gateway id is unchanged, so existing settings and past orders are unaffected, and PayNow QR code generation is byte-for-byte unchanged.
* The "reset to defaults" gateway action now saves through WooCommerce's own settings API.

= 1.47 =
* The PayNow QR code is now embedded in order-confirmation emails on the free version too (previously premium-only).
* Reports and order reconciliation are now premium features; the free version shows a preview with an upgrade prompt.
* Renamed the plugin to "Halfborg QR Payments for PayNow for WooCommerce" (new slug and text domain) for WordPress.org directory compliance.
* Internal cleanup: renamed plugin constants, script handles, and helper functions to a unique prefix to avoid naming collisions. The payment gateway id is unchanged, so existing settings and past orders are unaffected.
* The checkout badge styling is now enqueued via wp_enqueue_style instead of printed inline.
* Declared WooCommerce as a required plugin via the "Requires Plugins" header.
* Hardened the bundled PHP QR Code library: disabled its file caching/logging (no files are written inside the plugin folder), removed unused debug output, and replaced a deprecated GD call. PayNow QR code generation is unchanged.
* Fixed: PayNow QR not shown on the WooCommerce block checkout when using the mobile-number payment type.
* WordPress.org compliance hardening: output escaping, input sanitisation, and internationalisation (translators comments) throughout, plus a translation template (languages/halfborg-qr-payments-for-paynow-for-woocommerce.pot). Trimmed unused files (demo, build tools, TCPDF binding) from the bundled PHP QR Code library.

= 1.42 =
* Bug fix: improve compatibility with PHP 8

= 1.41 =
* New feature: PayNow Reconciliation page for faster manual confirmation of payment received

= 1.40 =
* Bug fixes for PayNow logo showing as HTML in order confirmation

= 1.39 =
* Bug fixes for scanning by Maybank

= 1.38 =
* Bug fixes for scanning by DBS Digibank and UOB Infinity

= 1.37 =
* Bug fixes

= 1.36 =
* Support UEN and mobile numbers with VPA e.g. GRAB, DASH
* Fix paynow logo appearing in admin order details and emails

= 1.35 =
* Support mobile number as PayNow recipient

= 1.34 =
* Support 12 digit UEN numbers

= 1.33 =
* Add paynow badge to payment option

= 1.32 =
* Added monthly plan

= 1.3 =
* Support for woocommerce checkout blocks

== Upgrade Notice ==

= 1.47 =
This update rebrands the plugin to Halfborg QR Payments for PayNow for WooCommerce. Your premium licence and all features are unchanged.
