diff --git a/apps/api/src/donations/helpers/payment-intent-helpers.ts b/apps/api/src/donations/helpers/payment-intent-helpers.ts index f95f3fb8..e29d808c 100644 --- a/apps/api/src/donations/helpers/payment-intent-helpers.ts +++ b/apps/api/src/donations/helpers/payment-intent-helpers.ts @@ -96,7 +96,7 @@ export function getInvoiceData(invoice: Stripe.Invoice): PaymentData { personId = line.metadata.personId } if (line.metadata.type) { - type = line.metadata.type ?? DonationType.donation + type = line.metadata.type } }) @@ -118,7 +118,7 @@ export function getInvoiceData(invoice: Stripe.Invoice): PaymentData { paymentMethodId: invoice.collection_method, stripeCustomerId: invoice.customer as string, personId, - type, + type: type || DonationType.donation, } }