簡體   English   中英

使用回調腳本(3D安全條)在移動設備上打開頁面

[英]Open page on mobile device with callback script (3D secure stripe)

我嘗試在響應式網站上安裝條紋支付。

在歐洲,我們必須在信用卡驗證后使用3D安全流程。 3D安全是一種防止欺詐的系統。 我們必須在外部頁面上加載此過程。

在桌面設備上,我們可以在iframe中打開。 但是對於移動設備,我們必須加載空白頁面。

因此,要啟動3D Secure,我必須使用回調加載此頁面。

一個主意 ?

  $(document).ready(function(){ // Verify if is mobile device var isMobile = window.matchMedia("only screen and (max-width: 760px)"); if (isMobile.matches) { // Mobile device => we open 3D secure process on blank page test_3DSECURE_page(); } else { // Desktop device => we open 3D secure process in iframe $.featherlight({ iframe: response.redirect.url, iframeWidth: '500', iframeHeight: '400', closeOnClick: false, closeOnEsc: false, closeIcon: '' }); } function test_3DSECURE_page() { var url="https://www.3dsecuretest.xxx"; window.open(url,'_blank'); } }); 

使用Java腳本打開新窗口通常被大多數瀏覽器視為彈出窗口。 我敢打賭,您正在使用的移動瀏覽器阻止了此彈出窗口。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM