Skip to content

Commit 9aadd5a

Browse files
committed
Check retrieved storedPaymentIntent value against total.
1 parent b7a3327 commit 9aadd5a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/StripePaymentIntentService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public async Task<PaymentIntent> CreatePaymentIntentAsync(Amount total, string s
5555
{
5656
var paymentIntentInfo = await _paymentIntentPersistence.RetrieveAsync(shoppingCartId);
5757
if (paymentIntentInfo?.Amount == total &&
58-
await GetPaymentIntentAsync(paymentIntentInfo.PaymentIntentId) is { Status: RequiresPaymentMethod } storedPaymentIntent)
58+
await GetPaymentIntentAsync(paymentIntentInfo.PaymentIntentId) is { Status: RequiresPaymentMethod } storedPaymentIntent &&
59+
storedPaymentIntent.Amount == AmountHelpers.GetPaymentAmount(total))
5960
{
6061
return storedPaymentIntent;
6162
}

0 commit comments

Comments
 (0)