Page 1 of 2
Paypal standard notify url error
Posted: 19 Sep 2018, 06:31
by app-n-web
Hi,
I am actually testing Paypal standard plugin but encounter problems with IPN making the orders stay in pending state even after payment is completed.
I use Paypal sandbox for those tests and thus thought that maybe IPN is not working correctly there which would not be the first time but a quick look at IPN history confirmed that IPN had been sent but got a 500 http response code.
I then tried the notify url define by Phoca Cart index.php?option=com_phocacart&view=response&task=response.paymentnotify&type=paypal_standard&pid=1&tmpl=component and saw it's raising an error :
0 - Call to undefined function phocacartimport()
Any idea would be appreciated as I really need to get Paypal payment working.
As for technical information, I am running Joomla 3.8.12 and Phoca Cart 3.1.2 on a live environnement with PHP 7.0.32.
Thanks in advance for your help.
Re: Paypal standard notify url error
Posted: 20 Sep 2018, 16:33
by Jan
Re: Paypal standard notify url error
Posted: 21 Sep 2018, 20:04
by app-n-web
Thanks a lot, it works perfectly with that fix.
Have a nice weekend.
Re: Paypal standard notify url error
Posted: 22 Sep 2018, 11:19
by Jan
Ok, great to hear it.
Jan
Re: Paypal standard notify url error
Posted: 06 Oct 2018, 08:37
by app-n-web
Hi,
Sorry to come on Paypal again but it seems that I encounter a new issue with it different from the first one.
After I applied the fix, I got it working for three orders but now it does not work anymore. The payment is ok on paypal, the success IPN is sent correctly with a 200 response code but it does not trigger any change for the order and I did not really changed anything on my side so I do not understand why.
I first thought it was a Paypal sandbox problem as they are changing part of its interface but I just tried with a live account and unfortunately the result is the same. I then made several other test with and without the return url / IPN sending activated on the live Paypal account (which should not change anything as you define it in the request) but no success either.
I then refund the order on the Paypal production account and was surprised to see that the refund IPN was received correctly and the order cancelled in Phoca Cart.
So the situation is actually the following : whatever setup I use on the Paypal account (live or sandbox) the "Completed" IPN is not received correctly (no order change and nothing in the system journal) but the "Refund" IPN is received correctly (order cancelled and transaction appears in the system journal).
Do you have any idea about what went wrong and how I can get it to work again ?
I tried really hard to remember if I made any change but except from the order status title and enable ajax for the add to cart function, I did not find anything else. I tried disabling the ajax option but it does not fix the issue.
Thanks in advance for your help.
Re: Paypal standard notify url error
Posted: 06 Oct 2018, 12:55
by Jan
Hi, try to enable logging in Phoca Cart Options. You will get there more information about the communication between PayPal server and your server.
It will be displayed in administration - in Syste Log.
Jan
Re: Paypal standard notify url error
Posted: 06 Oct 2018, 18:58
by app-n-web
Thanks for your answer Jan, but I already did and the result is the same. The "SENDING FORM TO PAYPAL" appears in the log, then nothing else until I issue a refund from Paypal which appears as "SUCCESS" with "payment_status=Refunded" in the message.
I checked the IPN history on both Paypal accounts (sandbox / live) and the IPN for the completed payment was sent at the correct url with "payment_status=Completed" in the message in between the sending of the form and the refund but it does not appear in the log no matter it received a 200 code according to Paypal history.
Could it be related to Paypal changes ? Because it did work and stopped working suddenly with no reason at a time on which some setting pages on Paypal sandbox were becoming unreachable. About 48 hours after, the pages come back but with a new look and I noticed that they now have the same design on live accounts.
Maybe it's not related but it's the only change I noticed. Any idea on what can be going wrong is welcome as I really need it to work before the website goes live.
Re: Paypal standard notify url error
Posted: 06 Oct 2018, 19:22
by Jan
Hi, hmmm, really hard to say, in the log there should be two items - when sending to Paypal and when getting back the information - if PayPal returns some error, it should return it with description (what happened there, some specific error message including the error code)
Jan
Re: Paypal standard notify url error
Posted: 07 Oct 2018, 10:01
by app-n-web
Unfortunately I get no error. Paypal sends two IPN, one for the payment and one for the refund but only the second one appears in Phoca system log, absolutely nothing for the first one.
Here are the screenshots of the IPN details on Paypal for one order that was paid and then refunded one hour after :
I do not see anything that could explain why the first one is not caught by Phoca but maybe you will.
I am really having a hard time trying to understand this issue as it does not give me any hint on what is going wrong and where. It's easy when we get an error but not when everything seems to be correct and it still does not work.
Do you have on your side an installation that you tested recently and on which it's working correctly with Paypal ? So that at least I am sure it's not due to a change on Paypal itself because the fact that it was working and then not anymore is strange enough to get me thinking I missed something obvious but I can't find what it is.
Re: Paypal standard notify url error
Posted: 09 Oct 2018, 17:37
by Jan
Hi, tested today, see image:
1) I tried to make a payment but there was an error - curl - SSL certificate error - PayPal returned error with error message
2) Then the SSL was disabled and the payment was OK - then PayPal returns succss with all the report information
So in every case PayPal returns some information.
Is your server fully accessible from interet, for example typically localhost servers cannot be contacted by PayPal server but of course if you get the info about the refund, then everything should be OK
The the status is automatically changed by this answer:
Jan