Clicking Back From PayPal Results in "Select a billing address" Error

  • Posts: 31
  • Thank you received: 1
4 years 9 months ago #307405

-- HikaShop version -- : 4.1.0
-- Joomla version -- : 3.9.6
-- PHP version -- : 7.2.19
-- Browser(s) name and version -- : Firefox 67.0.1

After arriving at the paypal.com page, if I click back on the browser instead of proceeding with the payment, the error message "Select a billing address" now shows. In the previous version 4.0.3, this didn't happen.

You can also get the "Select a billing address" error by clicking back on the browser on the "Please wait while you are redirected to PayPal" page, and then clicking forward on browser.

Last edit: 4 years 9 months ago by nyanginator. Reason: Another error case scenario

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
4 years 9 months ago #307406

Hi,

Could you provide a link to the shop and instructions to reproduce the problem (if needed) ?
Could you also tell us how the "clean cart when order is" setting is configured on your HikaShop configuration ?

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

  • Posts: 31
  • Thank you received: 1
4 years 9 months ago #307623

Hi, sorry for the delayed response. Don't know how I wasn't subscribed to the thread.

  1. I setup a new Joomla install and the latest HikaShop with all default settings, except adding in an email for PayPal
  2. I created a product and gave it a price.
  3. Add to cart and checkout. I logged in as admin user to checkout.
  4. Initially, there is no problem. The "Select a billing address" error does not show in the 2 scenarios I noted: 1) clicking back from the paypal.com page, and 2) clicking back then forward from the "redirecting to PayPal" page.
  5. Go into HikaShop configuration and click Save. Don't need to change any settings.
  6. Try checking out again and again clicking back from paypal.com, and clicking back-forward from the redirect page. The error now shows.

"Clean cart when order is" is set on Created (default).

Temporary test site:
This message contains confidential information

Attachments:
Last edit: 4 years 9 months ago by Philip.

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

  • Posts: 4486
  • Thank you received: 609
  • MODERATOR
4 years 9 months ago #307640

Hello,

I process several test (with several browser) on your test website and I only get this result... Basically something is missing, if we aren't able to reproduce the issue we won't be able to solve it.



Awaiting more details from you to progress on your subject
Regards

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

  • Posts: 31
  • Thank you received: 1
4 years 9 months ago #307770

Hi, sorry again for the delay. Somehow I got unsubscribed one more time.

After trying in Chrome and Edge, I realized only one of the problems occurs on those browsers. That is:

  1. While the browser is pausing for 10 seconds to redirect to PayPal, click Back on browser instead of letting it redirect.
  2. Remember to click Forward on the browser aftwards for the error to appear.

For Firefox, the problem occurs in the case described above as well as for clicking Back after getting to the PayPal.com site.

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

  • Posts: 4486
  • Thank you received: 609
  • MODERATOR
4 years 9 months ago #307788

Hello,

Thanks for your details, we work on our side in order to correct your issue and with the same move improve HikaShop.
I will guide you to process some test with a short fix, here the step by step process :
1. Go in YourWebsite\components\com_hikashop\controllers
2. Open the checkout.php file
3. Around line 705, you have this :

if($checkoutHelper->isStoreClosed()) {
	hikaInput::get()->set('layout', 'shop_closed');
	return $this->display();
}

$check = $this->checkWorkflowSteps($step);

if($check !== true)
	$this->app->redirect($checkoutHelper->completeLink('cid='.((int)$check + 1), false, true, false, $checkout_itemid));

	$old_messages = $this->app->getMessageQueue();
4. Add this :
//
// Get and check the cart
//
$cart = $checkoutHelper->getCart();
if(empty($cart) || empty($cart->cart_id) || empty($cart->products)) {
	if(!empty($cart->messages)) {
		// Display messages
		foreach($cart->messages as $msg) {
			$this->app->enqueueMessage($msg['msg'], $msg['type']);
		}
	}
	$this->setRedirect($checkoutHelper->getRedirectUrl(), JText::_('CART_EMPTY'));
		return true;
	}
5. To have this :


Important point, we are awaiting your returns to be sure that this fix is efficient before add it to our next HikaShop releases

Regards

Last edit: 4 years 9 months ago by Philip.

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

  • Posts: 31
  • Thank you received: 1
4 years 9 months ago #307874

Yes! It seems to be working. Thanks for responding so quickly.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.072 seconds
Powered by Kunena Forum