Highlights
First release carrying a working PayPal Reader (Zettle) integration. The gateway has moved from a mock-only scaffold to a real Reader Connect flow that can take live card payments, modelled on the Stripe/SumUp Terminal plugins.
New
- Reader pairing UI under
WooCommerce → Settings → Payments → PayPal Reader. Pair readers via the code fromSettings → Link with a developer, unpair with one click. - Live payment flow over Zettle Reader Connect (OAuth2 JWT-bearer → REST
/sessions→ WebSocketSTATUS_REQUEST → PAYMENT_REQUEST → PAYMENT_RESULT_RESPONSE). The browser drives the socket; PHP brokers pairing, opens the session, and confirms the result. - Test mode checkbox (default on). Use your Zettle developer/test-merchant credentials while it's enabled; disable to go live with production credentials. Endpoints are identical — only the merchant account differs.
- Server-authoritative amount verification.
confirm_paymentrejects any result whose amount does not match the order total before the order is marked paid.CARD_PAYMENT_UUIDis stored as the WC transaction id. - TEST MODE badge on the checkout terminal so merchants can see at a glance which mode they're taking a payment in.
Changed
- Mock reader is now strictly a CI/CD path, gated behind
define('PRWC_USE_MOCK_READER', true)inwp-config.php. It is no longer surfaced in the merchant admin UI. - Admin banner warns when
PRWC_USE_MOCK_READERis active so staging/production deploys don't silently leave mock mode on. Constant is parsed viaFILTER_VALIDATE_BOOLEAN, so string values like"false"/"0"are respected.
Internals
- New services:
ZettleApiClient(OAuth2 + REST with transient-cached access token),ReaderLinksService,ReaderSessionService. - M1 discovery spike and design plans removed from the repo.
- 23 unit tests covering mode resolution, mock reader/workflow logic, and service input validation.
Install
Download paypal-reader-for-woocommerce-0.1.0.zip from the Assets below and install via Plugins → Add New → Upload Plugin, or update in place if you already have an older build.