Creating a shopper response

To create a shopper response you will need to change your payment response server-side script so that it produces a valid HTML output. If you wish to display a different shopper response for a payment that has been authorised or cancelled, then you will need to check the transStatus returned in the Payment Message, and create a valid HTML output (including the banner WPDISPLAY ITEM tag) for each of the statuses.

If your system requires a full redirect to your own Webpage, you can include a META refresh (with a short delay) in the output of your payment response script (shopper response).

Including the banner WPDISPLAY ITEM tag

The shopper response must include the WPDISPLAY ITEM tag: <WPDISPLAY ITEM=banner>. After a shopper response is retrieved from your server, the <WPDISPLAY ITEM=banner> is used to present the mandatory transaction information to the shopper. Alternatively, you must present the Transaction ID and result of the transaction on any page that you are redirecting your customers to.

Displaying images

The HTML output generated by your payment response server-side script will be presented to the shoppers' browser as if it had come from us. As such, any images that you wish to display will need to be uploaded to your installation folder, and referred to within the HTML output generated as follows, where xxxxx is your installation ID:

<img src="/i/xxxxx/imagename.gif">

You could also replace the installation ID with the WPDISPLAY item tag: <wpdisplay item=instId> as we will replace this with the correct installation ID before the response is displayed to the shopper.

<img src="/i/<wpdisplay item=instId>/imagename.gif">

This is helpful if you are running the same shopper response across a number of different installations.

Including your own resources files and variables

You may wish to include your own resource file to the shopper response, i.e. Cascading Style Sheet files (.css). We recommend that you upload these files to your installation folder and reference them in the HTML output as follows:

<link rel="stylesheet" href="/i/<wpdisplay item=instId>/stylesheetname.css" type="text/css" />

To reference or link to any resource outside of your installations folder, the link included in the HTML output must be absolute, in other words the full URL must be used.

If any resources used in the HTML output are fetched from an http:// address the shopper may see a warning message from their browser that states that there is a mixture of secure and insecure items is being used on the page. This warning message may be of concern to shoppers who have just entered their payment details on our payment service. Therefore, we recommend that you try to avoid referencing resources outside of your installation folder or that you reference the resource files from a secure server that has an https:// address.

To include additional payment parameters in the Shopper Response, you will need to add your own variables to the purchase token with either the C_ or MC_ prefix. Variables prefixed with M_ are not available for use in the shopper response. For more information refer to: Adding your own variables.

To ensure that the character encoding used in your Shopper Response is displayed correctly by the shopper's browser, you should include an appropriate Meta tag in the head of your HTML output.