Re: WorldPay Module for ZenCartv1.3x
Hi
I know a few people have requested the order id to be sent to the worldpay gateway so that they can reconcile the orders to the payments.
And I understand that the order id is not raised until zencart gets the callback from worldpay.
Would a compromise be that the customer id be sent to worldpay and returned to zencart. An account is created before going to the final checkout and an id would have been created. Most days a customer will only order once and it would be much easier to match up payments to customers and therefore orders.
I have no idea at implementing this but i thought I would mention it. It may be a stupid idea but I would appreciate comments.
Craig
Re: WorldPay Module for ZenCartv1.3x
Hamish,
Now I am confused! It's either numerical or a string. I've proved it is a string when it comes back from WorldPay so 'just add quotes' should work fine in all cases. Anybody got any clue why this simple snippet of code is not producing consistant results?
Craig,
As you rightly say you cannot send the order id to WorldPay since the order is not created until the 'success' response is received back from WorldPay.
One possibility is to store the WorldPay transaction ID in the database and display this in the orders listing in admin. This would give a cross reference within Zencart but not in the WorldPay control panel. The WorldPay control panel does store the session ID but this doesn't help.
I have thought of sending the cart ID rather than the session ID to WorldPay but I need to look into the implications of this in more detail. This would help in two ways.
1. If this were stored with the order data and displayed on the orders listing within Admin then we would have a common reference in both ZenCart Admin and the WorldPay control panel.
2. On the rare occasion when the transaction is successful at WorldPay but the callback fails the merchant can retrieve the order information from the cart ID.
NB The circumstance under which a credit card transaction is successful but the callback fails would be if the merchant host server went down while the WorldPay transaction was taking place. The callback would fail because the host server would be unavailable at the time of the callback. This has happened once in over 1500 orders to a customer of mine.
Your premise that the customer ID could be used on the basis that a customer is unlikely to make two orders on the same day is flawed. Although not common it is not unknown, which brings us inevitably to good old Murphy's Law - If it can go wrong - it will!
http://www.murphys-laws.com/
Any further thoughts on this subject would be appreciated.
Regards,
Alan
Re: WorldPay Module for ZenCartv1.3x
Thanks for the quick reply Alan.
Might have guessed my idea was a non-starter, although for my use would probably be OK.
However, I did not realise the card ID was held by ZenCart at all. Sounds as if it would be good.
Look forward to more peoples thoughts on it.
Craig
Re: WorldPay Module for ZenCartv1.3x
Hi Alan,
I wish I knew and could help. I have come to the assumption that none of this is to be clear to me!!
I wanted to ask whether anyone had had an issue with the callback page showing secure and non secure items? I had your module on a 1.2.7 store and it worked great. I have now installed it on my new 1.3.6 version and when I make a payment, an error message pops up saying the page has both secure and non secure items on it.
When I click No to accept the secure items, the design of the page disappears and all I get is a text layout without the styling.
Any help would be greatly appreciated.
Many thanks.
Hamish
Re: WorldPay Module for ZenCartv1.3x
Hamish,
The 'Non secure items on the page' message is generated by your browser and simply means that within a page which is accessed securely by HTTPS (ie the URL starts https://...) some items are linked to non-securely by HTTP (ie the URL starts http://...) Usually the non secure links are to images and therefore there is no security issue with clicking 'Yes' in response to the message. However it would be better all round, not least for your customers' peace of mind, if this message was not displayed.
To find out where the non secure links are make a test transaction and when the message appears click 'Yes'. Now view the source of the resultant page. In Internet Explorer you click on 'View' on the menu bar and then on 'Source'. This opens the page code in 'Notepad'. Now search the source code for the string 'http://'. In notepad click 'Edit' on the menu bar and then 'Find Next'. Make a note of which links are non-secure and edit the appropriate Zencart file to correct this.
My guess is that you have placed an image in one of your sideboxes where you have hard coded the link as something like:
Code:
<img src="http://www.mysite.com/myimage.jpg" />
Changing this to
Code:
<img src="https://www.mysite.com/myimage.jpg" />
will solve the problem.
Hope this helps.
Alan
Re: WorldPay Module for ZenCartv1.3x
I allways get .. “your payment has been cancelled!”
I don’t know what´s wrong but the callback fails in my shop. I use Zen 1.35 and PHP Version: 5.1.5 .
If I make an order in the shop, and use this modul, all works fine until the callback starts.
The callback takes me back in my Shop with the message:
... your payment has been cancelled!
Response from WorldPay:
This is a TEST TRANSACTION. No money has changed hands
Your payment has been cancelled…
Later I get a message from Worldpay that all works fine with no error. Why I get the wrong message with “Your payment has been cancelled…”?
The Money changed from the customer to me but the shop can´t complete the order of the customer.
Can someone help me ?
Re: WorldPay Module for ZenCartv1.3x
Unifex,
Since you are using PHP version 5.1.5 it sounds as if you have encountered the same problem as Michaelchild did some time ago in this thread.
You will find his solution here:
http://www.zen-cart.com/forum/showpo...4&postcount=32
and you will find an explanation as to why this solution is needed here:
http://www.zen-cart.com/forum/showpo...0&postcount=41
There is another possibility that you are encountering a problem which some (but not all) users seem to have come across. This has to do with the way PHP handles the test in the script for the value of $testMode which is returned by WorldPay as part of their response token. The 'just add quotes' solution posted here SHOULD work in all cases.
http://www.zen-cart.com/forum/showpo...6&postcount=63
To risk teaching my granny to suck eggs do one change at a time testing thouroughly each time.
Hope this helps.
Regards,
Alan
Re: WorldPay Module for ZenCartv1.3x
Hamish,
While replying to Unifex (see above) it occured to me that your problem might have been related to PHP v 5.1 which might explain why the 'Just add quotes' solution didn't work for you. What version of PHP is installed on your server?
I just hate not knowing why something works or doesn't!
Regards,
Alan
Re: WorldPay Module for ZenCartv1.3x
Halleluja,
okay, i don´t believe in god but in fast support of technical problems. Solution one works for me.
Thanks Alan for your help.
Regards,
Unifex
Re: WorldPay Module for ZenCartv1.3x
Hi Alan,
Sorry for the delay in my reply - I didn't get the email to say someone had added to the thread.
With regards which version of PHP my server is using, I am afraid I don't have good news if you think the problem is with version 5. I have 4.4 installed according to the server info in admin.
Also, thank you for your detailed reply about the images. I have had a quick look and can't spot it but I will look in a little more depth when I get 5 mins.
Many thanks again for your help.
Kind regards,
Hamish