Hi Craig
Edit includes/templates/template_default/sideboxes/tpl_wp_cc_accept.php
and comment out / delete the required lines
ta
Hi Craig
Edit includes/templates/template_default/sideboxes/tpl_wp_cc_accept.php
and comment out / delete the required lines
ta
Im getting this error
I have it in livemode - 0PHP Code:
[B] ... your payment has been cancelled! [/B]
Response from WorldPay:
This is a TEST TRANSACTION. No money has changed hands
Your payment has been cancelled. Please contact us for alternative methods of payment. If you have experienced any problems with your payment please contact WorldPay immediately.
Our ref:
You will find WorldPay contact information here
MD5 is switched off an pre auth is false.
Iv tried this : http://www.zen-cart.com/forum/showpo...0&postcount=41
But it didnt seem to help.
JohneeMac,
Firstly you shouldn't be testing in live mode. Get it working in test mode first. In fact this might just be your problem. You can't go live until WorldPay has tested your installation and made it live. If this hasn't been done then the result is correct. WorldPay are cancelling the transaction because your installation is not yet live.
For testing successful transactions you should set the module transaction mode in admin to '100'
Use visa card number '4111111111111111' for testing.
If this doesn't do the trick see this post:
http://www.zen-cart.com/forum/showpo...7&postcount=77
Hope this helps.
Alan
Thanks for that.
I am still getting the same error in test mode and WorldPay have apparently validated the account.
Before i go and look at those links can someone confirm i should still get the error in test mode? Or should it work ok and return the order as confirmed and give success message?
JohneeMac
In test mode:
transaction mode = "100" all transactions should be authorised provided you use a valid card number and a valid expiry date. No funds will be transferred.
transaction mode = "101" all transactions will be declined. No funds will be transferred.
transaction mode = "0" transactions will be sent to the bank for the standard authorisation process. Successful transactions will result in funds being transferred.
When a transaction fails at WorldPay no callback takes place. WorldPay returns the customer to the card details screen with an error message. The customer can then choose to re-enter their card details, enter the details of a different card or cancel the transaction. It is only if the customer clicks on 'Cancel' in the WorldPay pages that a 'Transaction Cancelled' message is returned to the ZenCart WorldPay module.
In includes/templates/template_default/tpl_wpcallback_default.php
at around line 47 there is this code:
Basically if the value of $transStatus is 'Y' then the order is completed within ZenCart and the Checkout Success message is displayed on screen. If the value of $transStatus is anything else the order is not completed and the 'Transaction Cancelled' message is displayed.Code:if($transStatus == "Y")
It is very unlikely that WorldPay will have returned a value other than 'Y' unless the 'Cancel' button has been clicked, in which case the value will be 'C'.
The first thing to do is check that in the above code the 'Y' is contained within double quotes. If the double quotes is missing the test fails and the 'Cancelled
Transaction' message is displayed.
The next thing to do is to login to your WorldPay account and look at a statement for your test account. Any test transaction details will be detailed there and you will be able to see whether your test transaction was successful or failed.
Now add this line of code just above line 47
When you complete a test transaction you should see the value of $transStatus returned by WorldPay i.e, "Transaction Status = Y" for a successful transaction and "Transaction Status = C" for a cancelled transaction. If what you see is "Transaction Status = " then the problem is that the WorldPay module is not seeing the value returned by WorldPay.Code:echo "Transaction Status = " . $transStatus;
If this is the case post back here with the version of PHP running on your server.
Hope this helps.
Alan
Hi, duncanad
Should I set MD5 to "true" or "Flase"? Please advise!
thanks!
Hi
I have a site which has been using Worldpay for some tim ewith no problems. For various reasons, php had to be upgraded to v5 necessitating an upgrade to 1.3.7.
I am not sure if the worldpay has been working since but certainly doesn't now.
When you get to the checkout_confirmation page, for some reason the Confirm button has been dropped from the page. ie the code is being broken about that point.
The end result is, customers are unable to complete their order.
It appears to be related to this bit of code at line 176 of tpl_checkout_confirmation_default.php
if (is_array($payment_modules->modules)) {
echo $payment_modules->process_button();
You can see the site at http://globalbusinessideas.com/shop/
I am struggling to get this problem sorted. Any suggestion will be gratefully received.
Thanks
Neil Potter
Where it all happens
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:
I would suggest checking the last few lines of code in: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>
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
Thanks Duncanad
Not sure what is happening but something about the worldpay module is breaking the code of the checkout confirmation template.
The reason I say this. If you use either of teh other 2 forms of payment eg Direct Credit, the confirmation page is drawn correctly with the confirmation button as expected. If you choose the pay with Worldpay option, the page is drawn broken.
The template file is correct, with the missing lines of code (from the displayed page source) where they should be. In the template file the affected lines ie the ones following where the page source stops, are
if (is_array($payment_modules->modules)) {
echo $payment_modules->process_button();
}
?>
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDER, BUTTON_CONFIRM_ORDER_ALT, 'name="btn_submit" id="btn_submit"') ;?></div>
</form>
<div class="buttonRow back"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '<br />' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></div>
</div>
It appears to me the problem occurs in the call to the process_button() function. Unfortunately I don't know enough of the zencart code to know where to find this function.
Strangely, the other day I commented out the if statement and the page displayed correctly but the payment processing failed. I found and fixed the HTTP_POST etc to _POST change necessary and fixed that. Now when I comment out the if statement, the page doesn't display correctly for any of the payment options. (probably a red herring issue this one)
So my guess is, there is something about worldpay which causes the process_button() function to fail, stopping the rest of the confirmation page's cod ebeing generated correctly.
Any suggestions? Even where to find the function would be a help as I can then perhaps debug myself.
Many thanks
Neil Potter
Where it all happens
Hi, duncanad
thank you for clarified MD5 issue!
regards!
doubletiger
Bookmarks