diff --git a/cart-grain.go b/cart-grain.go index 35847e0..d10b059 100644 --- a/cart-grain.go +++ b/cart-grain.go @@ -474,8 +474,6 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa c.PaymentInProgress = true c.Processing = true for _, item := range c.Items { - total := int(item.Price) * item.Quantity - taxAmount := int(item.Tax) * item.Quantity orderLines = append(orderLines, &Line{ Type: "physical", @@ -485,8 +483,8 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa UnitPrice: int(item.Price), TaxRate: int(item.Tax), QuantityUnit: "st", - TotalAmount: total, - TotalTaxAmount: taxAmount, + TotalAmount: int(item.TotalPrice), + TotalTaxAmount: int(item.TotalTax), ImageURL: fmt.Sprintf("https://www.elgiganten.se%s", item.Image), }) }