Example - fixed data contact details

If you pass the shopper's billing address details to us when you submit order details, we automatically place them into the billing address fields that the shopper would require to enter in the payment pages. However, the shopper can change these address details in the Payment page unless you specify that they are fixed data.

This example shows how to include both billing and delivery address details in the order details submission, for display in the Payment page, and how to specify that these details are fixed data so that shoppers cannot edit them.

In the order details submission:

  • set the value of the fixContact parameter to "true" - to ensure that the shopper cannot edit any address and delivery details,

  • set the value of the withDelivery parameter to "true" (or to any value other than "false")

    • to enable the display/use of delivery details,

    • include parameter values for displayed fields that the shopper cannot edit due to the use of fixContact="true".

These are:

billing details: address1, town, postcode and country parameters and optionally the name, tel, and email parameters

delivery address details: delvName, delvAddress1, delvTown, delvPostcode and delvCountry parameters.

To pass and display the following shopper and delivery address details:

  • shopper details: A.Shopper, 11 Shopper Street, Shopper City, Shopper Area, UK, Z11 ZZ1, Tel: 0123456789 email: a.shopper@email.com,

  • delivery address details: A.B.Shopper, 22 Shopper Road, Shopper Town, Shopper Location, UK, A11 AA1,

you need to include the following parameters in the order details submission:

Copied!
<!-- Setting fixContact=true fixes any contact and delivery details for the shopper,  
so that the shopper cannot edit the text in the Cardholder Details and Delivery  
Details sections of the Payment page. -->  
<input type=hidden name="fixContact" value="true">  
<input type=hidden name="name" value="A.Shopper">  
<input type=hidden name="address1" value="11 Shopper Street">  
<input type=hidden name="town" value="Shopper City">  
<input type=hidden name="region" value="Shopper Area">  
<input type=hidden name="postcode" value="Z11 ZZ1">  
<input type=hidden name="country" value="GB">  
<input type=hidden name="tel" value="0123456789">  
<input type=hidden name="email" value="a.shopper@email.com">  

<!-- Setting the parameter withDelivery=true ensures that the Delivery Details:  
delvName, delvAddress1, delvaddress2, delvAddress3, delvTown, delvRegion, delvPostcode and delvCountry, are displayed on the Payment Page.  
If fixContact is true, then the shopper cannot edit the delivery details that  
are displayed. -->  
<input type=hidden name="withDelivery" value="true">  
<input type=hidden name="delvName" value="A.B.Shopper">  
<input type=hidden name="delvAddress1" value="22 Shopper Road">  
<input type=hidden name="delvtown" value="Shopper Town">  
<input type=hidden name="delvregion" value="Shopper Location">  
<input type=hidden name="delvPostcode" value="A11 AA1">  
<input type=hidden name="delvCountry" value="GB">

Our payment service automatically uses these details to populate the display fields in the Payment Page.

If you pass the shopper's billing address details to us when you submit order details, we automatically place them into the billing address fields that the shopper would be required to enter in the payment pages. However, the shopper can change these address details in the Payment Page unless you specify that they are fixed data.

This example shows how to include shopper address details in the order details submission, for display in the Payment page, and how to specify that these details are fixed data so that shoppers cannot edit them.

In the order details submission:

  • set the value of the fixContact parameter to "true" - to ensure that the shopper cannot edit any address details,

  • include parameter values for displayed fields that the shopper cannot edit due to the use of fixContact="true". These are: shopper details: address1, PostalCode and countryCode parameters and, optionally, the telephoneNumber, and shopperEmailAddress parameters

To pass and display the following shopper address details:

shopper details: 11 Shopper Street, Shopper City, Shopper Area, UK, Z11 ZZ1, Tel: 0123456789 email: a.shopper@email.com,

you need to include the following parameters in the order details submission:

Copied!
<?xml version="1.0" encoding="UTF-8"?>  
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.wp3.worldpay.com/paymentService_v1.dtd">  
<paymentService version="1.4" merchantCode="DEMO">  
<submit>  
<order orderCode="jsxml277111437657" installationId="205838" fixContact="true">  
<description>test order</description>  
<amount value="100" currencyCode="GBP" exponent="2"/>  
<orderContent>  
<![CDATA[]]>  
</orderContent>  
<paymentMethodMask>  
<include code="ALL"/>  
</paymentMethodMask>  
<shopper>  
<shopperEmailAddress>a.shopper@email.com</shopperEmailAddress>  
</shopper>  
<shippingAddress>  
<address>  
<address1>11 Shopper Street</address1>  
<postalCode>Z11 ZZ1</postalCode>  
<city>Shopper City</city>  
<state>Shopper Area</state>  
<countryCode>GB</countryCode>  
<telephoneNumber>0123456789</telephoneNumber>  
</address>  
</shippingAddress>  
</order>  
</submit>  
</paymentService>

Our payment service automatically uses these details to populate the display fields in the Payment Page, where the shopper would otherwise have to enter these details, as shown below:

../resources/images/cg_populated_fixcontact_thumb_350_0.png