Re: Cart empties when user cancels paying with PayPal

  • Posts: 48
  • Thank you received: 0
12 years 9 months ago #18307

Hi!

Shopping carts usually empty the cart when user returns from PayPal to final page.
And at the same time the user receive a bill. I don't know if PayPal sends a special code (in http) or not.

It is not possible to do it in the same way?
Couldn't be for example a final page on the site, and when user returns to it, only that time the cart empties, user gets thank you message and he gets a bill?


Thanks.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
12 years 9 months ago #18350

That could be an option indeed. We wanted to avoid that at first as it means that the payment plugin developers have to handle the cart deletion instead of HikaShop. Right now, the cart is deleted at the moment of the creation of an order and then we let the payment plugin handle the payment. But if the cart could be cleaned or not based on the payment plugin's actions, it would have to be to the payment plugin to handle the cart.

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

  • Posts: 48
  • Thank you received: 0
12 years 9 months ago #18379

Thanks Nicolas.

So that means that it is not possible at the moment.
Sure it would be better for me to have this option, but at the moment is not such a problem as the site I am working on doesn't have a lot of products.

I hope it will be possible in the near future.


Best

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

  • Posts: 14
  • Thank you received: 0
12 years 9 months ago #18952

Guys

My concern is that there may be a disconnect in logic here, and it is fundamentally wrong for a cart to be empties/cancelled if a user should cancel at PayPal and return to the store - let me explain. It is however correct that a cart empties if a SUCCESSFUL payment was made at PayPal but the subject of this thread says "...when user CANCELS paying with PayPal"

Let's assume I walk into a grocery store, I then spend an hour shopping for various bits and pieces, and then proceed to the cashier at checkout. I present my credit card for payment, and the cashier informs me that my card has been declined. I decide to then pay by cash. What the cashier then DOES NOT DO is then grab my shopping bags from me and place all the groceries back on the shelves, expecting me to start shopping from scratch (for another hour) and then come back to checkout and pay by cash. Usually the cashier will simply cancel the credit card transaction and then accept cash from me.

In the same way, in Hikashop, if a customer for example presses "PayPal" payment method in ERROR and when they get directed to the PayPal payment page and then realises this and presses "Cancel and return to Merchant", when they return to the store (Hikashop) their cart "shopping bags" should still be there and waiting for payment at which time the customer can now choose "Check" or "Cash" or whatever method they meant to have chosen in the first instance!

I have had a number of complaints from our users that they have to restart their shopping if they make this error.

We have 4 e-commerce sites using ZenCart and another system and they both work in this way. Cancelling the "PAYMENT" at PayPal should mean exactly that - cancelling only the PAYMENT, not the whole order.

Thanks

Cliff

Last edit: 12 years 9 months ago by cliffvt.

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

  • Posts: 48
  • Thank you received: 0
12 years 9 months ago #18959

:)
I agree with you.
I hope the guys (nicolas & co. :) ) will do it in not so far future.


Best to all.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
12 years 9 months ago #18960

I understand your point, but it's not so simple.
What about when the user finishes the payment and does not return to the store with the link ?
He would still have his cart attached to his account when logging in next time since it is linked to his account, which is strange as well. Plus if you have only one payment method displayed, when the person clicks on cancel, it means that it REALLY want to cancel. That's partly why we did it that way.


As I said, it would require an option to change the behaviour according to what you want. But so far, we had two users complaining about the way it's done for tens of thousands using HikaShop, so it doesn't sound so illogical...
Anyway, We'll look at handling that in next release or the one after.

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

  • Posts: 272
  • Thank you received: 3
12 years 9 months ago #18964

Hi Nicolas,

I agree entirely with cliffvt's comments. I have encountered this problem. As soon as you click "next" and confirm the order the cart empties which we have discovered while developing the EPDQ payment plugin. Surely the cart should not empty until the payment has been accepted. So we have the problem that the card is declined but we cannot recover the cart to try again. We have currently stopped our work on this plugin until this improved. Our live shops (which are based on ECJC shop, now JHShop) do not have this problem. If the payment is cancelled or something goes wrong with the payment, and believe me they do, the cart must be available again.

I would say this is quite a serious issue that needs to be resolved urgently.

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

  • Posts: 48
  • Thank you received: 0
12 years 9 months ago #18965

I think when customer finaly pay with PayPal you should get an message/variable or whatever from PayPal regardless where the customer goes after paying. The same is in clasical shop. The bank tell you if the transaction succeeded.
In this way you will know the process of payment has really finished.
So you/HikaShop can send him a bill and empties the cart.

I don't know how does PayPal deal with this. But it seams logical to me.


(By the way I think PayPal is one of the most important payment plugin for HikaShop. It needs a special care.)

Last edit: 12 years 9 months ago by vasjaf.

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

  • Posts: 272
  • Thank you received: 3
12 years 9 months ago #18977

Correct me if I am wrong but this issue is relevant to all payment plugins, not just Paypal. As you click to confirm the payment whether it be Paypal, HSBC etc etc the shipping cart empties.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
12 years 9 months ago #18990

It depends. If you use for example authorize.net with the AIM API, the payment is done just before the order is created and if a problem happens at that point, the order is not created and you're back on your checkout. It will also work like that with paypal pro which will be in next release.
But this technic possible with paypal normal as the order has to be created before the user is redirected to paypal.

To cut the discussion short, we'll look at that soon.

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

  • Posts: 272
  • Thank you received: 3
12 years 9 months ago #19031

On the EPDQ payment plugin we are developing as soon as the user clicks on confirm and one is then transferred to the Barclay's EPDQ payment gateway, "poof", the contents of the cart are gone. I found this thread because in the callback script we were looking to destroy the cart if the payment is successful or keep it if unsuccessful for a myriad of possible reasons.

If there is anything I can do circumvent this problem easily let me know. If if requires your review the checkout work flow I'll wait until you have some concrete news.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
12 years 9 months ago #19037

The solution is easy if you know a bit of php: edit the file administrator/components/com_hikashop/classes/order.php and in the save function, remove the cart deletion code and in the file components/com_hikashop/controllers/checkout.php remove the lines unsetting all the data from the session at the end of the after_confirm session.
Then, put that code in your plugin to remove it. However, you can remove the data of the session of the user in the onPaymentNotification if the notification is done server to server. But removing the cart from the database should be enough.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
12 years 9 months ago #19848

We released two days ago a new version which has the option "Clean cart when order is" to "confirmed" by default in the tab Checkout of the configuration, in order to handle that.
We're eager to get feedbacks from you on that.

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

  • Posts: 48
  • Thank you received: 0
12 years 9 months ago #20056

Great to hear this Nicolas.

Sorry I was too busy and I didn't have time to handle this. I will try it as soon ss possible.


Thank you very much for this.

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

  • Posts: 48
  • Thank you received: 0
12 years 8 months ago #20494

Great job Nicolas.
If customer cancels for example PayPal payment it returns to cart (checkout) without being emptied.
I like it!

(I didn't test it yet what happens when customer pays with "PayPal".)

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
12 years 8 months ago #20524

It should empty the cart like before when the payment is successful.

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

  • Posts: 62
  • Thank you received: 4
  • Hikashop Business
3 years 3 months ago #327558

I can't find this option! Where can I find it in the current release?

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

  • Posts: 12953
  • Thank you received: 1778
3 years 3 months ago #327591

Hello,

I think the option you're searching for is "Clean cart when order is" via "Hikashop->System->Configuration->Main".

Kind regards,
Mohamed.

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

Time to create page: 0.137 seconds
Powered by Kunena Forum