MIF_E31210536/resources/views/Users/pembayaran.blade.php

28 lines
977 B
PHP

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- @TODO: replace SET_YOUR_CLIENT_KEY_HERE with your client key -->
<script type="text/javascript"
src="https://app.stg.midtrans.com/snap/snap.js"
data-client-key="SB-Mid-client-BP1sfRhwhTy0mI3h"></script>
<!-- Note: replace with src="https://app.midtrans.com/snap/snap.js" for Production environment -->
</head>
<body>
<button id="pay-button">Pay!</button>
<button id="pay-button">Pay!</button>
<script type="text/javascript">
// For example trigger on button clicked, or any time you need
var payButton = document.getElementById('pay-button');
payButton.addEventListener('click', function () {
// Trigger snap popup. @TODO: Replace TRANSACTION_TOKEN_HERE with your transaction token
window.snap.pay('{{$snap_token}}');
// customer will be redirected after completing payment pop-up
});
</script>
</body>
</html>