ghostguild-org/tests/server/utils
Jennie Robinson Faber be7145f96c feat(payments): add upsertPaymentFromHelcim helper with idempotent insert
Takes a Member doc + a normalized Helcim transaction and inserts a
Payment row if helcimTransactionId is unseen. Maps helcim status
paid→success, refunded→refunded, failed→failed; skips 'other'.

opts.paymentType overrides the cadence fallback for mid-flight cadence
changes. opts.sendConfirmation triggers a Resend payment-confirmation
email ONLY on new inserts — swallows send failures so email trouble
cannot break the upstream payment flow.

The Resend template lives in server/emails/paymentConfirmation.js. It
is CRA-safe (charity name + 'not an official donation receipt / tax
receipts available later in 2026' disclaimer) so it can be used in
either Task 8 branch without copy changes.
2026-04-20 13:15:38 +01:00
..
adminAlerts.test.js feat(admin): add alert aggregator with dismissal filtering 2026-04-08 11:14:54 +01:00
auth.test.js Add Vitest security test suite and update security evaluation doc 2026-03-01 12:30:06 +00:00
escapeHtml.test.js Add Vitest security test suite and update security evaluation doc 2026-03-01 12:30:06 +00:00
helcim.test.js feat(helcim): add transaction list + card update helpers 2026-04-19 16:24:16 +01:00
member-number.test.js Huge bunch of UI/UX improvements and tweaks! 2026-04-06 16:17:12 +01:00
payments.test.js feat(payments): add upsertPaymentFromHelcim helper with idempotent insert 2026-04-20 13:15:38 +01:00
tickets.test.js refactor(events): gate member benefits on hasMemberAccess 2026-04-18 17:06:17 +01:00