Rikki,
Thanks for the comprehensive reply. It makes things so much easier to eliminate what is NOT causing the problem when you have all the information.
You have the 'Transaction Mode' set to '0' so that is OK.
Your WorldPay screenshots show that the purchase token received by WorldPay has $testMode = 0 otherwise each of the WorldPay screens would have
'TEST MODE - this is not a live transaction'
in red at the top.
That's OK too.
So there must be something wrong with the WorldPay response or the way your installation is handling the WorldPay response. This points to the file:
includes/templates/template_default/templates/tpl_wpcallback_default.php
or the version of this file you have in your custom template file e.g.
includes/templates/your_custom_template/templates/tpl_wpcallback_default.php
Have you customised this file in any way?
Check the code at line 206. It should look like this:
<?php
//echo '<WPDISPLAY ITEM=banner>';
if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
echo WP_CONTACT_HEADING . "<br /><br />";
echo $name . "<br/>";
echo $address . "<br />";
echo $postcode . "<br />";
echo $country . "<br />";
echo "Tel: " . $tel . "<br />";
echo "Email: " . $email . "<br /><br />";
echo WP_PAYMENT_HEADING . "<br /><br />";
echo $authAmountString . " has been debited from your " . $cardType . " card.<br />";
echo "Our ref: " . $cartId . "<br />";
echo "Your WorldPay Transaction ID is " . $transId . "<br />";
?>
This is the code which displays the information for a successful transaction. As I said in my previous post it's the following line which determines whether the 'Test transaction' message is displayed.
if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
Also at line 319
<?php
//echo '<WPDISPLAY ITEM=banner>';
if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
echo WP_CANCELLED_HEADING . "<br /><br />";
echo "Our ref: " . $cartId . "<br />";
?>
This is the code for the information displayed when a transaction fails or is cancelled.
Check that this two pieces of code have not been changed in any way.
You could also add an additional line of code to test the value of $testMode being returned by WorldPay as follows:
echo '$testMode = ' . $testMode . "<br /><br />";
This should be positioned so that the above two pieces of code now look like this:
<?php
//echo '<WPDISPLAY ITEM=banner>';
echo '$testMode = ' . $testMode . "<br /><br />";
if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
echo WP_CONTACT_HEADING . "<br /><br />";
echo $name . "<br/>";
echo $address . "<br />";
echo $postcode . "<br />";
echo $country . "<br />";
echo "Tel: " . $tel . "<br />";
echo "Email: " . $email . "<br /><br />";
echo WP_PAYMENT_HEADING . "<br /><br />";
echo $authAmountString . " has been debited from your " . $cardType . " card.<br />";
echo "Our ref: " . $cartId . "<br />";
echo "Your WorldPay Transaction ID is " . $transId . "<br />";
?>
<br />
<?php
and
<?php
//echo '<WPDISPLAY ITEM=banner>';
echo '$testMode = ' . $testMode . "<br /><br />";
if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
echo WP_CANCELLED_HEADING . "<br /><br />";
echo "Our ref: " . $cartId . "<br />";
?>
For a successful transaction you should see this on the callback page:
Response from WorldPay:
$testMode = x
This is a TEST TRANSACTION. No money has changed hands
Please check your contact details. If there are any errors please contact us immediately.
Fred Flintstone
Bedrock
6000BC
USA
Tel: 1234 567 8910
Email: [email protected]
Your payment details are detailed below. If you have experienced any problems with your payment please contact WorldPay immediately.
£41.24 has been debited from your Visa card.
Our ref: 12ee209e338e85761a568e2da2dcff39
Your WorldPay Transaction ID is 190601916
You will find WorldPay contact information here
and for a failed or cancelled transaction you should see this on the callback page
Response from WorldPay:
$testMode = x
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: 12ee209e338e85761a568e2da2dcff39
You will find WorldPay contact information here
If x= 0 then all is well with the WorldPay callback response and the problem lies in your installation. If x = anything other than '0' then there is something wrong with the WorldPay response.
To test this put through a test purchase but click on 'Cancel' once you reach the WorldPay payment pages. Testing using a cancelled transaction will save further transaction charges and debits on your credit card.
Let me know how you get on.
Alan
workingIT.co.uk
working IT for business