Skip to content

Commit 8027287

Browse files
authored
fix: Donation type being "" on stripe invoice.paid event (#638)
1 parent 2ce887b commit 8027287

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/api/src/donations/helpers/payment-intent-helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export function getInvoiceData(invoice: Stripe.Invoice): PaymentData {
9696
personId = line.metadata.personId
9797
}
9898
if (line.metadata.type) {
99-
type = line.metadata.type ?? DonationType.donation
99+
type = line.metadata.type
100100
}
101101
})
102102

@@ -118,7 +118,7 @@ export function getInvoiceData(invoice: Stripe.Invoice): PaymentData {
118118
paymentMethodId: invoice.collection_method,
119119
stripeCustomerId: invoice.customer as string,
120120
personId,
121-
type,
121+
type: type || DonationType.donation,
122122
}
123123
}
124124

0 commit comments

Comments
 (0)