Skip to content

Commit 515400f

Browse files
committed
Fix #27 - build product data
1 parent 1966a3a commit 515400f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Gateway/Request/ProductsDataBuilder.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,17 @@ public function build(array $buildSubject): array
4747
$quantity = 1;
4848
}
4949

50-
5150
$products[$i] = [
52-
'quantity' => $quantity,
51+
'quantity' => (int)$quantity,
5352
'name' => mb_substr($name, 0, 255),
5453
'unitPrice' => $this->payuRequests->formatAmount($product->getPriceInclTax())
5554
];
5655

5756
if ($product->getIsVirtual()) {
5857
$products[$i]['virtual'] = true;
5958
}
59+
$i++;
6060
}
61-
$i++;
6261
}
6362
}
6463

0 commit comments

Comments
 (0)