orijit Posted May 6, 2014 Share Posted May 6, 2014 After intregate payumoney payment gateway and after transaction complete i get http://www.put2kart.com/modules/payu/success.php this page. But it does not take (<link href="/themes/put2kart/css/global.css" rel="stylesheet" type="text/css" media="all" />) this stylesheet. How can i include this stylesheet in which page in the header porsion of which file? Please help me. Link to comment Share on other sites More sharing options...
vekia Posted May 6, 2014 Share Posted May 6, 2014 what prestashop version you use? Link to comment Share on other sites More sharing options...
orijit Posted May 6, 2014 Author Share Posted May 6, 2014 PrestaShop™ 1.5.6.2 Link to comment Share on other sites More sharing options...
vekia Posted May 6, 2014 Share Posted May 6, 2014 can you show how the success.php file looks like? Link to comment Share on other sites More sharing options...
orijit Posted May 6, 2014 Author Share Posted May 6, 2014 Sure this is my code <?php include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../init.php'); include(dirname(__FILE__).'/payu.php'); include(dirname(__FILE__).'/../../header.php'); $payu = new payu(); $response=$_REQUEST; $key=Configuration::get('PAYU_MERCHANT_ID'); $salt=Configuration::get('PAYU_SALT'); $log=Configuration::get('PAYU_LOGS'); $baseUrl=Tools::getShopDomain(true, true).__PS_BASE_URI__; $order_id= $response['txnid']; $transactionId= $response['mihpayid']; $smarty->assign('baseUrl',$baseUrl); $smarty->assign('orderId',$order_id); $smarty->assign('transactionId',$transactionId); $amount = $response['amount']; $productinfo = $response['productinfo']; $firstname = $response['firstname'];; $email = $response['email']; $txnid = $response['udf2']; if($response['status'] == 'success') { $Udf1 = $response['udf1']; $Udf2 = $response['udf2']; $Udf3 = $response['udf3']; $Udf4 = $response['udf4']; $Udf5 = $response['udf5']; $Udf6 = $response['udf6']; $Udf7 = $response['udf7']; $Udf8 = $response['udf8']; $Udf9 = $response['udf9']; $Udf10 = $response['udf10']; $txnid=$response['txnid']; $keyString = $key.'|'.$txnid.'|'.$amount.'|'.$productinfo.'|'.$firstname.'|'.$email.'|'.$Udf1.'|'.$Udf2.'|'.$Udf3.'|'.$Udf4.'|'.$Udf5.'|'.$Udf6.'|'.$Udf7.'|'.$Udf8.'|'.$Udf9.'|'.$Udf10; $keyArray = explode("|",$keyString); $reverseKeyArray = array_reverse($keyArray); $reverseKeyString=implode("|",$reverseKeyArray); if($log==1 ) { $responseValue= str_replace( "'"," ",implode(",",$response)); $successQuery="update ps_payu_order set payment_response='$responseValue' where id_order= ".$order_id;; Db::getInstance()->Execute($successQuery); } $status=$response['status']; $saltString = $salt.'|'.$status.'|'.$reverseKeyString; $sentHashString = strtolower(hash('sha512', $saltString)); // print_r($sentHashString);echo" "; $responseHashString=$_REQUEST['hash']; //print_r($responseHashString); if($sentHashString != $responseHashString) { $history = new OrderHistory(); $history->id_order = (int)($order_id); $history->changeIdOrderState(Configuration::get('PS_OS_ERROR'), $history->id_order); $history->add(); $smarty->display('failure.tpl'); } else { $history = new OrderHistory(); $history->id_order = (int)$response['txnid']; $smarty->display('success.tpl'); $history->changeIdOrderState(2, $history->id_order/*(int)($order_id)*/); $history->add(); } } include(dirname(__FILE__).'/../../footer.php'); Link to comment Share on other sites More sharing options...
orijit Posted May 6, 2014 Author Share Posted May 6, 2014 And my success.tpl file code <strong>You have successfully paid your order.</strong><br /><br /><strong>Your order-id is {$orderId} </strong><br /><br /><p > <a href="{$baseUrl}" title="Continue Shopping"> Continue Shopping </a> <link href="{$baseUrl}themes/default/css/grid_prestashop.css" rel="stylesheet" type="text/css" media="all" /> <link href="{$baseUrl}themes/default/css/global.css" rel="stylesheet" type="text/css" media="all" /></p> I'think need to change (<link href="{$baseUrl}themes/default/css/global.css" rel="stylesheet" type="text/css" media="all" />) this to <link href="{$baseUrl}themes/put2kart/css/global.css" rel="stylesheet" type="text/css" media="all" />.Is this right thinking ? Link to comment Share on other sites More sharing options...
vekia Posted May 6, 2014 Share Posted May 6, 2014 try to change this: include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../init.php'); include(dirname(__FILE__).'/payu.php'); include(dirname(__FILE__).'/../../header.php'); to this: include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../init.php'); include(dirname(__FILE__).'/payu.php'); $context = Context::getContext(); $fc=new Frontcontroller(); $fc->setmedia(); include(dirname(__FILE__).'/../../header.php'); and let me know what's going on then 1 Link to comment Share on other sites More sharing options...
orijit Posted May 6, 2014 Author Share Posted May 6, 2014 Working thankyou vekia you solve my problem again Thanks a lot. Problem solved. Link to comment Share on other sites More sharing options...
vekia Posted May 6, 2014 Share Posted May 6, 2014 great ! i marked topic as solved. with regards, Milos Link to comment Share on other sites More sharing options...
pbdwaj Posted November 6, 2014 Share Posted November 6, 2014 Hello Vekia, i am using prestashop 1.6 and facing the same problem. after payment confirmation the page does not loads successfully. i have attached the snapshot for your reference. Please guide me for this. Link to comment Share on other sites More sharing options...
vekia Posted November 7, 2014 Share Posted November 7, 2014 module doesnt support prestashop in version 1.6 as you can see in url bar, module executes .php file this is not how payment modules in prestashop 1.6 works you have to: - create controller to support 1.6 version - apply modifications that i suggested to use, it's not a solution for prestashop 1.6, it's a kind of workaround. Link to comment Share on other sites More sharing options...
Abhishekbafna Posted February 7, 2015 Share Posted February 7, 2015 Kewl venkia, you are great.. workaround works for PS1.6 too. Superb 1 Link to comment Share on other sites More sharing options...
muhammedsabir2007 Posted June 17, 2015 Share Posted June 17, 2015 i want to integrate payumoney to myshop ..am using prestashop 1.6 .. am newone in prestashop please help me... Link to comment Share on other sites More sharing options...
CoolDesigner Posted September 14, 2015 Share Posted September 14, 2015 Hello Guys, I'm using PS 1.6.0.14 and I post my problem many times and asked for solution.. but no one reply.. Please go through the link below.. www.freshwana.com please check out with any product by using the credentials below.. Test Credit Card Name: Use your name Test Card Number: 5123456789012346 Test C.V.V: 123 Test Expiry: May 2017 Issue : After completion of transaction (Payment accepted) it's redirected without any order ID and with out any success message.. it showing only the header part.. if you press the ENTER in the URL bar (https://www.freshwana.com/modules/payu/success.php) then it's showing order details page.. url will look like this example https://www.freshwana.com/index.php?controller=order-detail?id_order=38 ******************************************* success.php ******************************************* <?php include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../init.php'); include(dirname(__FILE__).'/payu.php'); $context = Context::getContext(); $fc=new Frontcontroller(); $fc->setmedia(); include(dirname(__FILE__).'/../../header.php'); $payu = new payu(); $response=$_REQUEST; $key=Configuration::get('PAYU_MERCHANT_ID'); $salt=Configuration::get('PAYU_SALT'); $log=Configuration::get('PAYU_LOGS'); $baseUrl=Tools::getShopDomain(true, true).__PS_BASE_URI__; $order_id= $response['txnid']-354572829452247; $transactionId= $response['mihpayid']; $smarty->assign('baseUrl',$baseUrl); $smarty->assign('orderId',$order_id); $smarty->assign('transactionId',$transactionId); $amount = $response['amount']; $productinfo = $response['productinfo']; $firstname = $response['firstname'];; $email = $response['email']; if($response['status'] == 'success' || $response['status'] == 'in progress') { $Udf1 = $response['udf1']; $Udf2 = $response['udf2']; $Udf3 = $response['udf3']; $Udf4 = $response['udf4']; $Udf5 = $response['udf5']; $Udf6 = $response['udf6']; $Udf7 = $response['udf7']; $Udf8 = $response['udf8']; $Udf9 = $response['udf9']; $Udf10 = $response['udf10']; $txnid=$response['txnid']; $keyString = $key.'|'.$txnid.'|'.$amount.'|'.$productinfo.'|'.$firstname.'|'.$email.'|'.$Udf1.'|'.$Udf2.'|'.$Udf3.'|'.$Udf4.'|'.$Udf5.'|'.$Udf6.'|'.$Udf7.'|'.$Udf8.'|'.$Udf9.'|'.$Udf10; $keyArray = explode("|",$keyString); $reverseKeyArray = array_reverse($keyArray); $reverseKeyString=implode("|",$reverseKeyArray); if($log==1 ) { $responseValue= str_replace( "'"," ",implode(",",$response)); $successQuery="update ps_payu_order set payment_response='$responseValue' where id_order= ".$order_id;; Db::getInstance()->Execute($successQuery); } $status=$response['status']; $saltString = $salt.'|'.$status.'|'.$reverseKeyString; $sentHashString = strtolower(hash('sha512', $saltString)); $responseHashString=$_REQUEST['hash']; if($sentHashString != $responseHashString) { $history = new OrderHistory(); $history->id_order = (int)($order_id); $history->changeIdOrderState(Configuration::get('PS_OS_ERROR'), $history->id_order); $history->add(); $smarty->display('failure.tpl'); } else { global $cart,$cookie; $total = $amount; $currency = new Currency(Tools::getValue('currency_payement', false) ? Tools::getValue('currency_payement') : $cookie->id_currency); $customer = new Customer((int)$cart->id_customer); if($response['status'] == 'success') $payu->validateOrder((int)$cart->id, Configuration::get('PS_OS_PAYMENT'), $total, $payu->displayName, NULL, NULL, (int)$currency->id, false, $customer->secure_key); else $payu->validateOrder((int)$cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $payu->displayName, NULL, NULL, (int)$currency->id, false, $customer->secure_key); $smarty->display('success.tpl'); $result = Db::getInstance()->getRow('SELECT * FROM ' . _DB_PREFIX_ . 'orders WHERE id_cart = ' . (int)$cart->id); Tools::redirectLink(__PS_BASE_URI__ . 'order-detail.php?id_order=' . $result['id_order']); } } include(dirname(__FILE__).'/../../footer.php'); ?> **************************************************************************** ******************************* success.tpl ******************************* <br /> <strong>You have successfully paid your order.</strong> <br /> <strong>Your order-id is {$orderId} </strong> <br /> <br /> <p > <a href="{$baseUrl}" title="Continue Shopping"> Continue Shopping <link href="{$baseUrl}themes/default/css/product_list.css" rel="stylesheet" type="text/css" media="all" /> <link href="{$baseUrl}themes/default/css/grid_prestashop.css" rel="stylesheet" type="text/css" media="all" /> <link href="{$baseUrl}themes/default/css/global.css" rel="stylesheet" type="text/css" media="all" /> </a> </p> **************************************************************************** Guys! please can any solve this issue..that will really help.. I can't live the site regarding this issue.. please help me.. plese help somebody.. Thanks a lot.. Link to comment Share on other sites More sharing options...
ubucksindia Posted March 22, 2016 Share Posted March 22, 2016 Hello How to create payment response for Paytm Link to comment Share on other sites More sharing options...
Recommended Posts