Skip to content

Commit

Permalink
2.5/cart-tax-calculate
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihtoprak committed Dec 23, 2021
1 parent 557a6f4 commit bfd1d3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/library/Moka_Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public function validate_fields()
public function process_payment( $orderId )
{
$order = new WC_order($orderId);
$orderDetails = self::formatOrder($orderId);
$orderDetails = self::formatOrder($orderId);
$currentTotal = data_get($orderDetails, 'Amount');
$installmentNumber = data_get($orderDetails, 'InstallmentNumber');
$currency = $order->get_currency();
Expand Down Expand Up @@ -551,7 +551,7 @@ private function formatOrder( $orderId )

$selectedInstallment = data_get($postData, $this->id.'-installment');
$currentComission = data_get($rates, $selectedInstallment.'.value');

$orderData = [
'CardHolderFullName' => (string) data_get($postData, $this->id.'-name-oncard'),
'CardNumber' => (string) self::formatCartNumber(data_get($postData, $this->id.'-card-number')),
Expand Down Expand Up @@ -650,7 +650,7 @@ private function formatExperyDate($string)
*/
private function calculateComissionRate( $total, $percent )
{
$total = ( ( ((int)$total*(int)$percent)/100) + (int)$total);
$total = ( ( ($total*$percent)/100) + $total);
return number_format($total,2,'.', '');
}

Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Moka Pos, Moka Pay plugin;

#### Version 2.5
- Issue : Card Expiry Date validation issue fixed.
- Issue : Cart Total tax rates calculating issue.

#### Version 2.4
- Feature : Added Order Prefix for multiple domain usage.
Expand Down

0 comments on commit bfd1d3b

Please sign in to comment.