PluginProbe
seQura / 3.0.6
seQura v3.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 / front / receipt_page.php

receipt_page.php in seQura 3.0.6, at templates/front/receipt_page.php

66 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Receipt page for seQura payment gateway.
4 *
5 * @package SeQura/WC
6 * @var array<string, string> $args The arguments. Must contain:
7 * - string 'form' The identification form HTML code.
8 */
9
10 defined( 'WPINC' ) || die;
11
12 if ( empty( $args['form'] ) ) {
13 return;
14 }
15
16 ?>
17
18 <p>
19 <?php
20 echo wp_kses_post( __( 'Thank you for your order. Please fill the required data to pay with seQura...', 'sequra' ) );
21 ?>
22 </p>
23
24 <?php
25
26 echo wp_kses(
27 $args['form'],
28 array(
29 'iframe' => array(
30 'id' => array(),
31 'name' => array(),
32 'class' => array(),
33 'src' => array(),
34 'frameborder' => array(),
35 'style' => array(),
36 'type' => array(),
37 ),
38 'script' => array(
39 'type' => array(),
40 'src' => array(),
41 ),
42 ),
43 array( 'https' )
44 );
45
46 ?>
47
48 <script type="text/javascript">
49 (function(){
50 const tryToShowForm = () => {
51 try {
52 window.SequraFormInstance.setCloseCallback(function () {
53 document.location.href = '<?php echo esc_js( wc_get_checkout_url() ); ?>';
54 });
55 window.SequraFormInstance.show();
56 const iframe = document.querySelector('.sq-identification-iframe');
57 document.body.append(iframe);
58 // jQuery('.sq-identification-iframe').appendTo('body');
59 } catch (e) {
60 setTimeout(tryToShowForm, 100);
61 }
62 };
63 document.addEventListener("DOMContentLoaded", tryToShowForm);
64
65 })();
66 </script>