Skip to content

Commit

Permalink
ps validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mezai committed Dec 25, 2015
1 parent 3207976 commit bd49527
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions classes/includes/KlarnaCheckoutPresta.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ public function checkout($cart, $country, $currency, $locale)
foreach ($products as $product)
{
$price = Tools::ps_round($product['price_wt'], _PS_PRICE_DISPLAY_PRECISION_);
$price = (int)$price * 100;
$price = (int)($price * 100);

$product_img = $this->context->link->getImageLink($product['link_rewrite'], $product['id_image']);
$product_uri = $this->context->link->getProductLink(new Product($product['id_product']));

$checkoutcart = array(
$checkoutcart[] = array(
'reference' => $product['reference'],
'name' => $product['name'],
'quantity' => (int)$product['cart_quantity'],
Expand All @@ -93,9 +93,9 @@ public function checkout($cart, $country, $currency, $locale)

$shipping_price = Tools::ps_round($shipping, _PS_PRICE_DISPLAY_PRECISION_);

$shipping_price = (int)$shipping_price * 100;
$shipping_price = (int)($shipping_price * 100);

$checkoutcart = array(
$checkoutcart[] = array(
'type' => 'shipping_fee',
'reference' => (String)$carrier->id_reference,
'name' => (String)$carrier->name,
Expand All @@ -115,7 +115,7 @@ public function checkout($cart, $country, $currency, $locale)
$price = $discount['value_real'];
$price = Tools::ps_round($price, _PS_PRICE_DISPLAY_PRECISION_);

$checkoutcart = array(
$checkoutcart[] = array(
'type' => 'discount',
'reference' => $discount['name'],
'name' => $discount['name'],
Expand Down

0 comments on commit bd49527

Please sign in to comment.