Pat9 Posted February 20, 2015 Share Posted February 20, 2015 (edited) Hello everyone, At start sorry for my English, isn't ideal Maybe someone here will now what i need to do. I have install module for pay by creditcard. All is fine, but when im in basket ( basket have SSL) > choose payment via credit card > going to reasume of order ( site without SSL ) > click buy > transfer to payment site and showing without SSL :/ When i make SSL ON at whole website its fine, there is no problem, but i dont want to have SSL at all pages. Maybe someone now how i can make extorion SSL for just one page ? - in httacces, or i was thinked aslo about add commend to button from ps panel : Turn SSL for basket and account, but to be honest, can't find backoffice files at FTP... Will be great if some one can help me with this, because paying by credit card without SSL make customers scared :/ Forgot to add, at Firefox all is fine, problem showing at Chrome. Thank you, Regs, Patrick Edited February 20, 2015 by Pat9 (see edit history) Link to comment Share on other sites More sharing options...
shacker Posted February 21, 2015 Share Posted February 21, 2015 you can check the tpl of the module, and replace the http for https request. thats solve the issue Link to comment Share on other sites More sharing options...
Pat9 Posted February 21, 2015 Author Share Posted February 21, 2015 (edited) Hi, Im sitting with this 2 days. There is no http in any tpl file in this module. I have tested aslo old version of this module, and there was SSL, but not compatibile with my presta version. In new, there is no SSL in order reasume. Aslo have checked php file, and nothing. Here you have code : PHP : <?php /** * Created by michalz on 13.03.14 * Modified by AdamM on 28.10.2014 */ if (!defined('_PS_VERSION_')) die("Nieznana wersja Prestashop/Unknown Prestashop version."); require_once(dirname(_PS_MODULE_DIR_).'/modules/przelewy24/class_przelewy24.php'); class Przelewy24 extends PaymentModule { /** * */ public function __construct() { //ini_set("error_reporting", 0); $this->name = 'przelewy24'; $this->tab = 'payments_gateways'; $this->version = '3.2.1'; $this->currencies = true; $this->author = 'Dialcom24'; $this->module_key = "5904b0e92c361acd8b5e76bb45b60b2b"; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.5', 'max' => '1.6'); $this->currencies = true; $this->currencies_mode = 'checkbox'; parent::__construct(); $this->displayName = $this->l('Przelewy24'); if (_PS_VERSION_<1.5) { $this->description = 'Wtyczka Przelewy24 w wersji 3 przeznaczona jest wyłącznie dla PrestaShop 1.5 i nowszych. Dla starszych wersji Prestashop użyj wtyczki w wersji 2.x.x (dostępna na naszej stronie internetowej).'; parent::uninstall(); } else { $this->description = $this->l('Przelewy24.pl Payment Service'); } $this->confirmUninstall = $this->l('Are you sure you want to uninstall?'); if (Configuration::get('P24_ORDER_STATE_1')===null) { Configuration::updateValue('P24_ORDER_STATE_1', 1); } if (Configuration::get('P24_ORDER_STATE_2')===null) { Configuration::updateValue('P24_ORDER_STATE_2', 2); } if (Configuration::get('P24_INSTALLMENT_SHOW')===null) { Configuration::updateValue('P24_INSTALLMENT_SHOW', 0); } if (Configuration::get("P24_GOOGLE_ANALYTICS_ENABLED")===null) { Configuration::updateValue("P24_GOOGLE_ANALYTICS_ENABLED", 0); } if (Configuration::get("P24_GOOGLE_ANALYTICS_CODE")===null) { Configuration::updateValue("P24_GOOGLE_ANALYTICS_CODE", ""); } if (Configuration::get("P24_ORDER_TITLE_ID")===null) { Configuration::updateValue("P24_ORDER_TITLE_ID", 0); } if (Configuration::get("P24_SHOW_SUMMARY")===null) { Configuration::updateValue("P24_SHOW_SUMMARY", 0); } } private function validateCredentials($merchant, $pos, $salt, $test) { $P24C=new Przelewy24Class($merchant, $pos, $salt, $test); $ret=$P24C->testConnection(); if ($ret['error']==0) { return true; } return false; } public function getCurrencyCode($currency_id) { $c=$this->getActualCurrencyById($currency_id); return $c['iso_code']; } public function getP24Amount($currency_id, $amount) { $c=$this->getActualCurrencyById($currency_id); if (isset($c['decimals'])&&$c['decimals']=='0') { if (Configuration::get('PS_PRICE_ROUND_MODE')!=null) { switch (Configuration::get('PS_PRICE_ROUND_MODE')) { case 0: $amount = ceil($amount); break; case 1: $amount = floor($amount); break; case 2: $amount = round($amount); break; } } } return number_format($amount, 2, '.', '')*100; } private function getActualCurrencyById($id) { static $currency=null; if ($currency===null) { $currencies = $this->getCurrency($id); foreach ($currencies as $c) { if ($c['id_currency']==$id) { $currency = $c; break; } } } return $currency; } /** * @return string */ public function getContent() { if (Tools::isSubmit('submit')) { Configuration::updateValue('P24_MERCHANT_ID', Tools::getValue('merchantID')); Configuration::updateValue('P24_SHOP_ID', Tools::getValue('posID')); Configuration::updateValue('P24_SALT', Tools::getValue('salt')); Configuration::updateValue('P24_TEST_MODE', Tools::getValue('test_mode')); Configuration::updateValue('P24_TEST_MODE_TRANSACTION', Tools::getValue('test_transaction_select')); Configuration::updateValue('P24_COMMISSION', 0); // zachowanie wstecznej zgodności z wtyczkami 1.4, 1.5 Configuration::updateValue('P24_ORDER_STATE_1', Tools::getValue('order_state_1')); Configuration::updateValue('P24_ORDER_STATE_2', Tools::getValue('order_state_2')); Configuration::updateValue('P24_INSTALLMENT_SHOW', Tools::getValue('installment_show')); Configuration::updateValue("P24_GOOGLE_ANALYTICS_ENABLED", (Tools::getValue("google_analytics_enabled")!=""?1:0)); Configuration::updateValue("P24_GOOGLE_ANALYTICS_CODE", Tools::getValue("google_analytics_code")); Configuration::updateValue('P24_ORDER_TITLE_ID', Tools::getValue('order_title_id')); Configuration::updateValue("P24_SHOW_SUMMARY", (Tools::getValue("show_summary")!=""?1:0)); $this->_displayForm(true); } else if (!property_exists(Przelewy24, "_html")||!$this->_html) { $this->_displayForm(false); } return $this->_html; } /** * @param bool $b_updated */ private function _displayForm($b_updated = false) { global $cookie; require_once('../classes/order/OrderState.php'); $this->_html = <<<HTML <h2><a target="_blank" href="https://przelewy24.pl"><img src="../modules/przelewy24/img/logo.png" title="Przelewy24" alt="Przelewy24" /></a> {$this->l("Configuration")}</h2> <p style="font-size: 16px;">{$this->l("Here you can change integration settings of Przelewy24 Payment Module")}</p> <script type="text/javascript"> $(function() { $("#test_mode").change( function() { var o_Test_Transaction=$("#test-transaction"); if($(this).val()==1) { o_Test_Transaction.css("visibility","visible"); } else { o_Test_Transaction.css("visibility","hidden"); } } ); }); </script> HTML; $merchantId = Configuration::get('P24_MERCHANT_ID'); $posId = Configuration::get('P24_SHOP_ID'); $salt = Configuration::get('P24_SALT'); $test = Configuration::get('P24_TEST_MODE'); $valid=$this->validateCredentials($merchantId, $posId, $salt, $test); $status_src=$valid?'../img/admin/icon-valid.png':'../img/admin/icon-cancel.png'; if ($b_updated) { if ($valid) { $this->_html .= <<<HTML <div class="conf confirm"> <img alt="Potwierdź" src="../img/admin/ok.gif"/>{$this->l("Updated")} </div> HTML; } else { $this->_html .= <<<HTML <div class="conf confirm"> <img alt="Potwierdź" src="../img/admin/forbbiden.gif"/>{$this->l("Wrong CRC Key for this Merchant/Shop ID and module mode!")} </div> HTML; } } $this->_html .= <<<HTML <fieldset> <legend><img src="../img/admin/error.png" />{$this->l("Important Information")}</legend> <p>{$this->l("You have to be registered to use module Przelewy24. If you have just done it, you can configure module in Payment Settings. However if you still have not registered, go to")} <a target="_blank" href="https://www.przelewy24.pl/cms,20,rejestracja.htm">{$this->l("this link")}</a>.</p> </fieldset> <form action="{$_SERVER["REQUEST_URI"]}" method="post"> <fieldset> <legend><img src="../img/admin/payment.gif" />{$this->l('Payment Settings')}</legend> <table> <tr> <td><label><img src="../img/admin/tab-customers.gif" />{$this->l("Merchant ID")}<br /><small style="color:red">{$this->l("mandatory")}</small></label></td> <td><input id="merchantID" type="text" name="merchantID" value="{$merchantId}" /><img id="merchantIDStatusIcon" src="{$status_src}" style="width: 23px; height: 23px" /></td> </tr> <tr> <td></td> <td style="font-size:10px;padding: 0px 0px 5px 0px;"><img src="../img/admin/information.png" style="width:14px;height:14px;" />{$this->l("Where is ID")}</td> </tr> HTML; $this->_html .= <<<HTML <tr> <td><label><img src="../img/admin/tab-customers.gif" />{$this->l("Shop ID")}<br /><small style="color:red">{$this->l("mandatory")}</small></label></td> <td><input id="posID" type="text" name="posID" value="{$posId}" /><img id="posIDStatusIcon" src="{$status_src}" style="width: 23px; height: 23px" /></td> </tr> <tr> <td></td> <td style="font-size:10px;padding: 0px 0px 5px 0px;"><img src="../img/admin/information.png" style="width:14px;height:14px;" />{$this->l("Where is ID")}</td> </tr> HTML; $this->_html .= <<<HTML <tr> <td><label><img src="../img/admin/tab-customers.gif" />{$this->l("CRC Key")}<br /><small style="color:red">{$this->l("mandatory")}</small></label></td> <td><input id="salt" type="text" name="salt" value="{$salt}" /><img id="saltStatusIcon" src="{$status_src}" style="width: 23px; height: 23px" /></td> </tr> <tr> <td></td> <td style="font-size:10px;padding: 0px 0px 10px 0px;"><img src="../img/admin/information.png" style="width:14px;height:14px;" />{$this->l("Where is CRC")}</td> </tr> HTML; $order_title_id_0_selected = ((Configuration::get('P24_ORDER_TITLE_ID')==0)?' selected="selected"':''); $order_title_id_1_selected = ((Configuration::get('P24_ORDER_TITLE_ID')==1)?' selected="selected"':''); $this->_html .= <<<HTML <tr> <td><label for="order_title_id">{$this->l('Order id in title')}</label></td> <td> <select id="order_title_id" name="order_title_id"> <option value="0"{$order_title_id_0_selected}>{$this->l("Order id in database (e.g. 1, 2, 3)")}</option> <option value="1"{$order_title_id_1_selected}>{$this->l("Masked order id (e.g. QYTUVLHOW)")}</option> </select> </td> </tr> HTML; $show_summary_checked = ((Configuration::get('P24_SHOW_SUMMARY')==1)?' checked="checked"':''); $this->_html .= <<< HTML <tr> <td><label for="show_summary"><h5 style="display: inline">{$this->l("Show summary on confirmation page")}</h5></label></td> <td><input type="checkbox" name="show_summary" id="show_summary"{$show_summary_checked} /></td> </tr> <tr> <td><label>{$this->l('Status before completing payment')}</label></td> <td> <select name="order_state_1"> HTML; foreach (OrderStateCore::getOrderStates($cookie->id_lang) as $orderState) { $selected = (Configuration::get('P24_ORDER_STATE_1')==$orderState['id_order_state'])?' selected="selected"':''; $this->_html .= <<<HTML <option value="{$orderState['id_order_state']}"{$selected}>{$orderState['name']}</option>'; HTML; } $this->_html .= <<<HTML </select> </td> </tr> <tr> <td><label>{$this->l('Status after completing payment')}</label></td> <td> <select name="order_state_2"> HTML; foreach (OrderStateCore::getOrderStates($cookie->id_lang) as $orderState) { $selected = (Configuration::get('P24_ORDER_STATE_2')==$orderState['id_order_state'])?' selected="selected"':''; $this->_html .= <<<HTML <option value="{$orderState['id_order_state']}"{$selected}>{$orderState['name']}</option>'; HTML; } $this->_html .= <<<HTML </select> </td> </tr> HTML; $test_mode_1_selected = (($test==1)?' selected="selected"':''); $test_mode_2_selected = (($test==0)?' selected="selected"':''); $this->_html .= <<<HTML <tr> <td rowspan="2"><label>{$this->l('Module mode')}</label></td> <td> <h5 style="display:inline">{$this->l('Mode:')}</h5> <select name="test_mode" id="test_mode" style="margin-left:16px"> <option value="1"{$test_mode_1_selected}>{$this->l('test')}</option> <option value="0"{$test_mode_2_selected}>{$this->l('normal')}</option> </select> </td> </tr> HTML; $test_transaction_1_select = ((Configuration::get('P24_TEST_MODE_TRANSACTION')==1)?' selected="selected"':''); $test_transaction_0_select = ((Configuration::get('P24_TEST_MODE_TRANSACTION')==0)?' selected="selected"':''); $test_transaction_visible = ((Configuration::get('P24_TEST_MODE')==1)?'visible':'hidden'); $this->_html .= <<<HTML <tr> <td id="test-transaction" style="visibility:{$test_transaction_visible}"> <h5 style="display:inline">{$this->l('Test transaction type:')}</h5> <select name="test_transaction_select" id="test_transaction_select" style="margin-left:9px"> <option value="1"{$test_transaction_1_select}>{$this->l('correct')}</option> <option value="0"{$test_transaction_0_select}>{$this->l('faulty')}</option> </select> </td> </tr> </table> </fieldset> HTML; $installment_2_show = ((Configuration::get('P24_INSTALLMENT_SHOW')==2)?' selected="selected"':''); $installment_1_show = ((Configuration::get('P24_INSTALLMENT_SHOW')==1)?' selected="selected"':''); $installment_0_show = ((Configuration::get('P24_INSTALLMENT_SHOW')==0)?' selected="selected"':''); $this->_html .= <<<HTML <fieldset> <legend><img src="../img/admin/invoice.gif" />{$this->l('Installment Settings')}</legend> <table> <tr> <td><label for="installment_show"><h5 style="display:inline">{$this->l('Show')}</h5></label></td> <td> <select name="installment_show" id="installment_show"> <option value="2"{$installment_2_show}>{$this->l('button (payment page) and information (product page)')}</option> <option value="1"{$installment_1_show}>{$this->l('button (payment page) only')}</option> <option value="0"{$installment_0_show}>{$this->l('hide all')}</option> </select> </td> </tr> </table> </fieldset> HTML; $google_analytics_enabled_checked = ((Configuration::get('P24_GOOGLE_ANALYTICS_ENABLED')==1)?' checked="checked"':''); $google_analytics_code = Configuration::get('P24_GOOGLE_ANALYTICS_CODE'); $this->_html .= <<<HTML <fieldset> <legend><img src="../modules/przelewy24/img/admin/ga.png" />{$this->l("Google Analytics Settings")}</legend> <table> <tr> <td><label for="google_analytics_enabled"><h5 style="display: inline">{$this->l("Enable")}</h5></label></td> <td><input type="checkbox" name="google_analytics_enabled" id="google_analytics_enabled"{$google_analytics_enabled_checked} /></td> </tr> <tr> <td><label for="google_analytics_code"><h5 style="display: inline">{$this->l("Google Analytics Following Code")}</h5></label></td> <td><textarea name="google_analytics_code" id="google_analytics_code" style="resize: vertical; height: 150px;" cols="100" rows="10">{$google_analytics_code}</textarea></td> </tr> </table> </fieldset> <input type="submit" name="submit" value="{$this->l('Save settings')}" class="button" /> </form> HTML; } /** * @return bool */ public function install() { if (_PS_VERSION_>=1.5) { parent::install(); $rq = Db::getInstance()->getRow('SELECT `id_order_state` FROM `'._DB_PREFIX_.'order_state_lang` WHERE id_lang = \''.pSQL('1').'\' AND name = \''.pSQL('Oczekiwanie na płatność Przelewy24').'\''); if ($rq&&isset($rq['id_order_state'])&&intval($rq['id_order_state'])>0) { define('P24_ORDER_STATE_1', $rq['id_order_state']); Configuration::updateValue('P24_ORDER_STATE_1', $rq['id_order_state']); } else { Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'order_state` (`unremovable`, `color`) VALUES(1, \'lightblue\')'); $stateid = Db::getInstance()->Insert_ID(); $result = Db::getInstance()->ExecuteS('SELECT `id_lang` FROM `'._DB_PREFIX_.'lang`'); foreach ($result as $row) { Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'order_state_lang` (`id_order_state`, `id_lang`, `name`) VALUES('.intval($stateid).', '.intval($row['id_lang']).', \'Oczekiwanie na płatność Przelewy24\')'); } define('P24_ORDER_STATE_1', $stateid); Configuration::updateValue('P24_ORDER_STATE_1', $stateid); } $rq = Db::getInstance()->getRow('SELECT `id_order_state` FROM `'._DB_PREFIX_.'order_state_lang` WHERE id_lang = \''.pSQL('1').'\' AND name = \''.pSQL('Płatność Przelewy24 przyjęta').'\''); if ($rq&&isset($rq['id_order_state'])&&intval($rq['id_order_state'])>0) { define('P24_ORDER_STATE_2', $rq['id_order_state']); Configuration::updateValue('P24_ORDER_STATE_2', $rq['id_order_state']); } else { Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'order_state` (`unremovable`, `color`, `paid`, `invoice`) VALUES(1, \'Limegreen\', 1, 1)'); $stateid = Db::getInstance()->Insert_ID(); foreach ($result as $row) { Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'order_state_lang` (`id_order_state`, `id_lang`, `name`) VALUES('.intval($stateid).', '.intval($row['id_lang']).', \'Płatność Przelewy24 przyjęta\')'); } define('P24_ORDER_STATE_2', $stateid); Configuration::updateValue('P24_ORDER_STATE_2', $stateid); } if (!$this->registerHook('payment')||!$this->registerHook('displayOrderDetail')||!$this->registerHook('displayRightColumnProduct')||!$this->createAmountTable()) return false; return true; } else { parent::uninstall(); return false; } } /** * @return bool */ private function createAmountTable() { Db::getInstance()->Execute('CREATE TABLE IF NOT EXISTS`'._DB_PREFIX_.'przelewy24_amount` ( `i_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `s_sid` char(32) NOT NULL, `i_id_order` INT UNSIGNED NOT NULL , `i_amount` INT UNSIGNED NOT NULL ) ENGINE=MYISAM;'); return true; } public function hookPayment() { global $smarty, $cart; $amount = $cart->getOrderTotal(true, Cart::BOTH); $protocol = Przelewy24::getHttpProtocol(); $smarty->assign('p24_url', $protocol.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__); $smarty->assign('p24_url_payment', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation')); $smarty->assign('p24_url_installment', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation', array('payment_method'=>'129'))); if ($amount>=300) { $smarty->assign('p24_installment_show', Configuration::get('P24_INSTALLMENT_SHOW')); } else { $smarty->assign('p24_installment_show', 0); } return $this->display(__FILE__, 'payment.tpl'); } public function hookDisplayRightColumnProduct() { global $smarty, $cookie; if (Configuration::get('P24_INSTALLMENT_SHOW')==2) { $productID = Tools::getValue('id_product'); if (isset($productID)&&$productID!='') { $product = new Product((int)$productID, true, $cookie->id_lang); $amount = $product->getPrice(true, null, 2, null, false, true, 1); $context = Context::getContext(); $id_currency = (int)Validate::isLoadedObject($context->currency) ? $context->currency->id : Configuration::get('PS_CURRENCY_DEFAULT'); $currencies = $this->getCurrency(intval($id_currency)); $currency = 'PLN'; foreach ($currencies as $c) { if ($c['id_currency']==$id_currency) { $currency = $c['iso_code']; } } if ($amount>=300 && $currency=='PLN') { $amountGrosh = $amount*100; $isCurl = function_exists('curl_init')&&function_exists('curl_setopt')&&function_exists('curl_exec')&&function_exists('curl_close'); if ($isCurl) { $userAgent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; $url = "https://secure.przelewy24.pl/kalkulator_raty.php?ammount=".$amountGrosh; $curlConnection = curl_init(); curl_setopt($curlConnection, CURLOPT_URL, $url); curl_setopt($curlConnection, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($curlConnection, CURLOPT_USERAGENT, $userAgent); curl_setopt($curlConnection, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curlConnection, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($curlConnection); } $result_tab = explode('<br>', $result); $smarty->assign(array( 'part_count'=>$result_tab[0], 'part_cost'=>$result_tab[1], 'product_ammount'=>$amount, )); return $this->display(__FILE__, 'installmentRightColumnProduct.tpl'); } } } } public function hookDisplayOrderDetail() { global $smarty; $orderID = $_GET['id_order']; $result = Db::getInstance()->getRow('SELECT module, current_state FROM `'._DB_PREFIX_.'orders` WHERE `id_order`="'.$orderID.'"'); if (count($result)&&$result['module']=='przelewy24'&&$result['current_state']!=Configuration::get('P24_ORDER_STATE_2')) { $smarty->assign('p24_retryPaymentUrl', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation', array('order_id'=>$orderID))); return $this->display(__FILE__, 'renewPaymentOrderDetail.tpl'); } } public static function getHttpProtocol() { if (isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']!='off') { } else { } } } TPL from confirmation page : <!-- Created by michalz on 13.03.14 --> <!-- Modified by AdamM on 28.10.2014 --> {capture name=path}{l s='Pay with Przelewy24' mod='przelewy24'}{/capture} {assign var='current_step' value='payment'} {include file="$tpl_dir./order-steps.tpl"} <div class="box" style="overflow: auto;"> <h2><img src="https://vparfumerie.de/modules/przelewy24/logo.png" alt="{l s='Payment confirmation' mod='przelewy24'}"/></a> {l s="Pay with Przelewy24" mod="przelewy24"} </h2> <hr/> {if $p24_show_summary} <h4>{l s="Transaktionsdaten:" mod="przelewy24"}</h4> <table> <tr> <th>{l s="Kunde" mod="przelewy24"}</th> <td>{$p24_client}</td> </tr> <tr> <th>{l s="E-mail" mod="przelewy24"}</th> <td>{$p24_email}</td> </tr> <tr> <th>{l s="Gesamt" mod="przelewy24"}</th> <td>{$p24_classic_amount}</td> </tr> </table> <hr/> {/if} <p>{l s='Artikel im Warenkorb' mod="przelewy24"}: <span class="pods">{$cart_qties}</span></p> {foreach from=$products item=name} <p>- <span class="pods">{$name.name}</span>, {l s='Menge'}: <span class="pods">{$name.cart_quantity}</span>, {l s='Preis' mod="przelewy24"}: <span class="pods">{l s='Produkte Gesamtpreis exkl. MwSt:'} {$name.total} {$currency->sign} {l s='+'} {l s=' MwSt: '}{($name.total_wt - $name.total)|round:2} {$currency->sign}{l s=', Gesamtpreis inkl. MwSt: '} {$name.total_wt} {$currency->sign}</span>.</p> {/foreach} <p>{l s='Lieferart inkl MwSt.:' mod="przelewy24"}: <span class="pods">{$shippingCost} {$currency->sign}</span></p> {if isset($productsNumber) && $productsNumber <= 0} <p style="font-size: 16px; line-height: 20px;">{l s='Your shopping cart is empty.' mod='przelewy24'}</p> {else} <p style="font-size: 16px; line-height: 20px;"> {l s='Drücken Sie auf "Kaufen" Ihre Bestellung zu bestätigen und zu przelewy24 umgeleitet werden, wo Sie die Zahlung abzuschließen.' mod='przelewy24'} <form action="{$p24_url}" method="post" id="przelewy24Form" name="przelewy24Form" accept-charset="utf-8"> <input type="hidden" name="p24_merchant_id" value="{$p24_merchant_id}" /> <input type="hidden" name="p24_session_id" value="{$p24_session_id}" /> <input type="hidden" name="p24_pos_id" value="{$p24_pos_id}" /> <input type="hidden" name="p24_amount" value="{$p24_amount}" /> <input type="hidden" name="p24_currency" value="{$p24_currency}" /> <input type="hidden" name="p24_description" value="{$p24_description}" id="orderDescription" /> <input type="hidden" name="p24_email" value="{$p24_email}" /> <input type="hidden" name="p24_client" value="{$p24_client}" /> <input type="hidden" name="p24_address" value="{$p24_address}" /> <input type="hidden" name="p24_zip" value="{$p24_zip}" /> <input type="hidden" name="p24_city" value="{$p24_city}" /> <input type="hidden" name="p24_country" value="{$p24_country}" /> <input type="hidden" name="p24_language" value="{$p24_language}" /> {if $p24_method != ''} <input type="hidden" name="p24_method" value="{$p24_method}"/> {/if} <input type="hidden" name="p24_url_status" value="{$p24_url_status}" /> <input type="hidden" name="p24_url_return" value="{$p24_url_return}" /> <input type="hidden" name="p24_url_cancel" value="{$p24_url_cancel}" /> <input type="hidden" name="p24_api_version" value="{$p24_api_version}" /> <input type="hidden" name="p24_sign" value="{$p24_sign}" /> <p style="color: red;" id="ajaxOutput"></p> </form> {/if} </div> <p class="cart_navigation" style="display: block !important"> {if isset($productsNumber) && $productsNumber <= 0} <a href="{$base_dir_ssl}index.php" class="button_large"> <i class="icon-chevron-left"></i>{l s='Return to shop' mod='przelewy24'} </a> {else} <a href="{$base_dir_ssl}index.php?controller=order?step=3" class="{if $ps_version >= 1.6 }button-exclusive btn btn-default{else}button_large{/if}"> <i class="icon-chevron-left"></i>{l s='Other payment methods' mod='przelewy24'} </a> <a class="exclusive_large" href="javascript:document.getElementById('przelewy24Form').submit();"> <span id="proceedPaymentLink"> {l s='Confirm' mod='przelewy24'} </span> </a> {/if} </p> Cant find anything. Maybe there is miss SSL command... really dont now, and dont have power for this :/ Edited February 21, 2015 by Pat9 (see edit history) Link to comment Share on other sites More sharing options...
shacker Posted February 21, 2015 Share Posted February 21, 2015 sorry, i forgot the links: {$link->getPageLink('order', true, find the links like this and must be setted to true to enable ssl but in the php, here you get the call to protocol $smarty->assign('p24_url', $protocol.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__); $smarty->assign('p24_url_payment', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation')); $smarty->assign('p24_url_installment', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation', array('payment_method'=>'129'))); change to $smarty->assign('p24_url', $protocol.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__); $smarty->assign('p24_url_payment', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation', null, true)); $smarty->assign('p24_url_installment', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation', array('payment_method'=>'129', true))); Link to comment Share on other sites More sharing options...
Pat9 Posted February 21, 2015 Author Share Posted February 21, 2015 I have checked all files, and there is no any : {$link->getPageLink('order', true, Aslo, when i change : $smarty->assign('p24_url', $protocol.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__); $smarty->assign('p24_url_payment', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation')); $smarty->assign('p24_url_installment', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation', array('payment_method'=>'129'))); to $smarty->assign('p24_url', $protocol.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__); $smarty->assign('p24_url_payment', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation', null, true)); $smarty->assign('p24_url_installment', $this->context->link->getModuleLink('przelewy24', 'paymentConfirmation', array('payment_method'=>'129', true))); Website stop working, only white site without nothing.. Its sick . Link to comment Share on other sites More sharing options...
shacker Posted February 21, 2015 Share Posted February 21, 2015 if si a free module, attach here and i look it Link to comment Share on other sites More sharing options...
Pat9 Posted February 21, 2015 Author Share Posted February 21, 2015 Hi, You need go that link : http://www.przelewy24.pl/files/cms/16/przelewy24_presta15_16.zip Aslo, i see at confirmation page, there is one thing without https : <script type="text/javascript" src="http://vparfumerie.de/themes/vparfumerie/cache/v_64_1df7a44de52bce4f7403d12f4377c1b6.js"></script> - maybe here is problem ? Have checked but dont now when can change it for https. When i force SSL at whole website, normal change to https, but cant have ssl at wholewebsite/ Thank you for your time! Link to comment Share on other sites More sharing options...
shacker Posted February 21, 2015 Share Posted February 21, 2015 edit the payment confirmation.tpl, in views folder you have http <a href="http://przelewy24.pl also you have <form action="{$p24_url}" method="post" id="przelewy24Form" name="przelewy24Form" accept-charset="utf-8"> you can check in google chrome the url of this form and change this {$p24_url} for the ssl url Link to comment Share on other sites More sharing options...
Pat9 Posted February 21, 2015 Author Share Posted February 21, 2015 Please, check the my file, because this one module wich you download is new, without any changes : My tpl confirmation file is : <!-- Created by michalz on 13.03.14 --> <!-- Modified by AdamM on 28.10.2014 --> {capture name=path}{l s='Pay with Przelewy24' mod='przelewy24'}{/capture} {assign var='current_step' value='payment'} {include file="$tpl_dir./order-steps.tpl"} <div class="box" style="overflow: auto;"> <h2><img src="https://vparfumerie.de/modules/przelewy24/logo.png" alt="{l s='Payment confirmation' mod='przelewy24'}"/></a> {l s="Pay with Przelewy24" mod="przelewy24"} </h2> <hr/> {if $p24_show_summary} <h4>{l s="Transaktionsdaten:" mod="przelewy24"}</h4> <table> <tr> <th>{l s="Kunde" mod="przelewy24"}</th> <td>{$p24_client}</td> </tr> <tr> <th>{l s="E-mail" mod="przelewy24"}</th> <td>{$p24_email}</td> </tr> <tr> <th>{l s="Gesamt" mod="przelewy24"}</th> <td>{$p24_classic_amount}</td> </tr> </table> <hr/> {/if} <p>{l s='Artikel im Warenkorb' mod="przelewy24"}: <span class="pods">{$cart_qties}</span></p> {foreach from=$products item=name} <p>- <span class="pods">{$name.name}</span>, {l s='Menge'}: <span class="pods">{$name.cart_quantity}</span>, {l s='Preis' mod="przelewy24"}: <span class="pods">{l s='Produkte Gesamtpreis exkl. MwSt:'} {$name.total} {$currency->sign} {l s='+'} {l s=' MwSt: '}{($name.total_wt - $name.total)|round:2} {$currency->sign}{l s=', Gesamtpreis inkl. MwSt: '} {$name.total_wt} {$currency->sign}</span>.</p> {/foreach} <p>{l s='Lieferart inkl MwSt.:' mod="przelewy24"}: <span class="pods">{$shippingCost} {$currency->sign}</span></p> {if isset($productsNumber) && $productsNumber <= 0} <p style="font-size: 16px; line-height: 20px;">{l s='Your shopping cart is empty.' mod='przelewy24'}</p> {else} <p style="font-size: 16px; line-height: 20px;"> {l s='Drücken Sie auf "Kaufen" Ihre Bestellung zu bestätigen und zu przelewy24 umgeleitet werden, wo Sie die Zahlung abzuschließen.' mod='przelewy24'} <form action="{$p24_url}" method="post" id="przelewy24Form" name="przelewy24Form" accept-charset="utf-8"> <input type="hidden" name="p24_merchant_id" value="{$p24_merchant_id}" /> <input type="hidden" name="p24_session_id" value="{$p24_session_id}" /> <input type="hidden" name="p24_pos_id" value="{$p24_pos_id}" /> <input type="hidden" name="p24_amount" value="{$p24_amount}" /> <input type="hidden" name="p24_currency" value="{$p24_currency}" /> <input type="hidden" name="p24_description" value="{$p24_description}" id="orderDescription" /> <input type="hidden" name="p24_email" value="{$p24_email}" /> <input type="hidden" name="p24_client" value="{$p24_client}" /> <input type="hidden" name="p24_address" value="{$p24_address}" /> <input type="hidden" name="p24_zip" value="{$p24_zip}" /> <input type="hidden" name="p24_city" value="{$p24_city}" /> <input type="hidden" name="p24_country" value="{$p24_country}" /> <input type="hidden" name="p24_language" value="{$p24_language}" /> {if $p24_method != ''} <input type="hidden" name="p24_method" value="{$p24_method}"/> {/if} <input type="hidden" name="p24_url_status" value="{$p24_url_status}" /> <input type="hidden" name="p24_url_return" value="{$p24_url_return}" /> <input type="hidden" name="p24_url_cancel" value="{$p24_url_cancel}" /> <input type="hidden" name="p24_api_version" value="{$p24_api_version}" /> <input type="hidden" name="p24_sign" value="{$p24_sign}" /> <p style="color: red;" id="ajaxOutput"></p> </form> {/if} </div> <p class="cart_navigation" style="display: block !important"> {if isset($productsNumber) && $productsNumber <= 0} <a href="{$base_dir_ssl}index.php" class="button_large"> <i class="icon-chevron-left"></i>{l s='Return to shop' mod='przelewy24'} </a> {else} <a href="{$base_dir_ssl}index.php?controller=order?step=3" class="{if $ps_version >= 1.6 }button-exclusive btn btn-default{else}button_large{/if}"> <i class="icon-chevron-left"></i>{l s='Other payment methods' mod='przelewy24'} </a> <a class="exclusive_large" href="javascript:document.getElementById('przelewy24Form').submit();"> <span id="proceedPaymentLink"> {l s='Confirm' mod='przelewy24'} </span> </a> {/if} </p> Link to comment Share on other sites More sharing options...
shacker Posted February 23, 2015 Share Posted February 23, 2015 yes, replace the form action url also you have {$p24_url} <form action="{$p24_url}" method="post" id="przelewy24Form" name="przelewy24Form" accept-charset="utf-8"> with the redirect ssl url that you get after leave prestashop site 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