Skip to content

Commit

Permalink
Follow the recommendation that Stripe server wasn't sending shoppingC…
Browse files Browse the repository at this point in the history
…artId back to the web hook.
  • Loading branch information
infofromca committed Jul 29, 2024
1 parent 15b16a8 commit 4e82587
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public WebhookController(
}

[HttpPost]
public async Task<IActionResult> Index(string shoppingCartId = null)
public async Task<IActionResult> Index()
{
using var streamReader = new StreamReader(HttpContext.Request.Body);
var json = await streamReader.ReadToEndAsync(HttpContext.RequestAborted);
Expand All @@ -59,7 +59,7 @@ public async Task<IActionResult> Index(string shoppingCartId = null)
}

var paymentIntent = await _stripePaymentService.GetPaymentIntentAsync(paymentIntentId);
await _stripePaymentService.UpdateOrderToOrderedAsync(paymentIntent, shoppingCartId);
await _stripePaymentService.UpdateOrderToOrderedAsync(paymentIntent, shoppingCartId: null);
}
else if (stripeEvent.Type == Events.PaymentIntentPaymentFailed)
{
Expand Down

0 comments on commit 4e82587

Please sign in to comment.