|
|
|
|
@ -131,7 +131,7 @@ public class StripePaymentService : IPaymentService
@@ -131,7 +131,7 @@ public class StripePaymentService : IPaymentService
|
|
|
|
|
new Stripe.CustomerInvoiceSettingsCustomFieldOptions() |
|
|
|
|
{ |
|
|
|
|
Name = org.SubscriberType(), |
|
|
|
|
Value = org.SubscriberName(), |
|
|
|
|
Value = GetFirstThirtyCharacters(org.SubscriberName()), |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
@ -443,7 +443,7 @@ public class StripePaymentService : IPaymentService
@@ -443,7 +443,7 @@ public class StripePaymentService : IPaymentService
|
|
|
|
|
new Stripe.CustomerInvoiceSettingsCustomFieldOptions() |
|
|
|
|
{ |
|
|
|
|
Name = user.SubscriberType(), |
|
|
|
|
Value = user.SubscriberName(), |
|
|
|
|
Value = GetFirstThirtyCharacters(user.SubscriberName()), |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
@ -1358,7 +1358,7 @@ public class StripePaymentService : IPaymentService
@@ -1358,7 +1358,7 @@ public class StripePaymentService : IPaymentService
|
|
|
|
|
new Stripe.CustomerInvoiceSettingsCustomFieldOptions() |
|
|
|
|
{ |
|
|
|
|
Name = subscriber.SubscriberType(), |
|
|
|
|
Value = subscriber.SubscriberName(), |
|
|
|
|
Value = GetFirstThirtyCharacters(subscriber.SubscriberName()), |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
@ -1438,7 +1438,7 @@ public class StripePaymentService : IPaymentService
@@ -1438,7 +1438,7 @@ public class StripePaymentService : IPaymentService
|
|
|
|
|
new Stripe.CustomerInvoiceSettingsCustomFieldOptions() |
|
|
|
|
{ |
|
|
|
|
Name = subscriber.SubscriberType(), |
|
|
|
|
Value = subscriber.SubscriberName(), |
|
|
|
|
Value = GetFirstThirtyCharacters(subscriber.SubscriberName()) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
@ -1817,4 +1817,9 @@ public class StripePaymentService : IPaymentService
@@ -1817,4 +1817,9 @@ public class StripePaymentService : IPaymentService
|
|
|
|
|
.OrderByDescending(i => i.Created).Select(i => new BillingInfo.BillingInvoice(i)); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 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); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|