From 2591f034dd9417a6ffcf5e0e14fac16ef6905b35 Mon Sep 17 00:00:00 2001 From: kcppdevelopers Date: Tue, 6 Jun 2023 12:07:27 +0530 Subject: [PATCH] Tax calculation issue, PFWMA-298 --- ...ulti-account-management-admin-express-checkout.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/admin/class-paypal-for-woocommerce-multi-account-management-admin-express-checkout.php b/admin/class-paypal-for-woocommerce-multi-account-management-admin-express-checkout.php index 1383d63..61741b3 100644 --- a/admin/class-paypal-for-woocommerce-multi-account-management-admin-express-checkout.php +++ b/admin/class-paypal-for-woocommerce-multi-account-management-admin-express-checkout.php @@ -1998,8 +1998,11 @@ public function angelleye_get_line_item_from_order($order, $values) { public function angelleye_get_extra_fee_array($amount, $divided, $type) { $total = 0; $partition_array = array(); - if($amount > 0 && $divided > 0) { - $partition = AngellEYE_Gateway_Paypal::number_format($amount / $divided); + if($divided == 0) { + $partition = $amount; + } else { + $partition = AngellEYE_Gateway_Paypal::number_format($amount / $divided); + } for ($i = 1; $i <= $divided; $i++) { $partition_array[$i] = $partition; $total = $total + $partition; @@ -2043,9 +2046,7 @@ public function angelleye_get_extra_fee_array($amount, $divided, $type) { } } return $partition_array; - } else { - return $partition_array; - } + } public function angelleye_is_multi_account_api_set($microprocessing_array, $gateways) {