Skip to content

Commit

Permalink
fix: Donation type being "" on stripe invoice.paid event (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashko9807 committed Jun 1, 2024
1 parent 2ce887b commit 8027287
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/donations/helpers/payment-intent-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})

Expand All @@ -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,
}
}

Expand Down

0 comments on commit 8027287

Please sign in to comment.