haylau Posted May 22, 2019 Posted May 22, 2019 Pulling what is left of my hair out here :( Webserice used to work fine with our courier system (Parcelforce) but has stopped. Courier system developers say there is nothing wrong at their end. To show this, the installed their own version of Prestashop and used the webservice to pull down orders into their system. The produced the attached csv file to show that it works Now from my side. If I go to domain.com/api and enter the key get access to the api. And if i use domain.com//api/orders?filter%5Bcurrent_state%5D=%5B20%5D&filter%5Bdate_add%5D=%3E%5B2019-05-20+22%3A00%3A00%5D&display=full&date=1&sendemail=1 I can see the full xml data as shown in screen print - so I KNOW the webservice works. and i KNOW the courier system works, but SOMETHING must be blocking the two from talking to each other Ourr access logs show these lines when the courier tries to get the orders from the webservice (nothing in their logs) 78.153.247.199 - - [22/May/2019:22:01:44 +0100] "GET /api/orders?filter%5Breference%5D=00000000&display=full&sendemail=1 HTTP/1.1" 200 124 "-" "Zend_Http_Client" 78.153.247.199 - - [22/May/2019:22:01:52 +0100] "GET /api/orders?filter%5Bcurrent_state%5D=%5B20%5D&filter%5Bdate_add%5D=%3E%5B2019-05-20+22%3A00%3A00%5D&display=full&date=1&sendemail=1 HTTP/1.1" 200 3622 "-" "Zend_Http_Client" And sometimes 78.153.247.199 - - [22/May/2019:13:02:41 +0100] "GET /api/order_states?display=%5Bid%2Cname%5D HTTP/1.1" 200 504 "-" "Zend_Http_Client" 78.153.247.199 - - [22/May/2019:13:02:41 +0100] "GET /api/orders?filter%5Bcurrent_state%5D=%5B1%7C2%7C3%7C8%7C9%7C10%7C11%7C12%7C13%7C14%7C18%7C19%7C20%5D&filter%5Bdate_add%5D=%3E%5B2019-05-02+22%3A00%3A00%5D&display=full&date=1&sendemail=1 HTTP/1.1" 200 3718 "-" "Zend_Http_Client" Which shows they are trying to connect. I go to that link and I can see the data. So what on earth is happening . Is this a clue?? HTTP/1.1" 200 3622 "-" "Zend_Http_Client" Not sure what 3622 (or the 506 and 3718) refers to Phpinfo file if it helps: http://u-bolts-r-us.co.uk/phpinfo.php Is there anyone who can help track down the issue? WDMPATC_20190522_eorder_logs.csv
yaniv14 Posted May 23, 2019 Posted May 23, 2019 Based on your access log it looks that everything is fine on your side and the problem is on Parcelforce side. as you can see your webserver response with 200 (which mean OK) and the numbers you are referring to are the total bytes returned in the response.
haylau Posted May 23, 2019 Author Posted May 23, 2019 3 hours ago, yaniv14 said: Based on your access log it looks that everything is fine on your side and the problem is on Parcelforce side. as you can see your webserver response with 200 (which mean OK) and the numbers you are referring to are the total bytes returned in the response. Thanks for the vote of confidence. My only other thought, and I do not know enough about this. If the XML schema was different could that make a difference? Ihave tried rolling back to the prestashop webservice file and that does not make a difference
yaniv14 Posted May 23, 2019 Posted May 23, 2019 The people from Parcelforce need to tell you if they are not getting any reply from your web service or they are getting bad/wrong xml format. Are they using the correct Api Key / Token?
haylau Posted May 23, 2019 Author Posted May 23, 2019 The API key is correct because we feed it into the system. I suppose if it was not correct that server log would not give a 200 code? And it used to work. We have even tried a new key Parcelforce are basically shrugging their shoulders and saying "well, it works for us if we set up a prestashop instance" which is not the best form of support. I have been going throught this now for a couple of months with them. The problem I think is the support team are not the developers they are go betweens and will not give me direct access to the developers I am beginning to wonder if they have changed their system to only work with Prestashop 1.7 (if even that would make a difference??)
yaniv14 Posted May 23, 2019 Posted May 23, 2019 I am not familiar with Prestashop 1.7 so I can't tell if its different than 1.6
yaniv14 Posted May 23, 2019 Posted May 23, 2019 The reason I asked about the api key is because on the csv file you attached some of the response where 401 (unauthorized)
haylau Posted May 23, 2019 Author Posted May 23, 2019 1 minute ago, yaniv14 said: The reason I asked about the api key is because on the csv file you attached some of the response where 401 (unauthorized) Yes, the CSV file was created by Parcelforce on their own instance of prestashop just to show me that their system works - so nothing to do with our installation
haylau Posted May 23, 2019 Author Posted May 23, 2019 Just tried the 1.7 dispatcher file and the import process still does not work In Parcelforce system there is a button to test the API settings and that reports all is well. But when we click the import button it does not give errors, it just says there are no orders to import - but obviously there are. So this is why there are no error reports anywhere. I guess it is time for me to look for another courier. parcelforce are not the cheapest and one of the reasons we stay with them is because of this link -so if it is not working......by by parcelforce
musicmaster Posted May 23, 2019 Posted May 23, 2019 You might consider opening the network tab in your browser's console. There you can see the actual communication taking place and click on each of the file names to see what was returned.
haylau Posted May 23, 2019 Author Posted May 23, 2019 8 hours ago, musicmaster said: You might consider opening the network tab in your browser's console. There you can see the actual communication taking place and click on each of the file names to see what was returned. Had a quick look, but not skilled enough. I know how to operate console for the page once it is loaded to check generaconsole errors, css effects etc, but how would I see what is happening when I click a submit button? The submit button does not change pages but would populate the existing page. So not sure how to see the results of clicking the button.
musicmaster Posted May 24, 2019 Posted May 24, 2019 18 hours ago, haylau said: The submit button does not change pages but would populate the existing page. So not sure how to see the results of clicking the button. That is called Ajax. It means that the software calls a page in the background and then uses the results of that page to change the page you see. So you never see the page that was called. However, when you have the network console open on the moment that you press this submit button you will see that page come along.
haylau Posted May 24, 2019 Author Posted May 24, 2019 @musicmaster unfortunatley does not show anything that I can interpret - perhaps because there are no errors as such. Just no orders. Nevermind. I give up.I will tell the couriers they are on borrowed time unti i find an alternative solution
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now