PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

Offline CC Module not secure

6 replies to this topic
#1
sweber25

    PrestaShop Apprentice

  • Members
  • PipPip
  • 26 posts
I have an SSL Cert installed on my site and when a checkout is initiated it is redirected to the https until the customer clicks on the "Pay By Credit Card" link and it reverts back to http. Any ideas why this is doing it ? Most importantly what can I do to fix it?

PS: YOU CAN USE THE FOLLOWING LOG IN INFORMATION TO PLACE A TEST ORDER:

USER: SPOOKYIN21@YAHOO.COM
PASS: GUEST

CC NO: 4444333322221111
EXP : 06/12
C.VV : 155

I WILL DELETE ANY ORDERS WITH THIS CC NUMBER ON IT.
Thanks,

Scott W.
www.bargainbookbuy.com

#2
rocky

    PrestaShop Superstar

  • US Moderators
  • 9988 posts
Add the following to the top of modules/creditcard/payment.php:

$useSSL = true;

Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.

#3
Web S2dio

    PrestaShop Apprentice

  • Members
  • PipPip
  • 40 posts
And don't forget to activate the SSL option in your Prestashop Back Office.

www.geuros.com/shopro

#4
sweber25

    PrestaShop Apprentice

  • Members
  • PipPip
  • 26 posts
<?php
$useSSL = true;
include(dirname(__FILE__).'/../../config/config.inc.php');
include(dirname(__FILE__).'/../../header.php');
include(dirname(__FILE__).'/creditcard.php');

if (!$cookie->isLogged())
Tools::redirect('authentication.php?back=order.php');

$creditcard = new CreditCard();
echo $creditcard->execPayment($cart);

include_once(dirname(__FILE__).'/../../footer.php');

?>


That is what I have in my payment.php file. I am not sure if the $useSSL = true is in the right place. But it is still not working. SSL is activated in my back office.
Thanks,

Scott W.
www.bargainbookbuy.com

#5
Jalux

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts
Hi sweber25

I had a similar problem this morning, and in my circumstance the issue was with the actual theme.

So I recreated my chosen theme with the one that worked and everything now seems to be fine.


Perhaps you could try one of the free themes or if you still it an unmodified copy of the original prestashop template.

#6
sweber25

    PrestaShop Apprentice

  • Members
  • PipPip
  • 26 posts
Changed theme and everything works fine now, thank you.
Thanks,

Scott W.
www.bargainbookbuy.com

#7
Ox40

    PrestaShop Addict

  • Members
  • PipPipPip
  • 500 posts
Whoever created this post should mark it "[Solved] Offline CC Module not secure". I dont want people getting the wrong impression about my module ;)

I will update the source to add the required $useSSL asap.

--Kevin
Pursuant Solutions, programmers dedicated to the pursuit.