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) {