Skip to content

Commit

Permalink
Round up the product price and convert it into (#87)
Browse files Browse the repository at this point in the history
integer for Thawani payload
  • Loading branch information
w7shdev authored May 21, 2022
1 parent 20db49a commit 33ded14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WC_Gateway_ThawaniGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ protected function prepare_products($order_id)
$product_name = mb_substr($product_name, 0, 30, 'UTF-8') . '...';
$products[] = [
'name' => $product_name,
'unit_amount' => ($unit_price / (int) $item->get_data()['quantity']),
'unit_amount' => (int)ceil(($unit_price / (int) $item->get_data()['quantity'])),
'quantity' => $item->get_data()['quantity'],
];
}
Expand Down

0 comments on commit 33ded14

Please sign in to comment.