mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
Fix the unable to create paid organizations error (#2957)
This commit is contained in:
parent
78f0d99da8
commit
b53973555e
@ -1820,6 +1820,19 @@ public class StripePaymentService : IPaymentService
|
|||||||
|
|
||||||
// We are taking only first 30 characters of the SubscriberName because stripe provide
|
// 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
|
// 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user