PayPal returns status 200 VERIFIED but order status does not change.

  • Posts: 4
  • Thank you received: 0
2 years 9 months ago #334415

-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.28
-- PHP version -- : 7.4.21
-- Browser(s) name and version -- : Any browser

I've installed HikaShop Starter and using the default PayPal plugin which comes with the installation.
Ofcourse I've read every bit of documentation how to set the PayPal plugin correctly and prevent payment errors. Than the testing has begun :-)

The sandbox option is set in the PayPal plugin and I started ordering articles. Used a paypal sandbox account to pay and the payment was succesfull - according to PayPal. Even the IPN message says all has gone well. But, as you can guess, the status of the order in the HikaShop website hasn't changed to "confirmed".
After that the forum helped me along with all the things I could do and I'm loving the debug option so activated right away.

Bam! The debug file is written (I'm in luck, 'cause other users have experienced this differently) and contains a lot of information about the payment
Seeing a lot of array information, return links, etc. And at the bottom is the final great answer: "VERIFIED" and the http status returns 200!
eh... well....eh... now what? Did I miss something in the PayPal settings? Did I set the "pending for approval" option to "on"? Sadly enough, that's not the case.
Back to the forum and followed every hint and tip but still no result. The following things I have already checked:

1. "Pending for approval" isn't set in the plugin.
2. IPN address is correct (otherwise no debug information should be written). And UTF-8 mode is set.
3. IPN message in my PayPal account states: succesfull payment.
4. Debug file is writeable - data is written and the status retuns "VERIFIED" HTTP:200.
5. Toggled the "Return Method" in the PayPal plugin - makes no difference.
6. Menu item (checkout/cart) is set to public. It is hidden on the website but an active menulink - just isn't shown (not disabled).
7. Refreshed the IP list in de PayPal Plugin and cleared it. Makes no difference.
8. Check AdminTools settings. No exceptions are registered (otherwise debug file wasn't written), all the PayPal IP addresses are whitelisted and even renamed .htaccess to prevent any blocks.
9. Finally I've double checked every line in on the page: www.hikashop.com/support/documentation/i...or.html#notification

I'm running a bit out of options here. I cannot seem to get the status automaticly changed when receiving the information from PayPal (according to the debug file).
Can anyone tell me waht I am missing here? Is there anything I forgot to check?

Your help is very much appreciated! :)

Greetz, Nikolai.

Last edit: 2 years 9 months ago by uwix.

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
2 years 9 months ago #334419

Hi,

If, in the payment log file, you get "VERIFIED" at the end, with nothing after, I can think of three things:
- the "verified status" setting of the PayPal payment method is set to "created" instead of "confirmed". In that case, the status of the order will stay created if the payment is successful.
- there is a problem with the email address configured in the PayPal payment method being different from the receiver_email or business parameters sent back by PayPal during the notification (you can check that in the payment log file).
- You have a mass action which changes the status of the order back to created when the order is being confirmed. You can check your mass actions in the menu System>Mass actions.

Now ideally, if you could provide screenshots of the settings of the payment method and of an order details page, and the log of the data in the payment log file, for that order, that might help us better understand the situation.

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

  • Posts: 4
  • Thank you received: 0
2 years 9 months ago #334444

Hello Nicola,

Thank you for the quick respons. I've attached two screenshots: one of the PayPal Plugin configuration and one of the (test) order overview.
As you can see the status should be set to "confirmed" according to the plugin settings.

The log file is also attached (changed the url and customer data for privacy matters) and I noticed now PayPal returns HTTP error 400 on line 508. When checking the log file I notice the text HTTP/1.1 200 OK on line 530 and assumed that was the return code.
When checking the API from PayPal for the 400 result code it says:

INVALID_REQUEST. Request is not well-formed, syntactically incorrect, or violates schema.
(source: developer.paypal.com/docs/api/reference/api-responses/ )

I'm going to test some further things today but if you have any suggestions for me, that would be great!

Greetz, Nikolai

File Attachment:

File Name: report_639647411.zip
File Size:4 KB


off topic: the IP adres 173.0.80.* isn't added when clicking the refresh option. But PayPal/HikaShop returns by mail it's missing when left out ;-)

Attachments:
Last edit: 2 years 9 months ago by uwix.

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

  • Posts: 4
  • Thank you received: 0
2 years 9 months ago #334450

I have done some more testing and the log file does not report any HTTP 400 error anymore. It now always ends with:

....
<h3>07.15.21 08:00:13 - paypal</h3>
VERIFIED
<h3>07.15.21 08:00:13 - paypal</h3>
PayPal transaction id: 2DU903003M765772C

Only thing I've changed in this case is the sandbox user email address. First one with the test was set to US dollars in payment and the second account uses EUR (and results in the above log message).

Still the status of the order isn't changed to confirmed but remains in created state.

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
2 years 9 months ago #334455

Hi,

1. The IP address setting uses the DNS entries from PayPal to generate the list of IPs there. It doesn't mean that it is necessarily a complete list, especially for the sandbox IP addresses. I would say that by default, it's better to leave that empty. That way, the day PayPal adds new IP addresses, you won't have problems with the notifications.
The notifications are secured anyways with another mechanism.

2. Looking at the log you had provided, I think that the problem indeed came from the email address used.
When using the sandbox, you need to enter in the "email" setting, the email address of the merchant account from your sandbox account and the customer email address from the customer account from your sandbox account.
It seems you sorted that out since you now have the PayPal transaction ID in the log and not 400 error anymore.

3. If you check the log, you can see this line:
[payment_status] => Pending
This means that the payment is pending acceptation in the merchant account.
And you can see that for the "Pending status" setting of the payment method, you've configured the status "created".
So it's normal that the order is not being confirmed.
Usually, this happens when the "enable validation mode" setting is activated in the payment method. I can see that's not the case on your screenshot.
And if you look around on google about this issue of payments pending with the sandbox, you can find for example this page:
www.paypal-community.com/t5/Sandbox-Envi...ing-why/td-p/1417716
There, it epxlains that the sandbox will automatically keep the payment pending if the email address used is not correct:

The payment was sent to an email address which was not registered to a PayPal sandbox account and therefore the payment was pending.

Send the payment to a valid email address which is registered to a PayPal sandbox account and the payment should complete.

So it goes back to what I was saying in point 2 that you need to use the email addresses of the sandbox and not your live ones when using the sandbox.

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

  • Posts: 4
  • Thank you received: 0
2 years 9 months ago #334461

Well, do I feel quite stupid right now.....

How could I miss that one? Using the "business" sandbox account instead of the live paypal mail account is pretty obvious. I had my focus on all the other settings and log-reports I kept on missing that one (over-and-over-again) :-(

Thank you for pointing me into the right direction! Changing the paypal email address to the paypal sandbox email address fixed the whole issue. Now it's time to go live! :-D

You rock, Nicola.

Greetz, Nikolai

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

  • Posts: 4519
  • Thank you received: 611
  • MODERATOR
2 years 9 months ago #334486

Hello,

Happy that the HikaShop team have been useful !
And don't feel stupid, we find the setup and procedures for using Paypal very complex, if not a little tricky.

Regards

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

Time to create page: 0.089 seconds
Powered by Kunena Forum