PII-aware logging helper. PaymentInfo.raw / UnifiedWebhookEvent.raw
preserve the full PSP payload — which may contain names,
emails, addresses, and tokens. Pass anything through scrubForLogging()
before writing it to logs; the original object is never mutated.
This is a log-hygiene tool, not a compliance guarantee: it redacts by key
name and masks card-number-shaped strings, so novel PSP fields with
unrecognized names pass through.
PII-aware logging helper.
PaymentInfo.raw/UnifiedWebhookEvent.rawpreserve the full PSP payload — which may contain names, emails, addresses, and tokens. Pass anything through scrubForLogging() before writing it to logs; the original object is never mutated.This is a log-hygiene tool, not a compliance guarantee: it redacts by key name and masks card-number-shaped strings, so novel PSP fields with unrecognized names pass through.