cleanup
This commit is contained in:
@@ -474,8 +474,6 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa
|
|||||||
c.PaymentInProgress = true
|
c.PaymentInProgress = true
|
||||||
c.Processing = true
|
c.Processing = true
|
||||||
for _, item := range c.Items {
|
for _, item := range c.Items {
|
||||||
total := int(item.Price) * item.Quantity
|
|
||||||
taxAmount := int(item.Tax) * item.Quantity
|
|
||||||
|
|
||||||
orderLines = append(orderLines, &Line{
|
orderLines = append(orderLines, &Line{
|
||||||
Type: "physical",
|
Type: "physical",
|
||||||
@@ -485,8 +483,8 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa
|
|||||||
UnitPrice: int(item.Price),
|
UnitPrice: int(item.Price),
|
||||||
TaxRate: int(item.Tax),
|
TaxRate: int(item.Tax),
|
||||||
QuantityUnit: "st",
|
QuantityUnit: "st",
|
||||||
TotalAmount: total,
|
TotalAmount: int(item.TotalPrice),
|
||||||
TotalTaxAmount: taxAmount,
|
TotalTaxAmount: int(item.TotalTax),
|
||||||
ImageURL: fmt.Sprintf("https://www.elgiganten.se%s", item.Image),
|
ImageURL: fmt.Sprintf("https://www.elgiganten.se%s", item.Image),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user