PluginProbe
seQura / 2.0.6
seQura v2.0.6
4.3.4 4.3.3 4.3.2 4.3.1 trunk 2.0.0 2.0.10 2.0.11 2.0.12 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 3.0.0 3.0.2 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 4.0.0 All 30 releases
sequra / templates / payment-identification.php

payment-identification.php in seQura 2.0.6, at templates/payment-identification.php

55 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Identification page template.
4 *
5 * @package woocommerce-sequra
6 */
7
8 // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
9 if ( $identity_form ) {
10 add_filter( 'safe_style_css', 'SequraHelper::allow_css_attributes' );
11 echo wp_kses(
12 $identity_form,
13 array(
14 'iframe' => array(
15 'id' => array(),
16 'name' => array(),
17 'class' => array(),
18 'src' => array(),
19 'frameborder' => array(),
20 'style' => array(),
21 'type' => array(),
22 ),
23 'script' => array(
24 'type' => array(),
25 'src' => array(),
26 ),
27 ),
28 array( 'https' )
29 );
30 remove_filter( 'safe_style_css', 'SequraHelper::allow_css_attributes' );
31 ?>
32 <script type="text/javascript">
33 function tryToOpenPumbaa() {
34 try {
35 window.SequraFormInstance.setCloseCallback(function () {
36 document.location.href = '<?php echo esc_js( wc_get_checkout_url() ); ?>';
37 });
38 window.SequraFormInstance.show();
39 jQuery('.sq-identification-iframe').appendTo('body');
40 } catch (e) {
41 setTimeout(tryToOpenPumbaa, 500);
42 }
43 }
44
45 document.addEventListener("DOMContentLoaded", function () {
46 tryToOpenPumbaa();
47 });
48 </script>
49 <?php } else { ?>
50 <script type="text/javascript">
51 alert("<?php echo esc_js( __( 'Sorry, something went wrong.\n Please contact the merchant.', 'sequra' ) ); ?>");
52 document.location.href = '<?php echo esc_js( wc_get_checkout_url() ); ?>';
53 </script>
54 <?php } ?>
55