<?php
/**
 * @package     CMGiftCard
 * @subpackage  plg_cmgiftcard_paypal
 * @copyright   Copyright (C) 2016-2024 CMExension
 * @license     GNU General Public License version 2 or later
 */

defined('_JEXEC') or die();

use Joomla\CMS\Factory;
?>
<form id="checkOutForm" name="checkOutForm" action="<?php echo $url; ?>" method="post">
	<?php foreach ($formData as $key => $value) : ?>
	<input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>" />
	<?php endforeach; ?>
</form>
<p><?php echo $checkoutMessage; ?></p>
<script type="text/javascript">
	function submitForm()
	{
		document.checkOutForm.submit();
	}
	setTimeout("submitForm()", <?php echo $secondsToWait * 1000; ?>);
</script>
<?php
// Empty the cart
Factory::getSession()->clear('cart', 'CMGiftCard');
?>
