Closed andrashee closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Visit the preview URL for this PR (updated for commit cce8e6b):
https://si-admin-staging--pr883-ahee-optional-name-nv29fz30.web.app
(expires Tue, 13 Aug 2024 07:02:04 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Sign: b7b0969384059dce6ea8fad1ee1d1737e54e6676
Since first and lastname are modelled as optional in our types, I assume we don't need them?
Yes, this is correct. Theoretically, there could be a contributor without a name. This ensures that if a user makes a payment (on stripe form) but never fills out "our" form (asking for name) afterwards, they are still handled as a normal constributor. I guess 99% will fill out the form after payment anyway.
There are rare cases where even the credit card company only provides the first name or only the last name. Making the fname
and lname
optional helps prevent errors in such situations.
The webhook importing twint charges throws an error:
The problem is, that we actively check if the user has a name field, which is not set for a twint payment. https://github.com/socialincome-san/public/blob/77ac33184b22fc4562f6063953714dd34a1f5d16/shared/src/stripe/StripeEventHandler.ts#L183
Since first and lastname are modelled as optional in our types, I assume we don't need them?