Re: WorldPay Module for ZenCartv1.3x
I have the WorldPay module running on a live site, in live mode (testMode set to '0' in admin) with the WP account in live mode.
For some reason the call back script is returning the string "This is a TEST TRANSACTION. No money has changed hands" even though 'testMode=0' is being sent to the it by WorldPay for each transaction.
Has anyone else experienced this?
TIA
ColinR
Re: WorldPay Module for ZenCartv1.3x
The problem lies with the version of php on your server. I bet you've got version 5.X?
It only works correctly with versions prior to 5.
Apparently there's going to be an upgrade to ZenCart so that it will work with PHP5.
Regards
Re: WorldPay Module for ZenCartv1.3x
Quote:
Originally Posted by
suffrinmick
The problem lies with the version of php on your server. I bet you've got version 5.X?
Thanks for the advice. But no, I'm running PHP Version: 4.4.7 (Zend: 1.3.0)
Any other suggestions?
ColinR
Re: WorldPay Module for ZenCartv1.3x
Quote:
Originally Posted by
duncanad
doubletiger,
MD5 should be set to 'false' - unless of course you are using MD5!
Pottsy,
The file:
tpl_checkout_confirmation_default.php
is part of the core code and not part of the WorldPay module so you should be experiencing this problem with all of your payment methods - not just WorldPay.
I have had a look at your site and at the source code of your Checkout Confirmation page. You seem to be missing the last half dozen or so lines of the above file including the following:
Code:
<div class="buttonRow forward"><input type="image" src="includes/templates/template_default/buttons/english/button_confirm_order.gif" alt="Confirm Order" title=" Confirm Order " name="btn_submit" id="btn_submit" /></div>
</form>
<div class="buttonRow back"><strong>Final Step</strong><br />- continue to confirm your order. Thank you!</div>
I would suggest checking the last few lines of code in:
includes/templates/template_default/templates/tpl_checkout_confirmation_default.php
Of course, if you have customised this file in any way then you need to check the version of this file in your template overide folder i.e.
includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_confirmation_default.php
Hope this helps.
Post back if/when you get this resolved.
Regards,
Alan
Hi Alan
I found where the code was breaking. Just not sure why.
The code was breaking in the includes/modules/payment/worldpay.php module. The problem was the $languages_id variable was null.
The code involved is
$language_code_raw = "select code from " . TABLE_LANGUAGES . " where languages_id ='$languages_id'";
$language_code = $db->Execute($language_code_raw);
$languages_id is null but should be 1
I am not sure but I get the impression it should be the "default" language id. As the site only uses english I was able to set the appropriate language_code field by hard coding the value.
Any suggestion as to why the language code value wasn't getting set?
In the meantime I have worked around the problem.
Cheers Neil
Re: WorldPay Module for ZenCartv1.3x
Neil,
Sorry I've been AWOL from the forum for a while - been busy trying to catch up so I can enjoy the Christmas break and find time to shop for my Wife's present!
I've looked at the above code on my test site and discovered that for some reason I have commented it out. No idea why - perhaps in response to a previous post, or just part of my ongoing process of bringing the module up to date with current ZenCart coding practices. Any way here is how my current test version handles '$language_code'
In
includes/modules/payment/worldpay.php
these two lines are commented out (or just delete them)
Code:
$language_code_raw = "select code from " . TABLE_LANGUAGES . " where languages_id ='$languages_id'";
$language_code = $db->Execute($language_code_raw);
and a little further down replace this line:
Code:
zen_draw_hidden_field('lang', $language_code) .
with this line:
Code:
zen_draw_hidden_field('lang', $_SESSION['languages_code']) .
Have a go with the above code and see if this works for you - better than hard coding values.
Regards,
Alan
Re: WorldPay Module for ZenCartv1.3x
ColinR,
I think you may find the answer to your problem here:
http://www.zen-cart.com/forum/showpo...6&postcount=63
Hope this helps,
Alan
Re: WorldPay Module for ZenCartv1.3x
Hi Duncan,
Can you help me with this callback failure issue please.
I have just setup the worldpay module on to our shopping cart at www.mdfdisplays.co.uk , all seems ok and it goes through to the worldpay payment page and the test transaction goes through. The problem i have is i keep getting a callback failure alert and once the worldpay payment has been made it does not direct you back to the main site. i have the callback set to :
http://<wpdisplay item="MC_callback"> and the correct boxes ticked, but it still fails to work.
This is the log that i get back from worldpay:
Our systems have detected that your callback has failed.
This callback failure means we were unable to pass information to your server about the following transaction:
Transaction ID: 289641272
Cart ID: dc223e2c0e0ebb4f241d0ed2bbee920c
Installation ID: 151874
Error reported: Callback to http://mdfdisplays.co.uk/shop/wpcall...ype=authResult NOT OK, recevied HTTP status: 301
Server Reference: mggaeq3a:callbackFailureEmail-3640388:MerchReq-981
Also, if you usually return a response page for us to display to the Shopper within the time allowed (1 minute), this will not have been displayed.
WorldPay will have displayed to the Shopper the response page file (resultY.html or resultC.html) held for your installation on the WorldPay server. This will be your own custom version, if you have supplied one, or, if not, the WorldPay default version.
This is a response i got from Worldpay, but i dont understand what i need to do to resolve the issue.
The reason why the callback process is failing is because your server is attempting to redirect the HTTP request from WorldPay to another URL, since the resource (i.e. wpcallback.html) at "http://mdfdisplays.co.uk/shop/wpcallback.html?installation=151874&zenid=b91c2cdd df01d935f72eac915383f21e&msgType=authResult" has moved. Therefore please ensure that your shopping cart is sending the correct callback URL to WorldPay, or that the resource is located in correct location.
Darrel
Re: WorldPay Module for ZenCartv1.3x
Hi Duncanad et al
as a zen cart newbie, I have recently installed the worldpay module which works fine in test mode but worldpay will not activate my acc untill i display all of the icons for their credit cards and the powered by world pay logo.
I have noticed that in the admin>credit cards section some of the cards are not listed eg laser and ELV.
How does one add new cards?
I had incorrectly assumed that i could define new ones in credit_cards.php but evidently not. Must they be added via the mysql database first? A little beyond my ken at the moment.
Any suggestions re displaying the requisite icons graetly appreciated.
Thanks in advance
Re: WorldPay Module for ZenCartv1.3x
Opps didn't notice that you had already created a side box that i needed to activate. Sorry
Never the less though i am still interested in an answer to how you can add more cards
Ta
Re: WorldPay Module for ZenCartv1.3x
Hi all
For what its worth i too have the same problem as Rikki et al re test notification even the order has been processed by WP
Shall try his solution first and then Duncanad if the former doesn't work.
Thanks for all the hard work
d