Duplicate-Orders (PayPal-Checkout): 1x Open + 1x Confirmend

  • Posts: 3
  • Thank you received: 0
6 months 2 weeks ago #360980

-- HikaShop version -- : 5.0.4
-- Joomla version -- : 4.4.4
-- PHP version -- : 8.2.18
-- Browser(s) name and version -- : Chrome 124.0.6367

I currently use the PayPal Checkout plugin. Unfortunately, two orders are generated when using the plugin. One remains in the status "open", the other is then correctly set to the order status "confirmed" together with the invoice when the PayPal payment is completed. Unfortunately, this confuses customers as two orders appear to be recorded. I have to explain this regularly and then correct the first (open) order manually. Is there a configuration for this that I have overlooked, or any fix?

Attachments:

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

  • Posts: 82911
  • Thank you received: 13388
  • MODERATOR
6 months 2 weeks ago #360982

Hi,

Are you able to reproduce the issue ?
I've never heard of such an issue.

What is probably happening is this:
- user clicks on the "finish" button at the end of the checkout
- HikaShop creates the order for the cart
- selected payment plugin display the payment form
- user clicks on the cancel button of the payment form
- user comes back to the checkout
- user clicks again on the finish button
- HikaShop creates a second order for the cart
- selected payment plugin display the payment form
- user pays for the order
- the cart is cleared

This happens from time to time on our website. The user can get confused if you configured HikaShop to send an email to the user when the order is created, before the payment. I would recommend turning off the "order creation notification" email via the menu System>Emails in order to only send the email to the user when the order is confirmed. That should avoid the confusion on the user's end.

Now, if you really get 2 orders created each time to click on the "finish" button, then that's really not normal. I'm not sure how this would be possible though.

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

  • Posts: 3
  • Thank you received: 0
6 months 2 weeks ago #361014

I have deactivated the mail notification for the time being, but I have unclean bookings for the accounting department. I can reproduce the problem 100% with every PayPal payment in the store. As a user, I do not interrupt the payment, but go through the steps in a straight line:

- user clicks on the "finish" button at the end of the checkout
- HikaShop creates the order for the cart (created)
- selected payment plugin display the payment form
- paypal-form opens
- user pays for the order (finished the payment in paypal)
- HikaShop creates a second order for the cart (funded)
- the cart is cleared

In my case, separate OrderIDs are created in each case and the first payment created is not cleanly updated and completed after the payment. It does not seem to find the initial order (created) and simply creates it and then updates the status correctly.

How can I narrow down the problem? Could it be related to other PayPal plugins?

Attachments:

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

  • Posts: 82911
  • Thank you received: 13388
  • MODERATOR
6 months 2 weeks ago #361017

Hi,

Could you provide screenshots of the history area of both such orders (while logged in in english) ?
Supposing that what you describe is exactly what happens, then that would mean that another plugin is removing the "order_id" to the $order object in the onBeforeOrderUpdate event fired by HikaShop when the paypal checkout plugin requests HikaShop to update the status of the order in order to set it to "confirmed".
First, I would think this could happen with a massaction. For example, if you had one set with a trigger "before an order is updated", with an action "update the values" on the "order_id" column with a value being 0, then it would lead to this exact behavior.
So please check your mass actions.
If it's not this, then I would suspect a custom plugin or a third party plugin implementing the "onBeforeOrderUpdate event of HikaShop's Order API. Do you have any ?

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

  • Posts: 3
  • Thank you received: 0
6 months 2 weeks ago #361104

Hey,
I have executed 2x orders again and as you can see, a duplicate order is created in each case. I have shown screenshots of the order details and exported the Hika order table entries as a ZIP. I have not found any third-party tools or external solutions. I have deleted all deactivated PayPal plugins in the system administration. Since the orders also end up directly in the Hikashop, it would have to be a 3rd party tool for the Hikashop, which I don't have.

Hier aber nochmals die Liste:
Plugins: "Hika"

Select Hikashop product tag insertion plugin Hikashop product tag insertion plugin editors-xtd hikashopproduct Public 11275
Select Smart Search - HikaShop Products Smart Search - HikaShop Products finder hikashop Public 11276
Select HikaShop Cart notification Plugin HikaShop Cart notification Plugin hikashop cartnotify Public 11278
Select HikaShop Content Markdown Plugin HikaShop Content Markdown Plugin hikashop content_markdown Public 11279
Select Hikashop Date Picker Plugin Hikashop Date Picker Plugin hikashop datepickerfield Public 11281
Select Hikashop Email History Plugin Hikashop Email History Plugin hikashop email_history Public 11282
Select Hikashop Google Products Plugin Hikashop Google Products Plugin hikashop google_products Public 11283
Select HikaShop group plugin HikaShop group plugin hikashop group Public 11284
Select HikaShop order history plugin HikaShop order history plugin hikashop history Public 11285
Select Hikashop Massaction Address Plugin Hikashop Massaction Address Plugin hikashop massaction_address Public 11287
Select Hikashop Massaction Category Plugin Hikashop Massaction Category Plugin hikashop massaction_category Public 11288
Select Hikashop Massaction Order Plugin Hikashop Massaction Order Plugin hikashop massaction_order Public 11289
Select Hikashop Massaction Product Plugin Hikashop Massaction Product Plugin hikashop massaction_product Public 11290
Select Hikashop Massaction User Plugin Hikashop Massaction User Plugin hikashop massaction_user Public 11291
Select Hikashop Orders Automatic Cancel Plugin Hikashop Orders Automatic Cancel Plugin hikashop order_auto_cancel Public 11292
Select HikaShop rates auto update plugin HikaShop rates auto update plugin hikashop rates Public 11294
Select HikaShop Shipping manual - Prices per product plugin HikaShop Shipping manual - Prices per product plugin hikashop shippingmanual_prices Public 11295
Select HikaShop Shop Close Hours plugin HikaShop Shop Close Hours plugin hikashop shopclosehours Public 11296
Select HikaShop joomla user account link plugin HikaShop joomla user account link plugin hikashop user_account Public 11298
Select HikaShop User Points plugin HikaShop User Points plugin hikashop userpoints Public 11299
Select HikaShop Free orders validation Plugin HikaShop Free orders validation Plugin hikashop validate_free_order Public 11300
Select HikaShop bank transfer payment plugin HikaShop bank transfer payment plugin hikashoppayment banktransfer Public 11307
Select HikaShop common payment API plugin HikaShop common payment API plugin hikashoppayment common Public 11316
Select HikaShop credit card payment plugin HikaShop credit card payment plugin hikashoppayment creditcard Public 11317
Select HikaShop Paypal Checkout payment plugin HikaShop Paypal Checkout payment plugin hikashoppayment paypalcheckout Public 11413
Select Hikashop Stripe Connect Payment Plugin Hikashop Stripe Connect Payment Plugin hikashoppayment stripeconnect Public 11416
Select HikaShop Quickicon plugin HikaShop Quickicon plugin quickicon hikashop Public 11358
Select HikaShop categories search plugin HikaShop categories search plugin search hikashop_categories Public 11359
Select HikaShop products search plugin HikaShop products search plugin search hikashop_products Public 11360
Select HikaShop affiliate plugin HikaShop affiliate plugin system hikashopaffiliate Public 11362
Select HikaShop geolocation plugin HikaShop geolocation plugin system hikashopgeolocation Public 11364
Select HikaShop massaction plugin HikaShop massaction plugin system hikashopmassaction Public 11365
Select HikaShop Payment Notification plugin HikaShop Payment Notification plugin system hikashoppayment Public 11366
Select HikaShop product tag translation plugin HikaShop product tag translation plugin system hikashopproductinsert Public 11367
Select Redirect Joomla registration to HikaShop plugin Redirect Joomla registration to HikaShop plugin system hikashopregistrationredirect Public 11369
Select HikaShop user synchronization plugin HikaShop user synchronization plugin system hikashopuser Public 11372
Select Hikashop Google Analytics 4 Plugin Hikashop Google Analytics 4 Plugin system hikashop_ga4 Public 11387


Extensions:

Extensions, Sorted by: Name - ascending,
StatusSort Table By: Status NameSort Table By: Name LocationSort Table By: Location TypeSort Table By: Type Version DateSort Table By: Date Author FolderSort Table By: Folder Locked Package IDSort Table By: Package ID IDSort Table By: ID
Select HikaShop HikaShop Administrator Component 5.0.4 04 mai 2024 hikashop.com N/A No 11273
Select HikaShop affiliate plugin HikaShop affiliate plugin Site Plugin 5.0.4 12 05 2024 HikaShop system No 11362
Select HikaShop bank transfer payment plugin HikaShop bank transfer payment plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashoppayment No 11307
Select HikaShop Cart Module HikaShop Cart Module Site Module 5.0.4 12 05 2024 HikaShop N/A No 11378
Select HikaShop Cart notification Plugin HikaShop Cart notification Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11278
Select HikaShop categories search plugin HikaShop categories search plugin Site Plugin 5.0.4 12 05 2024 HikaShop search No 11359
Select HikaShop common payment API plugin HikaShop common payment API plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashoppayment No 11316
Select HikaShop Content Markdown Plugin HikaShop Content Markdown Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11279
Select HikaShop Content Module HikaShop Content Module Site Module 5.0.4 12 05 2024 HikaShop N/A No 11377
Select HikaShop credit card payment plugin HikaShop credit card payment plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashoppayment No 11317
Select HikaShop Currency Switcher Module HikaShop Currency Switcher Module Site Module 5.0.4 12 05 2024 HikaShop N/A No 11379
Select HikaShop Dashboard HikaShop Dashboard Administrator Module 5.0.4 12 05 2024 HikaShop N/A No 11380
Select Hikashop Date Picker Plugin Hikashop Date Picker Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11281
Select Hikashop Email History Plugin Hikashop Email History Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11282
Select HikaShop Filter Module HikaShop Filter Module Site Module 5.0.4 12 05 2024 HikaShop N/A No 11381
Select HikaShop Free orders validation Plugin HikaShop Free orders validation Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11300
Select HikaShop geolocation plugin HikaShop geolocation plugin Site Plugin 5.0.4 12 05 2024 HikaShop system No 11364
Select Hikashop Google Analytics 4 Plugin Hikashop Google Analytics 4 Plugin Site Plugin 1.0.0 21 04 2022 Hikashop system No 11387
Select Hikashop Google Products Plugin Hikashop Google Products Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11283
Select HikaShop group plugin HikaShop group plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11284
Select HikaShop joomla user account link plugin HikaShop joomla user account link plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11298
Select Hikashop Massaction Address Plugin Hikashop Massaction Address Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11287
Select Hikashop Massaction Category Plugin Hikashop Massaction Category Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11288
Select Hikashop Massaction Order Plugin Hikashop Massaction Order Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11289
Select HikaShop massaction plugin HikaShop massaction plugin Site Plugin 5.0.4 12 05 2024 HikaShop system No 11365
Select Hikashop Massaction Product Plugin Hikashop Massaction Product Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11290
Select Hikashop Massaction User Plugin Hikashop Massaction User Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11291
Select HikaShop order history plugin HikaShop order history plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11285
Select Hikashop Orders Automatic Cancel Plugin Hikashop Orders Automatic Cancel Plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11292
Select HikaShop Payment Notification plugin HikaShop Payment Notification plugin Site Plugin 5.0.4 12 05 2024 HikaShop system No 11366
Select HikaShop Paypal Checkout payment plugin HikaShop Paypal Checkout payment plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashoppayment No 11413
Select Hikashop product tag insertion plugin Hikashop product tag insertion plugin Site Plugin 5.0.4 12 05 2024 HikaShop editors-xtd No 11275
Select HikaShop product tag translation plugin HikaShop product tag translation plugin Site Plugin 5.0.4 12 05 2024 HikaShop system No 11367
Select HikaShop products search plugin HikaShop products search plugin Site Plugin 5.0.4 12 05 2024 HikaShop search No 11360
Select HikaShop Quickicon plugin HikaShop Quickicon plugin Site Plugin 5.0.4 12 05 2024 HikaShop quickicon No 11358
Select HikaShop rates auto update plugin HikaShop rates auto update plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11294
Select HikaShop Shipping manual - Prices per product plugin HikaShop Shipping manual - Prices per product plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11295
Select HikaShop Shop Close Hours plugin HikaShop Shop Close Hours plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11296
Select Hikashop Stripe Connect Payment Plugin Hikashop Stripe Connect Payment Plugin Site Plugin 1.2.2 31 01 2023 Obsidev hikashoppayment No 11416
Select HikaShop User Points plugin HikaShop User Points plugin Site Plugin 5.0.4 12 05 2024 HikaShop hikashop No 11299
Select HikaShop user synchronization plugin HikaShop user synchronization plugin Site Plugin 5.0.4 12 05 2024 HikaShop system No 11372
Select HikaShop Wishlist Module HikaShop Wishlist Module Site Module 5.0.4 12 05 2024 HikaShop N/A No 11382
Select Redirect Joomla registration to HikaShop plugin Redirect Joomla registration to HikaShop plugin Site Plugin 5.0.4 12 05 2024 HikaShop system No 11369
Select Smart Search - HikaShop Products Smart Search - HikaShop Products Site Plugin 5.0.4 12 05 2024 HikaShop finder No 11276

Best regards
Jens

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

  • Posts: 82911
  • Thank you received: 13388
  • MODERATOR
6 months 2 weeks ago #361105

Hi,

Thank you for the details.
I don't see anything strange with your plugins list or your screenshots.
There is one thing I find strange. In your SQL file you can see the "order_created" and "order_modified" values of the orders.
So if we take the orders with the order_id 144 and 145, you can see that :
- The order 144 is created at 1716038196. As it is not modified after its creation, the order_modified has the same value.
- The order 145 is created at 1716038198 so this means 2 seconds later.
- The order 145 is then modified at 1716038214 (for the confirmation of the order after the payment), so 16 seconds after its creation.
This is strange with the process you provided:

- user clicks on the "finish" button at the end of the checkout
- HikaShop creates the order for the cart (created)
- selected payment plugin display the payment form
- paypal-form opens
- user pays for the order (finished the payment in paypal)
- HikaShop creates a second order for the cart (funded)
- the cart is cleared

This would mean that between the click of the "finish" button at the end of the checkout, the display of the paypal buttons, the click on one of them, you providing the necessary information to paypal for the payment, only 2 seconds would happen, which is impossible.
And then, after that, the second order would be created and confirmed 16 seconds later without any reason for this delay.
What I proposed as a possible scenario in my first reply is much more likely based on the timestamps of these orders.

Could you please double check your scenario ? I'm thinking you might have been confused somehow.

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

  • Posts: 65
  • Thank you received: 3
  • Hikashop Business
3 weeks 2 days ago #364352

hi,

Was any resolution found for this topic? My site experiences a similar issue. A user creates an order and then processes it seconds later. End result is hikashop lists a created order with a unique order # and then a second order marked confirmed that has a different order number. On our site the ones marked confirmed are the paid for ones. The ones marks created have not been paid for.

Mostly it's just an annoyance to delete all of the created orders later just to clean things up.

On rare occasion (not always) a person will apply a discount code into the created order that will then be lost in the second order that is processed for payment seconds later. The amount will reflect correctly in the total on the created order. But our discount codes are created set to allow a user to only use it once. So it falls off the second order hikashop processes. But again, that is the rare case.

Is there some setting somewhere I can change to stop the creation of the second order during processing?

Screen shot attached. 1 & 2 are a person's order and 3 & 4 are another person's.

Please advise if you found resolution to the persons item above. I don't see any solution in the thread.

Thank you!

Attachments:

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

  • Posts: 82911
  • Thank you received: 13388
  • MODERATOR
3 weeks 2 days ago #364358

Hi,

It is not something that can be solved:

When someone clicks on the "finish" button of the checkout, HikaShop transforms the current cart into an order.
Then, it let the payment plugin do its thing. With most payment plugins, the payment form is displayed after this, and when the user pays, the order is confirmed.
Doing it like this is necessary, otherwise, if HikaShop would wait to create the order from the cart after the payment, it wouldn't be able to guarantee that was is paid corresponds to something on its end (the user could change the cart content in another tab of the website after HikaShop passing the control to the payment gateway).
Now there are payment plugins which process the payment right when the user clicks on the "finish" button like the Authorize.net accept JS plugin: www.hikashop.com/marketplace/product/150...e-js-by-obsidev.html
With them, the customer provides his credit card information in the middle of the checkout. However, most payment gateways don't offer the capability to be able to work like that for many reasons.

Then, once the user goes to the payment gateway, he generally has the possibility to click on a cancel button. In that case, the user goes back to the checkout. Maybe he forgot something, or want to choose another payment method, etc. So then, when the user clicks on "finish" button again, HikaShop has to create a new order as the current cart might not match anymore with the previously created order.
And thus, you end up with two orders, the first one, where the user aborted the payment, and the second one, when the user finished.

If your issue with this is that you have to clean up the orders, you can use the "order auto cancel" plugin so that created order get cancelled automatically after a while. And you can also create a mass action to delete cancelled orders. This way, you don't have to do it manually.

I hope this helps explain the logic behind this.

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

  • Posts: 65
  • Thank you received: 3
  • Hikashop Business
3 weeks 2 days ago #364362

thank you. I'll check out that plugin for cleaning up.

What I didn't mention above because I can't seem to track it in a consistent manner is that on rare occasion a customer will have a partial discount code to use. It reflects in the created order correctly. Then when they process, they don't double check the total on the new order, and the discount has dropped off.

To prevent unauthorized use of discount code sharing we write our codes so they can only be used once by the same user. So when square makes the second order the code can't be used again because it's in the other order and the person doesn't verify the total because they already did on the first one. They just process it and see the charge to their bank account. So I have to refund the partial discount. My biggest heartburn with that is I'm paying the fee on the first transaction that is too much and then more fees on the back side when I make the partial refund. This issues didn't happen on my last years event. It seems new to me. Last year I didn't have this issue and this year I've had this issue happen maybe 4 times out of maybe 125 transactions.

Thank you! I so appreciate your time.

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

  • Posts: 82911
  • Thank you received: 13388
  • MODERATOR
3 weeks 1 day ago #364363

Hi,

It always worked that way though.

To avoid this issue with the coupon codes, what you could do is to change the "clear cart when order is" to "created". That way, when the user cancels the payment on the payment gateway, he won't go back to the checkout as his cart would have been cleared right after the order is created. In that case, you can then customize the "URL where to redirect when the cart is empty" setting, or customize the message displayed (which reads by default "the cart is empty" or something like that), to point the user to his order history where you can have a button for him to pay his order thanks to the "Payment of orders not paid immediately" setting.

But then, you'll have to deal with the consequences. When a user will come back, he won't be able able to make any change to his already created order. And he won't be able to add the coupon code again through the checkout, so he will likely contact you to help you deal with it, or just abandon the idea of this purchase.
A solution which can help here is the reminder plugin ( www.hikashop.com/marketplace/product/241-reminder-plugin.html ) which can send an email to the customer if he abandons his purchase for one reason or another, so that you can offer your help.

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

Time to create page: 0.085 seconds
Powered by Kunena Forum