Generating a payment form
<form method="POST" action="https://scelliuspaiement.labanquepostale.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 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://scelliuspaiement.labanquepostale.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="parametre1" value="valeur1"/>
For setting the name and value attributes, see chapter Data dictionary.
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"/>
The use cases presented in the following chapters will enable you to build your payment form according to your needs.
Indications on the different possible formats 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 key name in quotation marks followed by a colon, followed by a value in quotation marks "name" : "value". The name of the key must be alphanumeric. The value can be:
Example: {"name1":45,"name2":"value2", "name3":false}
|
bool | Boolean. Can take the value true or false. |
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 |