Duplicate orders with PayPal Pro gateway

  • Posts: 5
  • Thank you received: 0
10 years 8 months ago #170987

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4.19
-- Browser(s) name and version -- : N/A
-- Error-message(debug-mod must be tuned on) -- : No error

We are seeing duplicate orders using the PayPal Pro gateway. I'm not sure whether it is a user error or a checkout issue, but we have seen several over the last few days. These are identical, confirmed orders entered within a minute of each other, with separate order numbers, and PayPal is charging the customer for both of them.

I suspect there is something going on with the checkout process, which may be causing the customer to click the checkout button again, refresh the page, or otherwise do something that generates a second order, possibly while waiting for the PayPal Pro process to complete. I have scoured the forum for more info and see a number of similar complaints here, and have checked our settings, but have still found no true solution. I am wondering if there is a solution?

We are attempting to contact our customers to learn what they are experiencing. However, I do think that some changes to Hikashop or related plugins might help prevent this in future. Other cart systems have a checkout button that becomes ghosted or unclickable once it has been clicked, until the gateway processes and returns a status. Or they direct the user to a temporary page with no buttons until the gateway comes back with a status. I also saw mentioned here that perhaps a developer could add a timer to the gateway that would prevent using it again for a few minutes. I don't see any of these options/solutions in the current Hikashop Business version nor the PayPal Pro gateway.

Does anyone have any suggestions as to where to look next or what other possible solution is available?

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

  • Posts: 83894
  • Thank you received: 13581
  • MODERATOR
10 years 8 months ago #171053

Hi,

Edit the file "step" via the menu Display>views and change the line

echo $this->cart->displayButton($checkout_next_button,'next',$this->params, hikashop_completeLink('checkout&task=step&step='.$this->step+1),'if(hikashopCheckChangeForm(\'order\',\'hikashop_checkout_form\')){ if(hikashopCheckMethods()){ document.getElementById(\'hikashop_validate\').value=1; document.forms[\'hikashop_checkout_form\'].submit();}} return false;','id="hikashop_checkout_next_button"');
to:
echo $this->cart->displayButton($checkout_next_button,'next',$this->params, hikashop_completeLink('checkout&task=step&step='.$this->step+1),'if(hikashopCheckChangeForm(\'order\',\'hikashop_checkout_form\')){ if(hikashopCheckMethods()){ document.getElementById(\'hikashop_validate\').value=1; this.disabled = true; document.forms[\'hikashop_checkout_form\'].submit();}} return false;','id="hikashop_checkout_next_button"');
and that will disable the button after the user clicks on it and make sure that he cannot click twice on it.

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

Time to create page: 0.075 seconds
Powered by Kunena Forum