Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Paypal Ipn Issue With Order Status Rate Topic   - - - - -

 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 16 August 2018 - 11:54 PM #1

Hi,

 

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.

 

Any idea what is going on?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17999 posts

Posted 17 August 2018 - 06:12 AM #2

What do you see in the logs for this order? Who changes order status second time?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 17 August 2018 - 06:28 AM #3

According to the logs looks like customer changed the order status to Incomplete second time. It happened straight after the status was Processed (same minute).

 

Normally it is impossible for customers to change the status of the order. But it is also difficult to know which steps customer did in PayPal after payment was done.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17999 posts

Posted 17 August 2018 - 01:25 PM #4

"Customer" means that the order status was changed when the user returns to the store. What PayPal service do you use?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 17 August 2018 - 05:06 PM #5

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)

 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4361 posts

Posted 17 August 2018 - 05:42 PM #6

this happened to me and the 3rd post on here in the past week about same. I have asked CS to check for me and its on going.

 

Can I ask how do you find in the logs how it changed , is it the logs in cs back end or server logs, I didnt see problems in my normal baclk end logs .


Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 17 August 2018 - 06:09 PM #7

This is the point. From the first sight there is no problem in the logs.

 

But if you check your CS CART logs and server logs all orders which are changed back to Incomplete have the line that customer returned to the shop.

 

For example I have it like this:

 

Orders (change status) = Response from IPN     User                                        Time
Order: # 123
Status: Incomplete -> Processed                          ---                                      17/08/2018, 19:48

 

Server log:

POST index?dispatch=payment_notification.paypal_ipn HTTP/1.1

 

Orders (change status) = Customer returns to the store
Order # 123
Status: Processed -> Incomplete                         Customer name                  17/08/2018, 19:51

 

Server log:

GET index?dispatch=payment_notification.cancel&payment=paypal&order_id=123 HTTP/2.0



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10838 posts

Posted 17 August 2018 - 07:58 PM #8

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 17 August 2018 - 08:34 PM #9

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



 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 17 August 2018 - 09:33 PM #10

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.



 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 28 August 2018 - 08:39 PM #11

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.



 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4361 posts

Posted 29 August 2018 - 06:06 PM #12

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.

I suggest you can shorten the payment process by enabling Auto return functionality in your Paypal's account:
https://developer.pa...to-your-website

 

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.

Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 03 September 2018 - 07:22 PM #13

Thanks for sharing the info.

 

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.



 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 03 September 2018 - 07:41 PM #14

Also it is impossible to activate Auto Return functionality in case of several stores in different languages (Ultimate) and one PayPal account since you can introduce only one return domain.

 

https://example.com/index.php?dispatch=payment_notification.return&payment=paypal



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10838 posts

Posted 03 September 2018 - 07:44 PM #15

Also it is impossible to activate Auto Return functionality in case of several stores in different languages (Ultimate) and one PayPal account since you can introduce only one return domain.

 

https://example.com/...return&payment=paypal

 

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 03 September 2018 - 07:57 PM #16

I believe that you explained standard functionality.

 

But I was talking about AutoReturn functionality option, which can be activated in PayPal account, what was proposed by CS CART in #12

 

This is ok if you have only one store. You just activate Auto Return and introduce return url for this domain.

 

https://docs.cs-cart...ighlight=paypal

 

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.



 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 354 posts

Posted 06 September 2018 - 04:15 AM #17

Additional info for CS CART team.

 

Just got another Paid/Incomplete order.

 

This is info regarding user system:

 

"Mozilla/5.0 (Linux; Android 8.0.0; SM-G950F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.91 Mobile Safari/537.36"