ghostguild-org/server
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
..
api fix(account): show payment history + next-charge for paid-then-$0 members 2026-04-20 12:36:18 +01:00
config feat(contributions): rewrite server config as preset-based helpers 2026-04-19 18:12:44 +01:00
emails feat(payments): add upsertPaymentFromHelcim helper with idempotent insert 2026-04-20 13:15:38 +01:00
middleware fix: use private helcimApiToken for all server-side Helcim API calls 2026-04-04 13:37:34 +01:00
migrations refactor(community): rename Community Connections → Community Ecology 2026-04-09 09:07:15 +01:00
models feat(payments): add Payment model for Phase 1 receipt data capture 2026-04-20 13:12:17 +01:00
plugins Member/Ecology revamp. 2026-04-14 09:25:09 +01:00
routes fix(auth): survive missing OIDC interaction cookie on magic-link click 2026-04-15 18:18:33 +01:00
utils feat(payments): add upsertPaymentFromHelcim helper with idempotent insert 2026-04-20 13:15:38 +01:00