Skip to main content
Skip table of contents

Considerations and recommendations

The SHA-2 key, downloaded in the Step of Generate Merchant Keys is required for sending the information.

The form of integration between the Merchant and V-POS2 is through JavaScript, where JavaScript creates the function to invoke the modal design for V-POS2.

JS
//Invoke the JavaScript in the header
<head>
<script type="text/javascript" src="https://integracion.alignetsac.com/VPOS2/js/modalcomercio.js" ></script> 
</head>

The merchant must add a "class" tag in its submission form to identify the submission parameters. Class=” alignet-form-vpos2”

JS
//Define the Class tag in the Form
<form name="f1" id="f1" action="#" method="post" class="alignet-form-vpos2">

The merchant in the payment button should call a JavaScript function called "AlignetVPOS2.openModal(Environment URL address)".

Environment

Example

Integration

JS
<a href="javascript:AlignetVPOS2.openModal('https://integracion.alignetsac.com/',’ [DesignType]’)"> Comprar</a>
JS
<input type="button" onclick="javascript:AlignetVPOS2.openModal('https://integracion.alignetsac.com/',’ [DesignType]’)" value="Comprar">

Production

JS
<a href="javascript:AlignetVPOS2.openModal(‘’,’[DesignType]’)">Comprar</a>
JS
<input type="button" onclick="javascript:AlignetVPOS2.openModal(‘’,’[DesignType]’)" value="Comprar">

For the production environment it is not necessary to indicate in the JavaScript function the domain. In addition, you will have the option to select the type of design to use. You must enter the design code (1, 2, or 3) in the openModal function, in the "[DesignType]" section. You can find the detail of the available designs in the Payment Modal Customization.

Continue to Considerations for Safari browser ➡️

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.