for some reason from time to time we receive orders paid via PayPal and IPN response first says: "Completed" but some minutes later it says "Transaction cancelled by customer" and obviously the order status changes back to Incomplete although In paypay status is still Completed and payment is received.
Yes you are right. The status changes back to Incomplete when customer return to the store. I just compared with other PayPal orders and when customer does not return to the store everything works well.
We use standard PayPal (initial order status is set to Incomplete)
Isn't this then a paypal issue in that the inital response is okay (status == processed) but when IPN sends its response, the result forces cs-cart to mark the order as incomplete. It looks like the IPN GET is saying the order was cancel. I'd look into what paypal is seeing in the order that is causing paypal to cancel the payment. (or to send that notification) I.e. have paypal look into why it is sending a 'cancel' request.
IPN with completed payment is only sent once and it is correct. But looks like the problem comes when customer clicks the button "Return to the store". PayPal still has correct transaction status Completed.
There is some kind of messup between $return_url and $cancel_url. Instead of $return_url Paypal has $cancel_url
I could not reproduce this situation in Paypal sandbox (May be in live it will be different). I mean Return to Shop button after payment is done works ok.
But In PayPal payment window there is button "Cancel and return to the store". Of course when customer press this button/link it sends $cancel_url and reset the order to Incomplete.
Just my guessing, if customer paid by PayPal in second window (second attempt) but still had first attempt payment window still open and after paying in second window returned to first window and pressed this link we could easily get this PAID/INCOMPLETE case.
Could someone solve Paid / Incomplete issue? It was ok for one week, but now appears again. It is a big headache to control all paypal orders manually to double check if order is really incomplete or really paid.
Mine was fine for a while too then other started appearing. I opened a ticket with cs who are looking into it
As far as I see they are changing the status from Open to Paid and then changing it to Open again. This is a double payment situation in general terms. There are two main provisions that allow us to avoid such situations:
- if the customer cancelled the payment, the store allows him to make the payment again, status is not changed to Paid;
- when the payment is complete, the cart is cleared, so there should be no double payments.
This functionality provide by the core of CS-Cart. Your version (4.5.2) is suitable for this as well.
I have tested your system with our test Paypal's account on different browsers and reproduced the issue only the one way:
1. I have submitted the order and proceeded to Paypal processor.
2. When the Paypal is processing the payment I stopped the page loading and clicked go back button. I did not close the page and I logged in to Paypal again to make a payment.
3. After login the Paypal page shows a message that the payment was already done and suggesting us to return to the store.
The Paid status is set on the step 2 and changing again to Open on the step 3 with a message Transaction was canceled by the customer as Paypal protects customer from double payment. Unfortunately I failed to reproduce the issue when I am not clicking any button and stop the payment process.
then after a response from me I got this, so it seems they are looking for more info on browser etc to help understand the situation.
The CS-Cart handles incoming returns and set the status according to them. I can make a suggestion that the auto-return is not working or the whole Paypal process freezes for some users, and they have re-submitting the payment. If there are any details (operating system, browser version), that can help us to understand the situation, we would be grateful.
I also think also that the problem is initially provoked by cancel&return button.
Is $cancel_url only used for that particular button? or there are more buttons in PayPal user account that use cancel url? (I mean may be temporary to comment it in PayPal addon in case of just one button).
When I get more orders like this I will try to collect OS and Browser version and post it here.
The return url is passed from the payment method and will utilize the storefront domain from which the order was placed. Did I miss something in the question? Paypal has defaults, but the payment method should be the actual controlling entity.
But how can you activate Auto Return functionality in case of several domains (on different languages) and one business PayPal account? For example in case of CS Cart Ultimate. There is no option in PayPal to introduce several return url in PayPal.