From 4bf882c0eeb5313adf013002fd57312e67866b15 Mon Sep 17 00:00:00 2001 From: NochexDevTeam <36759878+NochexDevTeam@users.noreply.github.com> Date: Tue, 15 Sep 2020 09:41:00 +0100 Subject: [PATCH] Update nochex.php --- plugins/vmpayment/nochex/nochex.php | 53 ----------------------------- 1 file changed, 53 deletions(-) diff --git a/plugins/vmpayment/nochex/nochex.php b/plugins/vmpayment/nochex/nochex.php index 226c567..78d98a7 100644 --- a/plugins/vmpayment/nochex/nochex.php +++ b/plugins/vmpayment/nochex/nochex.php @@ -558,59 +558,6 @@ function _getPaymentResponseHtml($nochexTable, $payment_name) { return $html; } - function getCosts(VirtueMartCart $cart, $method, $cart_prices) { - if (preg_match('/%$/', $method->cost_percent_total)) { - $cost_percent_total = substr($method->cost_percent_total, 0, -1); - } else { - $cost_percent_total = $method->cost_percent_total; - } - return ($method->cost_per_transaction + ($cart_prices['salesPrice'] * $cost_percent_total * 0.01)); - } - - /** - * Check if the payment conditions are fulfilled for this payment method - * @author: Valerie Isaksen - * - * @param $cart_prices: cart prices - * @param $payment - * @return true: if the conditions are fulfilled, false otherwise - * - */ - protected function checkConditions($cart, $method, $cart_prices) { - - $address = (($cart->ST == 0) ? $cart->BT : $cart->ST); - - $amount = $cart_prices['salesPrice']; - $amount_cond = ($amount >= $method->min_amount AND $amount <= $method->max_amount - OR - ($method->min_amount <= $amount AND ($method->max_amount == 0) )); - - $countries = array(); - if (!empty($method->countries)) { - if (!is_array($method->countries)) { - $countries[0] = $method->countries; - } else { - $countries = $method->countries; - } - } - // probably did not gave his BT:ST address - if (!is_array($address)) { - $address = array(); - $address['virtuemart_country_id'] = 0; - } - - if (!isset($address['virtuemart_country_id'])) - $address['virtuemart_country_id'] = 0; - if (in_array($address['virtuemart_country_id'], $countries) || count($countries) == 0) { - if ($amount_cond) { - return true; - } - } - - - return false; - } - /** * We must reimplement this triggers for joomla 1.7 */