Skip to content

Commit

Permalink
Merge pull request #141 from Resgrid/develop
Browse files Browse the repository at this point in the history
CU-8685awfkp fixing session bug and updating stripe.net
  • Loading branch information
ucswift authored Jun 28, 2024
2 parents 5ebdcf3 + e986d86 commit 2843079
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Core/Resgrid.Model/Resgrid.Model.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<PackageReference Include="MimeKit" Version="4.4.0" />
<PackageReference Include="MongoDB.Driver" Version="2.24.0" />
<PackageReference Include="protobuf-net" Version="3.2.30" />
<PackageReference Include="Stripe.net" Version="43.19.0" />
<PackageReference Include="Stripe.net" Version="45.1.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Core/Resgrid.Services/Resgrid.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="CommonServiceLocator" Version="2.0.7" />
<PackageReference Include="GeoJSON.Net" Version="1.2.19" />
<PackageReference Include="RestSharp.Serializers.NewtonsoftJson" Version="110.2.0" />
<PackageReference Include="Stripe.net" Version="43.19.0" />
<PackageReference Include="Stripe.net" Version="45.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
<PackageReference Include="Microsoft.AspNet.SignalR.JS" Version="2.4.3" />
<PackageReference Include="RestSharp" Version="110.2.0" />
<PackageReference Include="Stripe.net" Version="43.19.0" />
<PackageReference Include="Stripe.net" Version="45.1.0" />
<PackageReference Include="Twilio" Version="7.0.2" />
<PackageReference Include="Twilio.AspNet.Common" Version="8.0.2" />
<PackageReference Include="JWT" Version="10.1.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ public async Task<IActionResult> GetStripeSession(int id, int count, Cancellatio

return Json(new
{
SessionId = session,
SessionId = session.SessionId,
HasActiveSub = hasActiveSub
});
}
Expand Down
18 changes: 17 additions & 1 deletion Web/Resgrid.WebCore/Areas/User/Views/Subscription/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
const packs = amount / 10;
$.ajax({
url: resgrid.absoluteBaseUrl + '/User/Subscription/GetStripeSession?id=' + id + '&count=' + amount,
url: resgrid.absoluteBaseUrl + '/User/Subscription/GetStripeSession?id=' + id + '&count=' + packs,
contentType: 'application/json',
type: 'GET'
}).done(function (data) {
Expand All @@ -486,10 +486,26 @@
// If `redirectToCheckout` fails due to a browser or network
// error, display the localized error message to your customer
// using `result.error.message`.
swal({
title: "Purchase Error",
text: "Error redirecting to Stripe for checkout. Stripe error: " + result.error.message,
icon: "error",
buttons: true,
dangerMode: false
});
});
}
}
});
} else {
swal({
title: "Cannot Purchase",
text: "Resgrid includes 10 entities for free for all departments. Please select a entity count greater then 10 to purchase.",
icon: "warning",
buttons: true,
dangerMode: false
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion Web/Resgrid.WebCore/Resgrid.WebCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
<PackageReference Include="Microsoft.AspNet.SignalR.JS" Version="2.4.3" />
<PackageReference Include="RestSharp" Version="110.2.0" />
<PackageReference Include="Stripe.net" Version="43.19.0" />
<PackageReference Include="Stripe.net" Version="45.1.0" />
<PackageReference Include="Twilio" Version="7.0.2" />
<PackageReference Include="Twilio.AspNet.Common" Version="8.0.2" />
<PackageReference Include="JWT" Version="10.1.1" />
Expand Down

0 comments on commit 2843079

Please sign in to comment.