You can use an installation's Test Environment at any time, even when your site has gone live. The live and test environments run in parallel as independent systems.
You should note that the environments operate at the individual order level rather than at a session level.
This means that when you submit order details to the Test Environment, you submit details of individual orders to the environment, rather than an instruction to start a test session for a series of orders.
You can use real card details in the Test Environment - no money is actually transferred when you submit transactions in the Test Environment. However, if you prefer to use dummy test card details, see the list in Test Card Numbers.
You must be especially careful about submitting test transactions once you are live. If you submit order details to the live Production Environment our systems will attempt to debit accounts. Reversing transactions such as these, and adjusting accounts, will cause additional work for us as well as yourself and processing charges cannot be refunded. For this reason you should test with low value transactions where possible. |
To submit order details to the Test Environment in an HTML form, you need to specify the Test Environment URL and include the testMode parameter as follows:
<form action="https://secure-test.worldpay.com/wcc/purchase" method=POST>
<input type=hidden name="testMode" value="100">
You can use the testMode parameter to specify either Live or Test mode, as shown in the table below.
testMode value |
Description |
---|---|
0 |
Live Mode. The transaction is sent to bank for the standard authorisation process with resultant funds transfer if successful. |
100 |
Test Mode. The result will depend upon the value specified in the name parameter, as shown below. But funds will NOT be transferred, regardless of the result. |
If you have specified a testMode value of 100, you should also instruct the Test Environment how to respond to a transaction. To do this, specify the test result you want by using an appropriate value in the shopper's name parameter, valid values are shown in the table Test Result Values below.
For example:
<input type=hidden name="name" value="AUTHORISED">
If you do not specify one of the values shown in the table below, the system will assume you want an AUTHORISED response. For example, if you entered a real name, such as John Smith, the system would reply with an AUTHORISED response.
You can also enter a test result value directly into the Name field when a Payment Page is being displayed. |
Use the shopper name parameter in the order details submission to specify the result value.
Name value |
System response |
---|---|
REFUSED |
Will be equivalent to a refused transaction at the bank. |
AUTHORISED |
Will be equivalent to a successful authorisation at the bank, but no funds transferred. |
ERROR |
Will be equivalent to a payment that ends in error. |
CAPTURED |
Will be equivalent to a successful capture result - where funds are ready to be transferred (settled) to the merchant's account. Please note that this process depends on the capture delay set in the Merchant Interface. |
The system will decline obviously fraudulent names, such as Mickey Mouse and Test. |