File: /var/www/vhost/disk-apps/teamdemo.sports-crowd.com/resources/views/nuvei/webcheckout.blade.php
<!DOCTYPE html>
<html>
<head>
<title>Example | Payment Checkout Js</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
<script src="https://cdn.paymentez.com/ccapi/sdk/payment_checkout_3.0.0.min.js"></script>
</head>
<body>
<div id="response"></div>
<script>
let paymentCheckout = new PaymentCheckout.modal({
env_mode: {!!json_encode($envMode)!!},
onOpen: function () {
console.log("modal open");
},
onClose: function () {
console.log("modal closed");
href.location = '/close';
},
onResponse: function (response) { // The callback to invoke when the Checkout process is completed
const baseUrl = {!!json_encode($confirm_url)!!};
location.href = baseUrl + "&transaction_id=" + response.transaction.id;
}
});
$(function(){
paymentCheckout.open({
reference: {!!json_encode($nuveiReference)!!}
});
})
</script>
</body>
</html>