Skip to main content
Skip table of contents

Considerations for Safari browser

The Safari browser, for MacOS and iOS operating systems, by default does not allow writing cookies for an unvisited website. In order for Safari to register the gateway as visited, it includes the functionality to open a pop-up window with the URL of the gateway before opening the modal gateway, so Safari will write the necessary cookies for the gateway.

The opening of the pop-up window is performed from the method: AlignetVPOS2.openModal().

When the method is invoked from the script, Safari blocks the opening of pop-up windows so that when the gateway loads it cannot register the cookies that correspond to the gateway.

As a result, the gateway will not open and payment will not be possible.

Scripts are invocations made from a setTimeout, onload or after an Ajax request.

Two possible solutions to the problem are proposed:

Solution A

Remove any of these conditions from the script in the gateway invocation and perform it directly from an onclick, or an href, for example:

JS
<a href="javascript: AlignetVPOS2.openModal()"…
<button onclick="javascript: AlignetVPOS2.openModal()"…

Solution B

Include in the button that the user clicks the opening of the pop-up window with the URL of the gateway.

Example script:

JS
if(AlignetVPOS2.isSafari()){
var urlBase='https://vpayment.verifika.com';
var context='VPOS2';
var win=window.open(urlBase+context+'/faces/pages/safariEntry.xhtml','_blank ','height=100px,width=100px,top=9999px,left=9999px');
setTimeout(function(){
win.close();
//Logic following the payment button to invoke the gateway
},2000);
}

Continue to Request and Response Parameters ➡️

JavaScript errors detected

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

If this problem persists, please contact our support.