Integrate (developer)

Prerequisite: If you are a developer, you've been given a Username, Password,and Installation ID by the account holder.

For developers, or people with advanced knowledge of HTML.

How it works

Here's a summary of an advanced integration to us:

  1. You put a 'Pay Now' button on the website for customers to click. Order details can be sent via a HTML form or a URL query string.

  2. The button sends them to our payment method page, where they choose how to pay. This page can be bypassed if the payment method is known before the 'Pay Now' button is clicked.

  3. Clicking a payment method (or a bypass) sends them to our secure payment page. They enter their details and click Make payment. Many of these details can be collected beforehand and either pre-populated, or hidden from this page.

  4. The Make payment button takes them to a confirmation page. If they cancel, they are taken to a Cancellation page. These pages can be customised (for example to redirect the shopper back to the website), or replaced with your own.

  5. We securely process the payment, optionally send a payment response (to update the ordering system), and send merchant and customer confirmation emails. The transaction also arrives in the Worldpay interface, the Business Manager. From here it can be acted upon (e.g. refunds).

Send a test transaction

You can send the order details via a HTML form, or a URL order details string.

HTML form

This example is set up for testing, and uses the URL for our test environment and the testMode parameter. It then contains the fourmandatory parametersthat must be sent with each order:

Copied!
<form action="https://secure-test.worldpay.com/wcc/purchase" method=POST> <!-- Specifies the URL for our test environment -->
  <input type="hidden" name="testMode" value="100"> <!-- 100 instructs our test system -->
  <input type="hidden" name="instId" value="The installation ID "> <!-- A mandatory parameter -->
  <input type="hidden" name="cartId" value="The ID for the product "> <!-- A mandatory parameter - reference for the item purchased -->
  <input type="hidden" name="amount" value="The cost of the product "> <!-- A mandatory parameter -->
  <input type="hidden" name="currency" value="currency code e.g. GBP, USD "> <!-- A mandatory parameter. ISO currency code -->
  <input type=submit value=" Buy This "> <!-- Creates the button. When clicked, the form submits the purchase details to us. -->
</form>

URL query string

This example uses the fourmandatory parametersin a URL string, and uses the URL for our test environment and the testMode parameter:

Copied!
<div class="Prettyprint">https://secure-test.worldpay.com/wcc/purchase?instId=123456&cartId=WorldPayTest&amount=40.00&currency=GBP&desc=WorldPayTest&testMode=100</div>

Test basic scenarios

  1. Use the 'Buy This' button to test the basic outcomes of a transaction. If clicking the button fires the payment method selection page, the connection in test is working.

  2. Choose a payment method to fire the payment page.

  3. On the payment page, enter these values in the Cardholder's Name field to simulate different outcomes:

Cardholder's Name valueSystem response
REFUSEDSimulates a refused transaction at the bank
AUTHORISEDSimulates a successful authorisation at the bank, but no funds transferred.

Note: Putting any name in here also simulates an AUTHORISED result.

ERRORSimulates an error during the process (e.g. disconnection)
CAPTUREDSimulates a successful capture of funds (where funds are ready to be transferred to the merchant's account)