APP ID
Secret Key
Hatrick Magician Hat
Netbanking

Hatrick Magician Hat

₹100.00

Behold, the Hatrick Magician Hat, where reality and illusion collide in a flurry of furry frenzy! Crafted from the finest materials and woven with the threads of pure enchantment, this hat holds secrets that will leave you in awe. And what's that? It's not just any hat – it's a hat with a rabbit up its sleeve... well, actually, it's a rabbit inside the hat!

You will need a payment_session_id to try out this code. Search for yourPaymentSession and replace with yours.

1
<!DOCTYPE html>
2
<html lang="en">
3
	
4
	<head>
5
		<meta charset="UTF-8">
6
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
		<title>Document</title>
9
		<script src="https://sdk.cashfree.com/js/v3/cashfree.js"></script>
10
	</head>
11

12
	<body>
13
	<div id="hdfc"></div>
14
	<input type="button" id="payBtn" value="Pay" />
15
	<script>
16
		
17
		const cashfree = await load({ 
18
			mode: "sandbox", //or production
19
		});
20

21
		const nb = cashfree.create("netbanking", {
22
			values: {
23
				netbankingBankName: "hdfc",
24
				buttonText: "HDFC Bank",
25
				buttonIcon: true
26
			},
27
			style:{
28
				base: {
29
					fontWeight: 500,
30
					color: "#141414"
31
				}
32
			}
33
		});
34
		nb.mount("#hdfc");
35

36
		const showError = function(e){
37
			alert(e.message)
38
		}
39

40
		document.querySelector("#payBtn").addEventListener("click", async () => {
41
			cashfree.pay({
42
				paymentMethod: nb,
43
				paymentSessionId: "yourPaymentSession",
44
				returnUrl: "https://merchantsite.com/return?order_id={order_id}",
45
			}).then(function (data) {
46
				if (data != null && data.error) {
47
					return showError(data.error)
48
				}
49
			});
50
		})
51
		</script>
52
	</body>
53
</html>
54

The site is built using the Brutopia theme. Get it for free here