Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CU-8685awfkp fixing session bug and updating stripe.net #141

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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