Skip to content

Commit

Permalink
Merge pull request #37 from Mondido/feature/rounding-issue-workaround
Browse files Browse the repository at this point in the history
Rounding issue workaround
  • Loading branch information
Ildar Gumirov authored Nov 27, 2017
2 parents 64ab0ed + 6ec0ea7 commit ab57b90
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** WooCommerce Mondido Payments Gateway Changelog ***

2017-10-27 - version 4.1.1
* Rounding issue workaround

2017-10-22 - version 4.1.0
* Improved order confirmation by WebHook
* Removed order confirmation from frontend side
Expand Down
6 changes: 4 additions & 2 deletions includes/class-wc-gateway-mondido-hw.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,12 @@ public function receipt_page( $order_id ) {
'type' => 'CustomHttp'
);

$amount = array_sum( array_column( $items, 'amount' ) );

// Prepare fields
$fields = array(
'amount' => number_format( $order->get_total(), 2, '.', '' ),
'vat_amount' => number_format( $order->get_total_tax(), 2, '.', '' ),
'amount' => number_format( $amount, 2, '.', '' ),
'vat_amount' => 0,
'merchant_id' => $this->merchant_id,
'currency' => $order->get_currency(),
'customer_ref' => $order->get_user_id() != '0' ? $order->get_user_id() : '',
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: robertpohl, olegisk
Tags: payment, e-commerce, commerce, woothemes, wordpress ecommerce, mondido, payment gateway
Requires at least: 4.6
Tested up to: 4.7
Stable tag: v4.0.1
Stable tag: v4.1.1
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down
2 changes: 1 addition & 1 deletion woocommerce-gateway-mondido.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: WooCommerce Mondido Payments Gateway
Plugin URI: https://www.mondido.com/
Description: Provides a Payment Gateway through Mondido for WooCommerce.
Version: 4.0.2
Version: 4.1.1
Author: Mondido
Author URI: https://www.mondido.com
License: GNU General Public License v3.0
Expand Down

0 comments on commit ab57b90

Please sign in to comment.