- Posts: 32
- Thank you received: 2
Problems getting custom onAfterOrderCreate to work
Just need to wait for some more orders...
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Good to know !
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
I installed V2.2 dated 5th July yesterday, and today I note there is another V2.2 but dated 6th July. They do appear to be binary different but they have the same version number? I installed it anyway in the hope that whatever is fixed.
Please Log in or Create an account to join the conversation.
Let us know if you still have issues and if you can find some pattern in that case.
Please Log in or Create an account to join the conversation.
I'm also confused by your version numbering. I've downloaded about 5 versions of 2.2.0 and they do seem to be binary different. 1,573,271 bytes was reported for the version on July 6th; 1,575,046 bytes is reported for today's version (also labelled 2.2.0). Are these files actually different in terms of code and bugs fixed?
Please Log in or Create an account to join the conversation.
You can try to download the latest build and install it, but the best is to not update a live website with a new release until we activate the auto update if you don't want to encounter issues. Especially since for the 2.2, we had to redo all the payment system handling and all the payment plugins in HikaShop to be able to handle multiple payment configurations.
On our end we actually found a few issues with the PayPal plugin in the first builds of the 2.2 release but the build of today shouldn't have anymore problems with it (I've reviewed it myself yesterday in a website with real transactions).
Please Log in or Create an account to join the conversation.
Can I roll back to a working version? If so, which version, and where can I find it?
Please Log in or Create an account to join the conversation.
I don't think that your problem comes from the 2.2 update but from the configuration of the website.
For example, if some payments happen via a menu which is not public and that you didn't force the checkout to a public menu, PayPal would be blocked by joomla before being able to notify HikaShop of the payment for the orders made via a non public menu. I would even say that it's the most probable situation, from what you're describing.
We don't propose the download of previous versions of HikaShop on our website but we have them stored on our end. If you want a previous version of HikaShop, please request it via our contact form with the version number and the edition you need and we'll provide it (if you purchased it of course if it's a commercial edition):
www.hikashop.com/contact-us.html
Downgrades and upgrades work the same. Simply install them via the joomla installer and that will downgrade or upgrade HikaShop.
Please Log in or Create an account to join the conversation.
There is also the fact this was working fine previously, then suddenly stopped working, then you or your colleagues released a fix, and that upped the success rate to maybe 90%, but the latest fixes have dropped it back to zero. The only thing that's changing is installation of new versions of HikaShop. For reference we get 5-10 orders per day so we have reasonable figures with which to make these observations.
One thing that is annoying me is your version control. I have downloaded something like half a dozen versions of 2.2.0. The only way I can determine which version was installed was by looking at my download list to see which dated version of 2.2.0 was downloaded, but of course that is not indicative of what was actually installed. Using the component only shows 2.2.0 which is meaningless when there are so many editions of 2.2.0. Earlier somebody said I shouldn't have downloaded the latest released version, effectively saying because it might be buggy, yet this is the only version available to new users - and how should I know when to upgrade to a stable version - or even what IS a stable version?! Very confusing. But then I come from a software environment that requires unique version numbers for each release so perhaps I'm being a little harsh.
Please Log in or Create an account to join the conversation.
If you get a 90% confirmation rate, it most probably means that some users access to the checkout via a private menu. That can happen for example if you allow your users to pay later their orders via their orders listing and that you create a menu item going to that listing which is accessible only to registered users (you don't want to display that menu item to guests since they don't have yet any order). Then, PayPal tries to send the notification to that menu item and it is rejected by joomla because paypal's server is not logged on your website when doing the notification. So it would work fine for all users who would pay directly via the checkout and not for those paying via that menu. And in such case, the solution is to configure the "force a menu on checkout" option to a public menu so that all the customers go to paypal via that menu, ensuring that paypal can always send the notification to HikaShop.
The fact that it stopped working after you first updated to 2.2 was because there was a bug in the plugin of that release which we fixed since then.
It's simple to know when to update a live website. Just wait that we activate the auto update of the joomla updater and joomla will tell you that there is a new version available.
Of course, it is always recommended to test an update ( for hikashop but also for other extensions and even for joomla) on a copy of your website and do a backup of the website before in case you encounter some unexpected issues after the update. That way, you can easily go back to what you had.
Regarding the version numbering, of course each new build we publish of HikaShop has a different build number. It is not displayed to the user as it is usually not necessary to know it.
If you look at the HTML code of the footer of HikaShop (if it is activated in the configuration) you will see the build number in the comments of the HTML code.
There are a lot of users already using HikaShop 2.2 with PayPal and the payment confirmation is working fine for them.
So I can only think of a configuration issue on your end.
Normally, when you don't receive notifications, it comes from one of the causes listed here:
www.hikashop.com/support/documentation/i...or.html#notification
So I invite you to check these out and you should find out why it's not receiving the paypal notifications anymore.
If you checked all of them and went to the end of that list, you should be able to give the content of your payment log which will allow us to tell you more about what's going on.
Please Log in or Create an account to join the conversation.
nicolas wrote: Then, PayPal tries to send the notification to that menu item and it is rejected by joomla because paypal's server is not logged on your website when doing the notification. So it would work fine for all users who would pay directly via the checkout and not for those paying via that menu. And in such case, the solution is to configure the "force a menu on checkout" option to a public menu so that all the customers go to paypal via that menu, ensuring that paypal can always send the notification to HikaShop.
That kind of makes sense except I'm not sure how some users might have success when others don't, when using the same menus. I don't think there is a hidden way into the shop.
I have found the setting you describe and set it to the home page menu item. Is that an appropriate selection? Not to a specific shop page or something?
nicolas wrote: Of course, it is always recommended to test an update ( for hikashop but also for other extensions and even for joomla) on a copy of your website and do a backup of the website before in case you encounter some unexpected issues after the update. That way, you can easily go back to what you had.
Indeed, but wouldn't have helped in this case where the success rate isn't exactly 0% or exactly 100%. My test order went through fine. It's only when real world customers started complaining that I realised something was up. That would never have appeared on a test website because it needed real world customers to interact with PayPal to expose the bug.
nicolas wrote: Regarding the version numbering, of course each new build we publish of HikaShop has a different build number. It is not displayed to the user as it is usually not necessary to know it.
If you look at the HTML code of the footer of HikaShop (if it is activated in the configuration) you will see the build number in the comments of the HTML code.
Ah, would that be the 2.2.0 [1308011801]? If so, may I suggest it is displayed in the back end? Users may not need to know but sysadmins often do without digging through reams of HTML code.
I have set the menu option and will wait to see the results of that before going on to the other suggestions. Thanks for the continuing help.
Please Log in or Create an account to join the conversation.
2. 1308011801 is the build number. The first numbers are the date of the build: 2013/08/01 and then the time: 18h01
We'll look at adding that information in the advanced area of the configuration.
Let us know how it goes but if you had a success rate close to 100% with a few people complaining, it's highly likely that it came from a menu item issue.
Please Log in or Create an account to join the conversation.
2. Thanks. Showing the build number will ultimately help you if somebody asks for advice and they say they have version 2.2.0... but which version of 2.2.0 do you have?
So, assuming I set up the menu option in the way you describe correctly, it doesn't look like that is the problem. Is there any debugging I can add, or option I can set (either in PayPal or HikaShop) that will allow us to see where it goes wrong?
Please Log in or Create an account to join the conversation.
If you place an order and that after the payment nothing is added in that file even though that debug option is turned on, it means that HikaShop doesn't receive the payment notification.
In that case, it normally has to come from one of the points of the documentation I gave earlier. If you think that everything is ok, then you'll have to dig in the apache access log of your website for the request to the notification URL ( index.php?option=com_hikashop&ctrl=checkout&task=notif... ) and see what it says.
If you have a 30x HTTP status for the request, it means that something redirected the page somewhere else preventing the plugin from confirming the order and the redirect URL should give you a big clue on what is doing that.
If you have a 40x status, it means that it's probably a menu item/sef issue as the page couldn't be found.
If you have a 50x status, it means that there was a fatal error during the processing of the request and you can then check the php error log for the fatal error message.
if you have a 20x status, it means that the request was properly received and that the issue happened in HikaShop, but that shouldn't be possible if you don't get stuff written in the payment log...
Please Log in or Create an account to join the conversation.
Ok, debug was already running. Oddly the only contents are about a payment reversal (which did happen) and cancellation of the reversal (which also happened). I placed a new order but no new entries were made in the log file.
Next I looked at the Apache log. I couldn't find anything with even just "task=notif" in the search string. I did find a bunch of requests pertaining to the new order though:
108.x.x.x - - [09/Aug/2013:00:33:49 +0100] "GET /index.php?option=com%5fhikashop&ctrl=checkout&task=after%5fend&order_id=101103&Itemid=318 HTTP/1.1" 200 61907 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0"
108.x.x.x - - [09/Aug/2013:00:33:50 +0100] "POST /index.php?option=com%5fhikashop&ctrl=checkout&task=after%5fend&order_id=101103&Itemid=318 HTTP/1.1" 200 61907 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0"
108.x.x.x - - [09/Aug/2013:00:33:51 +0100] "GET /media/com_hikashop/css/frontend_default.css?v=220 HTTP/1.1" 304 - " www.xxxxxx.co.uk/index.php?option=com%5f...id=101103&Itemid=318 " "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0"
108.x.x.x - - [09/Aug/2013:00:33:51 +0100] "GET /media/com_hikashop/js/hikashop.js?v=220 HTTP/1.1" 304 - " www.xxxxxx.co.uk/index.php?option=com%5f...id=101103&Itemid=318 " "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0"
66.249.75.209 - - [09/Aug/2013:00:33:52 +0100] "GET /index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=101103&Itemid=318 HTTP/1.1" 200 46565 "-" "Mediapartners-Google"
66.249.75.209 - - [09/Aug/2013:00:33:53 +0100] "GET /index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=101103&Itemid=318 HTTP/1.1" 200 46565 "-" "Mediapartners-Google"
The 108.x.x.x address is mine. The 66 looks like Google, maybe to do with the Adwords advertising I have on my site. I found these entries by searching for the 101103 order ID.
The PayPayl plugin settings are:
Allow payment notifications: yes
Enable validation mode: no
Debug: yes
URLs: all 3 empty
IPs: 173.0.84.*,173.0.88.*,173.0.81.*,173.0.82.* (and no 173.0.8 in the Apache log) (if I click "refresh IPs" the box goes blank)
Return method: yes
As for PayPal, there are too many options. IPN is not enabled. The page you refer to says "Please make sure that the payment is accepted in your PayPal account. If the automatic validation of the payments is not turned on in your PayPal account, PayPal won't send the payment notification to HikaShop and your orders won't be confirmed !", however, I can't find this option.
Please Log in or Create an account to join the conversation.
If the "Allow payment notifications" option is on and the "Enable validation mode" option is off, the notifications are properly configured on Hikashop's side.
Regarding PayPal, I would recommend to check that with their support. That way, you're sure you're not missing anything on the paypal account configuration.
Please Log in or Create an account to join the conversation.
Today when I put the link back in and do a test purchase, it went straight through correctly. Hopefully I'll have a customer or three today to see whether several orders go through correctly.
I apologise for not mentioning the IPN settings before - I honestly didn't think it was relevant because, to the best of my knowledge, it was never enabled when hundreds of previous orders had gone through okay in the six months prior to this.
Fingers crossed....
Please Log in or Create an account to join the conversation.
Thanks.
Please Log in or Create an account to join the conversation.
Specifying IPs for paypal is a high security check but Paypal can change their IPs quite often. There is a "refresh" button which will retrieve the current valid IPs but blanking it is not unsafe at all.
When you receive a notification from paypal, the plugin have to confirm the reception by calling paypal again. So if paypal does not really called you, the callback will be refused and so on.
Now in paypal configuration, we set the IPs field blank by default.
So, don't worry, it's safe !
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.