You can specify fields to be required on your Payment Pages. If the customer fails to provide information in all the required fields or enters invalid information, the payment will not continue and the field in question will be highlighted on-screen. This allows the customer to make corrections and try again.
By default, the customer is required to enter their payment details (card number, expiry date, security code) on the Payment Pages. This section of the document explains how to specify additional fields to be required.
If you are integrating with PayPal, you must use the MyST Rule Manager to specify required fields, as described below.
Customising the POST (for card payments only)
You can modify your POST to Payment Pages to specify required fields for the customer. This is demonstrated in the following HTML example. In addition to their payment details, the customer will be required to enter fields designated as strequiredfields on your Payment Pages.
<form method="POST" action="<DOMAIN>/process/payments/choice">
<input type="hidden" name="strequiredfields" value="billingpostcode">
<input type="hidden" name="strequiredfields" value="billingfirstname">
<input type="hidden" name="strequiredfields" value="billinglastname">
<input type="submit" value="Pay">
<DOMAIN> with a supported domain. Click here for a full list.
The fields that you specify as required in the POST need to be included in the string used to generate your request site security hash. Failure to do so will result in the customer being shown an “Invalid details” error message.
Using the MyST Rule manager
You can create custom rules in the MyST Rule Manager that specify fields as required under certain conditions. For example, you can specify fields to be only required when paying by card, as to not affect payment types that redirect the customer to PayPal to enter their payment details.