Designinfo Posted August 30, 2015 Share Posted August 30, 2015 I want the final amount posted to be multiplied by 1.02 The following is the payment.php of the PAYUMONEY zip file $ total has to be multiplied by 1.02 I dont know if this is the right way but I am attaching the entire module also.I want the final amount posted on the Payumoney website multiplied by 1.02 Reason I want to add a tax on payment by credit card tax of 2% $payu = new payu(); $context = Context::getContext(); $cart = $context->cart; if (!$cookie->isLogged(true)) Tools::redirect('authentication.php?back=order.php'); elseif (!$cart->getOrderTotal(true, Cart::BOTH)) Tools::displayError('Error: Empty cart'); if ($cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$payu->active) Tools::redirectLink(__PS_BASE_URI__.'order.php?step=1'); // Prepare payment $customer = new Customer((int)$cart->id_customer); if (!Validate::isLoadedObject($customer)) Tools::redirectLink(__PS_BASE_URI__.'order.php?step=1'); $currency = new Currency(Tools::getValue('currency_payement', false) ? Tools::getValue('currency_payement') : $cookie->id_currency); $total = (float)($cart->getOrderTotal(true, Cart::BOTH)); $payu->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $payu->displayName, NULL,NULL, (int)$currency->id, false, $customer->secure_key); Tools::redirect('index.php?controller=order-confirmation&id_cart='.(int)$cart->id.'&id_module='.$payu->id.'&id_order='.$payu->currentOrder.'&key='.$customer->secure_key); include('../../footer.php'); payu.zip Link to comment Share on other sites More sharing options...
vekia Posted August 31, 2015 Share Posted August 31, 2015 if you want multiply total variable just use $total = $total * 1.02; Link to comment Share on other sites More sharing options...
Designinfo Posted September 16, 2015 Author Share Posted September 16, 2015 which part of the code do I enter that? Not working Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now