mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
fix: correctly set stripe customer names (#1939)
Currently the Stripe customer name is set to the organisation name, which in some cases is just the organisation name. This update makes it so it uses the owner name instead.
This commit is contained in:
@ -54,7 +54,7 @@ export const createSubscriptionRoute = authenticatedProcedure
|
||||
|
||||
if (!customerId) {
|
||||
const customer = await createCustomer({
|
||||
name: organisation.name,
|
||||
name: organisation.owner.name || organisation.owner.email,
|
||||
email: organisation.owner.email,
|
||||
});
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ export const manageSubscriptionRoute = authenticatedProcedure
|
||||
// If the customer ID is still missing create a new customer.
|
||||
if (!customerId) {
|
||||
const customer = await createCustomer({
|
||||
name: organisation.name,
|
||||
name: organisation.owner.name || organisation.owner.email,
|
||||
email: organisation.owner.email,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user