Generating a payment form
<form method="POST" action="https://secure.payzen.eu/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>
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://secure.payzen.eu/vads-payment/" attribute that defines where to send the form data.
- Shop ID.
- information about the payment depending on the use case (see the chapters below).
- Additional information, depending on your requirements (see chapter Using additional functions).
- Signature that certifies the integrity of the form (see chapter Computing the signature).
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 chapter Data dictionary.
All the data in the form must be encoded in UTF-8.
Special characters (accents, punctuation marks, etc.) will then be correctly interpreted by the payment gateway. Otherwise, the signature will not be computed correctly and the form will be rejected.
The Pay button that will allow to send 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.
- Creating an immediate payment,
- Creating a deferred payment,
- Creating an installment payment,
- Creating an authorization without capture