-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathapp.html
More file actions
56 lines (54 loc) · 2.02 KB
/
app.html
File metadata and controls
56 lines (54 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Payment.aspx.cs" Inherits="RazorpaySampleApp.Payment" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Razorpay .Net Sample App</title>
</head>
<body>
<form action="Charge.aspx" id="razorpayForm" method="post">
<input type="hidden" id="razorpay_payment_id" />
<input type="hidden" id="razorpay_signature" />
</form>
<button id="rzp-button1">Pay with Razorpay</button>
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<script>
var options = {
"name": "DJ Tiesto",
"description": "Tron Legacy",
"order_id": "<%=orderId%>",
"image": "https://s29.postimg.org/r6dj1g85z/daft_punk.jpg",
"prefill": {
"name": "Daft Punk",
"email": "customer@merchant.com",
"contact": "9999999999",
},
"notes": {
"address": "Hello World",
"merchant_order_id": "12312321",
},
"theme": {
"color": "#F37254"
},
handler: resp => alert(resp.razorpay_payment_id),
}
// Boolean whether to show image inside a white frame. (default: true)
options.theme.image_padding = false;
options.modal = {
ondismiss: function () {
console.log("This code runs when the popup is closed");
},
// Boolean indicating whether pressing escape key
// should close the checkout form. (default: true)
escape: true,
// Boolean indicating whether clicking translucent blank
// space outside checkout form should close the form. (default: false)
backdropclose: false
};
var rzp = new Razorpay(options);
document.getElementById('rzp-button1').onclick = function (e) {
rzp.open();
e.preventDefault();
}
</script>
</body>
</html>