Cart and Credit Card xxxx Fields don't clear after checkout

  • Posts: 2
  • Thank you received: 0
7 years 11 months ago #256963

My cart still has product in it after checkout is completed. My cart setting is set to Clean cart when order is Created. I am using Authorize.net AIM for processing payment. For some reason I as a customer am not receiving order confirmation emails from Hikashop and after trying many of the solutions on the forum, I decided to just change the authorize_thankyou page to display the invoice. The changes I made to the file are below. Not sure if that is causing the cart not emptying issue. I have also tried clearing cache, turning off Joomla cache, turning off the different module caches. It wouldn't bother me so much that the cart didn't empty if it wasn't for the fact that when I try to check out again the Credit Card information is still there with the xxxx formatting, however if I click finish, it places another order with that credit card info. I imagine if I made an order on a public computer someone could potentially create an order and ship to their address but use my CC info. Not sure how to fix this.

defined('_JEXEC') or die('Restricted access');
?><?php
$app = JFactory::getApplication();
$app->enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') ); 

/* Find current order id and show receipt */
// The order is already loaded and present in $this->order ;-)

$app->redirect(hikashop_completeLink('order&task=show&itemId=196&cid='.$this->order->order_id));

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 11 months ago #257009

Hi,

The cart is emptied when the order is created. There is no reason it wouldn't.
It might be because you have previous carts for your current user (due to your repeated tests) and thus the system loads the next one in line.
Go in the menu Customers>Carts, clear all the carts and try again.

You can see that in Authorize.net plugin (file plugins/hikashoppayment/authorize/authorize.php) you have that code which clears the session after the order is created:
$class = hikashop_get('class.cart');
$class->cleanCartFromSession();
And if you look at that function (file administrator/components/com_hikashop/classes/cart.php) you have that code:
$app->setUserState( HIKASHOP_COMPONENT.'.cc_number', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_month', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_year', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_CCV', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_type', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_owner', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_valid', 0);
which wipes out the credit card data of the user session.
So I don't see why you would still get the credit card data in the user session after the order is created, unless you have a problem with your server's PHP user session system. You might want to try changing the "session handler" setting of the Joomla configuration, and/or try on a different server to see if you can replicate the problem. On my end, I can't reproduce the problem.

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
7 years 11 months ago #257061

Changing the session handler from Database to PHP has fixed it. Thanks!!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum