manifest / integrations / env-claim-points
[ENV] Receipt Claim Manager
[ENV] Receipt Claim Manager: GoTab receipt lookup and Clutch loyalty point claims for WordPress
★ 0stars
1.0.2latest · 7d ago
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/strsar/env-claim-points/archive/refs/heads/main.zipUpdates itself. It ships its own updater (Plugin Update Checker), so new versions appear under Dashboard → Updates.
Receipt Claim Manager
Shortcode
Use:
[receipt_claim_form]
Optional attributes:
[receipt_claim_form title="Claim Missing Loyalty Points" desc="Forgot to attach your loyalty account during your last visit? Enter your receipt details below to retroactively claim your points." button="Submit Points"]
Exact Flow
- The shortcode renders a custom
novalidateform with one receipt field and one loyalty identifier choice. - Front-end JavaScript validates the selected input before submit:
tabRefis requiredcardNumberis reduced to digits onlymobilePhoneis normalized to the same format the backend acceptsemailis trimmed and validated
- The browser posts JSON to the WordPress REST endpoint with:
tabRefloyaltyType- exactly one of
cardNumber,mobilePhone, oremail - the honeypot field
- The REST handler verifies the nonce, honeypot field, and rate limit.
- The handler resolves the loyalty type. If the radio value is missing, it infers the type from the submitted field names.
- The plugin authenticates to GoTab using the configured API access credentials and caches the bearer token.
- The plugin queries GoTab
tabsListbytabRef.- If
GoTab Location IDis configured, the query is scoped to that location. - If the lookup returns 0 matches, the plugin returns the configured GoTab not found message.
- If the lookup returns multiple matches, the plugin returns a multiple-match error.
- If
- The plugin checks the receipt date against the configured claim window using the selected GoTab date field (
created,updated, orfiscalDay). - The plugin resolves the Clutch card number:
cardNumber: used directlymobilePhone: searched in Clutch withphoneORmobilePhoneemail: searched in Clutch byemail
- If Clutch returns exactly one card number, the plugin calls Clutch
/flex/barcodeClaimwith:externalId = GoTab tabIdcardNumber = resolved Clutch card number
- The claim is considered successful only when Clutch returns both:
success = truecheckoutWasClaimed = true
- When Debug Mode is enabled, each attempt is logged and the upstream GoTab or Clutch response body is stored and shown in the Logs tab.
Required Settings
Go to Settings -> Receipt Claim and configure:
- Active Environment
- Clutch stage credentials and headers
- Clutch production credentials and headers
- GoTab stage URLs and credentials
- GoTab production URLs and credentials
- Claim duration amount and unit
Important Notes
- All external API calls are server-side.
- GoTab Location ID is strongly recommended and may be required for reliable
tabReflookups. - Clutch Card Set ID(s) can be stored per environment, but the current workflow does not send them in requests.
- The plugin currently sends GoTab
tabIdas ClutchexternalIdin/flex/barcodeClaim. - The plugin auto-creates its log table if it does not exist yet.
- When Debug Mode is disabled, the plugin does not write claim log records.
- The Logs tab shows both the plugin message and the raw upstream server response when Debug Mode is enabled.
- The plugin hashes IP addresses and does not intentionally log raw phone or email values.
- For production, consider adding a real CAPTCHA or WAF rule in addition to the included honeypot and rate limit.
Releases
1 release.
Tag
Published
1.0.2
latest
Nov 9, 2026 7d ago
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.