Skip to main content
If you are already using HOA with Subscribe and want to implement Hosted Fields (and satisfy the minimum audit burden of SAQ-A (Self-Assessment Questionnaire—version A) requirements when accepting payment information from your customers), begin here and continue through Allowed Styles. When your customer’s web browser loads your checkout page, some or all of the input boxes in the checkout form become iframes. These iframes load their HTML and JavaScript from Vindicia.com. Note: When using HOA with Hosted Fields, the vindicia.js JavaScript library uses its own namespace, rather than the global namespace. This section describes how to modify your current HOA checkout page to incorporate Hosted Fields. The focus in these sections is on Step 3.
  1. Change Tags to <div> Tags in your form. For sensitive data, such as the credit card number, expiration date and CVN number, use a div tag instead of an input field in your form. For example, change the following:
    to this:
  2. Include vindicia.js on your checkout page.
    There is no JQuery or other JavaScript framework requirement, but Vindicia recommends that you include vindicia.js after you include the framework file.This will instantiate an object called vindicia.
  3. Call vindicia.setup() with options. Call the vindicia.setup() method to initialize the Hosted Fields on your checkout form. Thevindicia.setup()call will take over the submit event in your form. To do validation you must pass in some options to the setup() method.
These three steps will cause a redirect to a Success or Error page after form submission. If you want full Ajax control over this form, see the section Using Hosted Fields with Ajax onSubmitCompleteEvent.

Example: Initializing Hosted Fields

This JavaScript example uses all the optional features of the vindicia.setup() method for HOA with browser redirect. It initializes the Hosted Fields on the checkout form. The Using Hosted Fields with Ajax onSubmitCompleteEvent provides a complete Ajax solution.
The function merchantValidate(theForm) is a custom function, to be written by you. Parent topic:Implementing HOA with Hosted Fields