Generating a payment form
<form method="POST" action="https://paiement.systempay.fr/vads-payment/"> <input type="hidden" name="parameter1" value="value1" /> <input type="hidden" name="parameter2" value="value2" /> <input type="hidden" name="parameter3" value="value3" /> <input type="hidden" name="signature" value="signature"/> <input type="submit" name="pay" value="Pay"/> </form>
It contains:
- The following technical elements:
- The <form> and </form> tags that allow to create an HTML form.
- The method="POST" attribute that defines the method used for sending data.
- The action="https://paiement.systempay.fr/vads-payment/" attribute that defines where to send the form data.
- Form data:
- The shop ID.
- Information about the payment depending on the use case.
- Additional information depending on your needs.
- The signature that ensures the integrity of the form.
This data is added to the form by using the <input> tag:
<input type="hidden" name="parameter1" value="value1" />
For setting the name and value attributes, see the Data dictionary chapter also available in the online document archive.
All the data in the form must be encoded in UTF-8.
This will allow for the special characters (accents, punctuation marks, etc.) to be correctly interpreted by the payment gateway. Otherwise, the signature will be computed incorrectly and the form will be rejected.
- The Pay button for submitting the data:
<input type="submit" name="pay" value="Pay"/>
Different use cases are presented in the chapters below. They will allow you to adapt your payment form to your needs.
The following table lists the different formats that you can encounter when building your form.
Notation | Description |
---|---|
a | Alphabetic characters (from ‘A’ to ‘Z’ and from ‘a’ to ‘z’) |
n | Numeric characters |
s | Special characters |
an | Alphanumeric characters |
ans | Alphanumeric and special characters (except ‘<’ and ‘>’) |
3 | Fixed length of 3 characters |
..12 | Variable length up to 12 characters |
json | JavaScript Object Notation. Object containing key/value pairs separated by commas. It starts with a left brace “{” and ends with a right brace “}”. Each key / value pair contains the name of the key between double-quotes followed by " :”, followed by a value. The name of the key must be alphanumeric. The value can be:
Example: {"name1":45,"name2":"value2", "name3":false}
|
bool | Boolean. Can be populated with the true or false value. |
enum | Defines a field with a complete list of values. The list of possible values is given in the field definition. |
Enum list | List of values separated by a “ ;”. The list of possible values is given in the field definition. Example: vads_available_languages=fr;en |
map | List of key / value pairs separated by a " ;". Each key / value pair contains the name of the key followed by " =", followed by a value. The value can be:
The list of possible values for each key/value pair is provided in the field definition. Example: vads_theme_config=SIMPLIFIED_DISPLAY=true;RESPONSIVE_MODEL=Model_1 |