#27 get last receipt, get minimalUser, get my user
This commit is contained in:
@@ -9,7 +9,6 @@ namespace Hutopy.Infrastructure.Stripe;
|
||||
|
||||
public class StripeService : IStripeService
|
||||
{
|
||||
const string EndpointSecret = "";
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
public StripeService(IHttpContextAccessor httpContextAccessor)
|
||||
@@ -18,7 +17,7 @@ public class StripeService : IStripeService
|
||||
StripeConfiguration.ApiKey = "";
|
||||
}
|
||||
|
||||
public async Task<string> CreateCheckoutSession(int amount, string currency = "cad")
|
||||
public async Task<string> CreateCheckoutSession(int amount, string creatorId, string currency = "cad")
|
||||
{
|
||||
var options = new SessionCreateOptions
|
||||
{
|
||||
@@ -38,7 +37,9 @@ public class StripeService : IStripeService
|
||||
],
|
||||
Mode = "payment",
|
||||
UiMode = "embedded",
|
||||
ReturnUrl = "https://hutopy.ca/paymentcompleted",
|
||||
ReturnUrl = $"https://hutopy.ca/paymentcompleted?creatorId={creatorId}",
|
||||
InvoiceCreation = new SessionInvoiceCreationOptions(){ Enabled = true},
|
||||
ClientReferenceId = creatorId
|
||||
};
|
||||
|
||||
var service = new SessionService();
|
||||
@@ -57,7 +58,6 @@ public class StripeService : IStripeService
|
||||
}
|
||||
|
||||
return new Result(false, new List<string>());
|
||||
|
||||
}
|
||||
catch (StripeException e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user