# sequra/3.2.1/templates/front/receipt_page.php

seQura, version 3.2.1. 55 lines.

- Page: https://pluginprobe.com/plugins/sequra/3.2.1/code/templates/front/receipt_page.php
- Raw: https://pluginprobe.com/plugins/sequra/3.2.1/raw/templates/front/receipt_page.php
- Modified: 2025-02-11T16:24:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sequra/3.2.1/code/templates/front/receipt_page.php#L10-L20`.

```php
<?php
/**
 * Receipt page for seQura payment gateway.
 *
 * @package    SeQura/WC
 * @var array<string, string> $args The arguments. Must contain:
 *  - string 'form' The identification form HTML code.
 */

defined( 'WPINC' ) || die;

if ( empty( $args['form'] ) ) {
	return;
}

?>
<p><?php echo wp_kses_post( __( 'Thank you for your order. Please fill the required data to pay with seQura...', 'sequra' ) ); ?></p>
<?php
echo wp_kses(
	$args['form'],
	array(
		'iframe' => array(
			'id'          => array(),
			'name'        => array(),
			'class'       => array(),
			'src'         => array(),
			'frameborder' => array(),
			'style'       => array(),
			'type'        => array(),
		),
		'script' => array(
			'type' => array(),
			'src'  => array(),
		),
	),
	array( 'https' )
);
?>
<script type="text/javascript">
	(function(){
		const tryToShowForm = () => {
			try {
				window.SequraFormInstance.setCloseCallback(function () {
					document.location.href = '<?php echo esc_js( wc_get_checkout_url() ); ?>';
				});
				window.SequraFormInstance.show();
				const iframe = document.querySelector('.sq-identification-iframe');
				document.body.append(iframe);
			} catch (e) {
				setTimeout(tryToShowForm, 100);
			}
		};
		document.addEventListener("DOMContentLoaded", tryToShowForm);
	})();
</script>
```
