mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
Fix the unable to create paid organizations error (#2957)
This commit is contained in:
@@ -1820,6 +1820,19 @@ public class StripePaymentService : IPaymentService
|
||||
|
||||
// We are taking only first 30 characters of the SubscriberName because stripe provide
|
||||
// for 30 characters for custom_fields,see the link: https://stripe.com/docs/api/invoices/create
|
||||
private static string GetFirstThirtyCharacters(string subscriberName) => string.IsNullOrWhiteSpace(subscriberName) ? "" : subscriberName.Substring(0, 30);
|
||||
|
||||
public static string GetFirstThirtyCharacters(string subscriberName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(subscriberName))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else if (subscriberName.Length <= 30)
|
||||
{
|
||||
return subscriberName;
|
||||
}
|
||||
else
|
||||
{
|
||||
return subscriberName.Substring(0, 30);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user