 <script src="https://js.stripe.com/v3/"></script>


 <script>

 setTimeout(()=>{
	var stripe = Stripe('<?php echo pjSanitize::html(@$tpl['arr']['public_key']); ?>');
 stripe.redirectToCheckout({
			sessionId: '<?php echo @$tpl['session_id']; ?>'
		}).then(function (result) {
			// If `redirectToCheckout` fails due to a browser or network
			// error, display the localized error message to your customer
			// using `result.error.message`.
		});
 },3000)

</script>		
