Skip to content

Commit 6d188b8

Browse files
PayPal: Fixed rare bug
1 parent e0fee09 commit 6d188b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Smartstore.Modules/Smartstore.PayPal/Client/PayPalHttpClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ private async Task<List<PurchaseUnitItem>> GetPurchaseUnitItemsAsync(ShoppingCar
599599

600600
foreach (var item in model.Items)
601601
{
602-
var cartItem = cart.Items.Where(x => x.Item.ProductId == item.ProductId).FirstOrDefault();
602+
var cartItem = cart.Items.FirstOrDefault(x => x.Item.Id == item.Id);
603603
var taxRate = await _taxService.GetTaxRateAsync(cartItem.Item.Product);
604604
var calculationContext = await _priceCalculationService.CreateCalculationContextAsync(cartItem, calculationOptions);
605605
var (unitPrice, subtotal) = await _priceCalculationService.CalculateSubtotalAsync(calculationContext);

0 commit comments

Comments
 (0)