← back to Dw Signup Fulfillment
retail gift code: uppercase for display in email (DWSR2VEF), redemption still case-insensitive
f7846f6f3a109616c3f466f5c2921e5f0099479f · 2026-08-07 08:05:59 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit f7846f6f3a109616c3f466f5c2921e5f0099479f
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Aug 7 08:05:59 2026 -0700
retail gift code: uppercase for display in email (DWSR2VEF), redemption still case-insensitive
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
lib/giftcard.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/giftcard.js b/lib/giftcard.js
index 850ea50..fbcf37b 100644
--- a/lib/giftcard.js
+++ b/lib/giftcard.js
@@ -41,7 +41,10 @@ async function issueRetailGiftCode(customer) {
const gc = await shopify.createGiftCard({ value, note, currency: config.CURRENCY, code: shortGiftCode() });
const card = gc.json && gc.json.gift_card ? gc.json.gift_card : {};
- const code = card.code || '(code returned by Shopify at go-live)';
+ // Shopify stores/returns the code lowercased (dwsr2vef). Redemption is case-insensitive,
+ // so uppercasing is a DISPLAY-ONLY choice: DWSR2VEF reads more like a code and is easier
+ // to type. We keep the same string, just cased up for the email/return payload.
+ const code = card.code ? String(card.code).toUpperCase() : '(code returned by Shopify at go-live)';
const firstName = customer.first_name || (customer.email ? customer.email.split('@')[0] : '');
const tpl = email.retailGiftEmail({ firstName, code, value, count: config.FREE_SAMPLE_COUNT });
← f488316 signups: designer welcome auto-sends create-account CTA; ret
·
back to Dw Signup Fulfillment
·
chore: session-close quality gate — comment accuracy fix + v 1755b63 →