PAP has a standard signup form here, but it allows you to make your own signup form in HTML and place it anywhere you want.
Back to Samples & tests home<form action="https://www.afilead.com/afiliacion/merchants/signup.php" method="post"> <fieldset> <legend>Personal Info</legend> <table> <tr><td width="150px"><strong>Account name</strong></td><td><input type="text" name="name"></td></tr> <tr><td><strong>First name</strong></td><td><input type="text" name="firstname"></td></tr> <tr><td><strong>Last name</strong></td><td><input type="text" name="lastname"></td></tr> <tr><td><strong>Username (Email)</strong></td><td><input type="text" name="email"></td></tr> </table> </fieldset> <fieldset> <legend>Additional info</legend> <table> <tr><td width="150px"><strong>Country</strong></td><td><input type="text" name="data1"></td></tr> <tr><td><strong>Bill street</strong></td><td><input type="text" name="data2"></td></tr> <tr><td><strong>Bill city</strong></td><td><input type="text" name="data3"></td></tr> <tr><td><strong>ZIP</strong></td><td><input type="text" name="data4"></td></tr> <tr><td><strong>Company ID</strong></td><td><input type="text" name="data5"></td></tr> <tr><td><strong>VAT ID</strong></td><td><input type="text" name="data6"></td></tr> <tr><td><strong>TIN</strong></td><td><input type="text" name="data7"></td></tr> </table> </fieldset> <fieldset style="text-align: center"> <legend>Terms & conditions</legend> <textarea cols="50" rows="5">You can write your own terms & conditions here</textarea> <br/> I confirm that I agree with terms & conditions <input type="checkbox" name="agreeWithTerms" value="Y"> <br/><br/> <?php if(array_key_exists('cumulativeErrorMessage', $_POST) && $_POST['cumulativeErrorMessage'] != '') { ?> <fieldset style="color: #ff0000;"> <legend>There were errors</legend> <?php echo htmlspecialchars($_POST['cumulativeErrorMessage'])?> </fieldset> <?php } ?> <br/> <input type="submit" value="Signup"> <input type="hidden" name="errorUrl" value="https://www.afilead.com/afiliacion/html_account_signup_form.php"> <input type="hidden" name="successUrl" value="https://www.afilead.com/afiliacion/after_account_signup.php"> </form>
The HTML signup form must be sent to /affiliates/signup.php after signup. Then there are two modes of operations. If you don't include the errorUrl,successUrl hidden fields, the form will be processed by standard signup form.
If there are some errors, they will be displayed in the standard signup form. If you want to be sent back to the HTML signup form in case of error, you have to add hidden field errorUrl to the form and this file have to be PHP! Then the error messages and all values will be sent back by POST method to the URL you specified in errorUrl hidden field.
Possible HTML form parameters (as hidden fields) | ||
errorUrl | URL where the data should be sent in case of error. It should be URL address of the HTML signup form | |
successUrl | URL where the data should be sent when signup is successful. It will override any setting from merchant panel. It can be "thank you for signup" page. |
Data returned to successUrl or errorUrl | ||
cumulativeErrorMessage | all (optional) error messages grouped together in on string | |
successMessage | success message | |
list of fields |
list of signup form fields returned with the value sent and (optional) error message.
Example: username - contains value entered by user usernameError - contains error message for this field firstname - contains value entered by user firstnameError - contains error message for this field |