1. Documentation /
  2. Worldpay

Worldpay

The Worldpay payment gateway allows you accept credit card payments via a secure, hosted payment page without needing an SSL certificate on your WooCommerce store.

The payment process takes place in a single tab, for a seamless user journey.

Worldpay handles all major payment methods, debit cards and credit cards, including Diners, MasterCard, Visa, Amex, Maestro and JCB. After completing payment, the order is confirmed and the customer is taken to a Thank You page on your site.

We recommend using the MD5 setting for additional security. The transaction information will include an encrypted value that is used to check that data sent to Worldpay has not been modified.

Installation and Updating

↑ Back to top
For a new installation please review our extension installation guide

If you need to update the extension you can do this from your WordPress admin if you have connected the site to WooCommerce.com, you can read more about that here

You can also update manually by downloading the latest version from your WooCommerce account

Once you have the zip file downloaded you should deactivate and delete the existing version from your WordPress plugins page and then install the new version using the upload option. You will not lose any settings or data by updating this way.

Setup and Configuration

↑ Back to top

worldpay-image-eight

Go to: WooCommerce > Settings > Checkout > Worldpay.

Add the Installation ID, supplied by Worldpay, to your settings in WooCommerce. You should create a Payment Response password. Using the MD5 secret is recommended. Once entered you should save the settings.

If you are using Worldpay with WooCommerce Subscriptions (Worldpay call this FuturePay) or if you want to be able to process refunds from your WooCommerce admin then you will need to enter a Remote Administration Installation ID and Remote Administration Installation Password. These are provided by Worldpay, you will need to request them, they are not issued by default when you apply for an account.

Login with your username and password
Login to your Worldpay Installation with your username and password (https://secure.worldpay.com/sso/public/auth/login.html)
Choose your Merchant Code
Choose your Merchant Code
Click Setup and then the "Select Junior" Test Integration Setup "cog"
Click Setup and then the “Select Junior” Test Integration Setup “cog”

worldpay-image-six

Enter the settings from your WooCommerce settings page and select the boxes indicated.

  • Change ‘Store-builder used’ to ‘Other’
  • Set ‘store-builder: if other – please specify’ as ‘WooCommerce’
  • ‘Payment Response URL’ will be found in your WooCommerce settings for the gateway plugin. Make sure you copy this exactly as it is shown.
  • Tick ‘Payment Response enabled?’
  • Tick ‘Enable Recurring Payment Response’
  • Tick ‘Enable the Shopper Response’
  • ‘Payment Response password’ needs to be set using the same value from your WooCommerce settings
  • ‘MD5 secret for transactions’ needs to be set using the same value from your WooCommerce settings – if you have left it blank in your WooCommerce settings then you can leave it blank here.
  • ‘SignatureFields’ needs to be set using the same value from your WooCommerce settings – if you have left the MD5 secret blank in your WooCommerce settings then you can leave this blank.
Worldpay settings, shown in your WooCommerce settings
Worldpay settings, shown in your WooCommerce settings

Signature Fields

↑ Back to top

You can modify the default signature fields if required. By default the plugin will use instId:amount:currency:cartId.

The list may contain any of the following fields : instId, amount, currency, cartId, name, email, address1, postcode

These field names are case sensitive and should be separated with a colon (:)

The Signature Fields are used by Worldpay, in conjunction with the MD5 Password, to verify that the transaction has not been tampered with between your site and Worldpay.

We do not recommend changing the default fields. You should place test orders to confirm any changes you make.

Adding fields like name can cause problems if the customer name includes unacceptable characters, for example an apostrophe

Using Pre-Auth

↑ Back to top

If you want to Pre-Authorize payments and capture the funds later you can use the “Authorisation Mode” setting in the WooCommerce Worldpay settings.

You will need to check your settings at Worldpay to make sure that the “Capture Delay” is set to off, shown here

Set the Capure Delay to off

WorldPay FuturePay – WorldPay & Subscriptions

↑ Back to top

The WorldPay gateway for WooCommerce supports subscription payments  with WooCommerce Subscriptions (separate purchase). Worldpay calls this Futurepay.

On Subscriptions:
  • Subscriptions can only be modified if there is more than 2 weeks for the next payment.
  • Subscriptions with a regular payment schedule of less than 2 weeks between payments CANNOT be modified. They can only be cancelled.
  • Cart cannot contain more than one subscription but can contain a subscription product and an ordinary product.
  • Subscriptions can be cancelled from your WooCommerce admin or from the customer’s My Account page. To do this you MUST APPLY TO WORLDPAY for a Remote Administration Installation ID and enter the ID and password in to your settings. If you don’t enter a valid Remote Administration Installation ID and password, you can cancel the subscription in your WooCommerce admin but also need to cancel in your Worldpay FuturePay admin area.
skAC
Enter your Remote Administration details to activate the ability to cancel subscriptions from your WooCommerce Admin

URL Submission Method

↑ Back to top
wp-submissionmethod

The advantage of the URL method is that there is one less page for your customer to visit, disadvantages are the recipient can see all the attributes and values in the URL string so you may not feel it is secure. This is an important difference when compared with the FORM method.

You should add an MD5 Secret to your Worldpay settings if you are using the URL method.

Security Column and Fraud Checking

↑ Back to top

From version 4.3.0 the AVS result from Worldpay will be shown on the WooCommerce Order list

There are 4 values included in the AVS response :

  • C : CVS check
  • P : Postcode check
  • A : Address check
  • W : Country check

Each values has 4 possible results

  • 0 : Not supported (yellow colour)
  • 1 : Not checked (yellow colour)
  • 2 : Matched (green colour)
  • 4 : Not matched (red colour)

The transaction is also checked to confirm that the return is from a Worldpay URL and passwords match. Orders that fail these checks with be updated to Fraud Check to alert you. You can alter this in the WooCommerce Worldpay settings

Worldpay Fraud Check Option

Customization

↑ Back to top

Note: This is a Developer level section. If you are unfamiliar with code and filters and resolving potential conflicts, select a WooExpert or Developer for assistance. We are unable to provide support for customizations under our  Support Policy.

Adding Custom Arguments Sent To Worldpay

↑ Back to top

From version 3.4.1 onwards you can modify the list of arguments that is sent to Worldpay, allowing you to add your own, which can then be included in emails.

For example:

add_filter( 'woocommerce_worldpay_args', 'custom_woocommerce_worldpay_args', 10, 2 ); function custom_woocommerce_worldpay_args( $worldpay_args, $order ) { $worldpay_args['MC_test_field'] = 'This should show up somewhere'; return $worldpay_args;}

You will need to login to Worldpay and modify the email templates to use this additional information. your field name should be prefixed with “MC_” as in the example above.

You should not modify the standard fields, these are required by Worldpay and changing them could prevent your customer from checking out.

Troubleshooting

↑ Back to top

Customer is not redirected back to your website after payment

↑ Back to top

You can find the correct Payment Response URL in your Worldpay settings in your store. Make sure that you paste this into your Worldpay settings exactly as it is on your site. If your URL starts with HTTPS and your customers are not redirected back to the site then change the HTTPS to HTTP and test, Worldpay can have issues when returning to HTTPS URLs if the SSL certificate uses SNI, this is a known issue at Worldpay. If this does not resolve your issue then you may need to use a resultY.html file, see the section below for instructions on how to create that.

Are you using CloudFlare?

↑ Back to top

Sites that use CloudFlare may see occasional ‘invalid HTTP status line: >null<‘ messages from Worldpay. Currently there is no solution to this problem, however, creating the resultY file, as shown below, acts as a workaround. Your customers will be redirected back to your site and their orders will be updated correctly. A support ticket has been submitted to CloudFlare, as soon as a solution is available the plugin or docs will be updated as necessary. Worldpay are aware of this issue.

You can check your site if you are not sure if you use CloudFlare. Go to https://intodns.com/ and and enter your URL without the HTTP(S) or WWW. If you see cloudflare in the name server section then your site is using CloudFlare and you should create a resultY file.

Check if your site is using CloudFlare
Check if your site is using CloudFlare

How to create a resultY.html file in the Worldpay file manager

↑ Back to top
You should use this code to create your resultY.html file
<html>
<head>
<meta http-equiv='Refresh' content='2; Url="<WPDISPLAY ITEM=MC_callback>&MC_order=<WPDISPLAY ITEM=MC_order>&transId=<WPDISPLAY ITEM=transId>&transStatus=<WPDISPLAY ITEM=transStatus>&transTime=<WPDISPLAY ITEM=transTime>&authAmount=<WPDISPLAY ITEM=authAmount>&authCurrency=<WPDISPLAY ITEM=authCurrency>&rawAuthMessage=<WPDISPLAY ITEM=rawAuthMessage>&rawAuthCode=<WPDISPLAY ITEM=rawAuthCode>&callbackPW=<WPDISPLAY ITEM=callbackPW>&cardType=<WPDISPLAY ITEM=cardType>&countryMatch=<WPDISPLAY ITEM=countryMatch>&AVS=<WPDISPLAY ITEM=AVS>&MC_transactionNumber=<WPDISPLAY ITEM=MC_transactionNumber>&futurePayId=<WPDISPLAY ITEM=futurePayId>&futurePayStatusChange<WPDISPLAY ITEM=futurePayStatusChange>"'>
<title>Payment Successful</title>
</head>
<h1>Payment Successful</h1>
<a href="<WPDISPLAY ITEM=MC_callback>&MC_order=<WPDISPLAY ITEM=MC_order>&transId=<WPDISPLAY ITEM=transId>&transStatus=<WPDISPLAY ITEM=transStatus>&transTime=<WPDISPLAY ITEM=transTime>&authAmount=<WPDISPLAY ITEM=authAmount>&authCurrency=<WPDISPLAY ITEM=authCurrency>&rawAuthMessage=<WPDISPLAY ITEM=rawAuthMessage>&rawAuthCode=<WPDISPLAY ITEM=rawAuthCode>&callbackPW=<WPDISPLAY ITEM=callbackPW>&cardType=<WPDISPLAY ITEM=cardType>&countryMatch=<WPDISPLAY ITEM=countryMatch>&AVS=<WPDISPLAY ITEM=AVS>&MC_transactionNumber=<WPDISPLAY ITEM=MC_transactionNumber>&futurePayId=<WPDISPLAY ITEM=futurePayId>&futurePayStatusChange<WPDISPLAY ITEM=futurePayStatusChange>">Go back to the site</a>
<WPDISPLAY ITEM=banner>
<WPDISPLAY ITEM=footer.html>
</html>
view raw resultY.html hosted with ❤ by GitHub
If the issue is not resolved then try this code
<html>
<head>
<meta http-equiv='Refresh' content='2; Url="<WPDISPLAY ITEM=MC_callback>/?MC_order=<WPDISPLAY ITEM=MC_order>&transId=<WPDISPLAY ITEM=transId>&transStatus=<WPDISPLAY ITEM=transStatus>&transTime=<WPDISPLAY ITEM=transTime>&authAmount=<WPDISPLAY ITEM=authAmount>&authCurrency=<WPDISPLAY ITEM=authCurrency>&rawAuthMessage=<WPDISPLAY ITEM=rawAuthMessage>&rawAuthCode=<WPDISPLAY ITEM=rawAuthCode>&callbackPW=<WPDISPLAY ITEM=callbackPW>&cardType=<WPDISPLAY ITEM=cardType>&countryMatch=<WPDISPLAY ITEM=countryMatch>&AVS=<WPDISPLAY ITEM=AVS>&MC_transactionNumber=<WPDISPLAY ITEM=MC_transactionNumber>&futurePayId=<WPDISPLAY ITEM=futurePayId>&futurePayStatusChange<WPDISPLAY ITEM=futurePayStatusChange>"'>
<title>Payment Successful</title>
</head>
<h1>Payment Successful</h1>
<a href="<WPDISPLAY ITEM=MC_callback>/?MC_order=<WPDISPLAY ITEM=MC_order>&transId=<WPDISPLAY ITEM=transId>&transStatus=<WPDISPLAY ITEM=transStatus>&transTime=<WPDISPLAY ITEM=transTime>&authAmount=<WPDISPLAY ITEM=authAmount>&authCurrency=<WPDISPLAY ITEM=authCurrency>&rawAuthMessage=<WPDISPLAY ITEM=rawAuthMessage>&rawAuthCode=<WPDISPLAY ITEM=rawAuthCode>&callbackPW=<WPDISPLAY ITEM=callbackPW>&cardType=<WPDISPLAY ITEM=cardType>&countryMatch=<WPDISPLAY ITEM=countryMatch>&AVS=<WPDISPLAY ITEM=AVS>&MC_transactionNumber=<WPDISPLAY ITEM=MC_transactionNumber>&futurePayId=<WPDISPLAY ITEM=futurePayId>&futurePayStatusChange<WPDISPLAY ITEM=futurePayStatusChange>">Go back to the site</a>
<WPDISPLAY ITEM=banner>
<WPDISPLAY ITEM=footer.html>
</html>
view raw resultY.html hosted with ❤ by GitHub
Follow these steps to create your resultY file at Worldpay : Login to Worldpay Login to Worldpay Click "Setup" then "Edit Payment Pages" Click “Setup” then “Edit Payment Pages” Choose your installation Choose your installation Then go to "file management" Then go to “file management” Now load your resultY.html Now load your resultY.html file. Use resultY.html in the name field. THE FILE NAME IS EXTREMELY IMPORTANT. If you see any warning messages you can ignore them. Don’t forget to “Copy to Production”

BulletProof Security

↑ Back to top
If you have BulletProof Security installed and you experience issues with your customers not being returned to your site please review the information in this link http://forum.ait-pro.com/forums/topic/403-woocommerce-worldpay-gateway/

Sorry, there was a problem processing your payment

↑ Back to top
If you see this error then you should contact Worldpay and give them the reference number indicated in the screen shot – it will begin with an “a” or a “b” worldpay-image-nine

Dynamic Callback Option

↑ Back to top

DO NOT use the Dynamic Callback option unless you use the same Installation ID on multiple sites. It is a less reliable option and will not allow you to process refunds in your WooCommerce admin or use Subscriptions.

Worldpay decommissioning URLs

↑ Back to top
The plugin does not use any of the URL’s that are being decomissioned, there is no need to update or make any changes. You can read more about the decomissioning here

Feedback and feature requests

↑ Back to top
For feedback on the Worldpay gateway, this documentation or for feature requests please email support@chromeorange.co.uk

Questions & Support

↑ Back to top
Have a question before you buy? Please fill out this pre-sales form. Already purchased and need some assistance? Get in touch the developer via the Help Desk.