Browse Source

[AC-1772] Check null or whitespace on `GatewayCustomerId` and `BillingEmail` (#3398)

* Check null or whitespace on GatewayCustomerId and BillingEmail

* Fixed expiration input
pull/3408/head
Alex Morask 2 years ago committed by GitHub
parent
commit
cfe9812724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/Admin/Controllers/OrganizationsController.cs
  2. 2
      src/Admin/Views/Shared/_OrganizationForm.cshtml

5
src/Admin/Controllers/OrganizationsController.cs

@ -215,7 +215,10 @@ public class OrganizationsController : Controller @@ -215,7 +215,10 @@ public class OrganizationsController : Controller
try
{
await _stripeSyncService.UpdateCustomerEmailAddress(organization.GatewayCustomerId, organization.BillingEmail);
if (!string.IsNullOrWhiteSpace(organization.GatewayCustomerId) && !string.IsNullOrWhiteSpace(organization.BillingEmail))
{
await _stripeSyncService.UpdateCustomerEmailAddress(organization.GatewayCustomerId, organization.BillingEmail);
}
}
catch (StripeException stripeException)
{

2
src/Admin/Views/Shared/_OrganizationForm.cshtml

@ -259,7 +259,7 @@ @@ -259,7 +259,7 @@
<div class="col-sm">
<div class="form-group">
<label asp-for="ExpirationDate"></label>
<input type="datetime-local" class="form-control" asp-for="ExpirationDate" readonly='@(!canEditLicensing)'>
<input type="datetime-local" class="form-control" asp-for="ExpirationDate" readonly='@(!canEditLicensing)' step="1">
</div>
</div>
</div>

Loading…
Cancel
Save