Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 51 additions & 19 deletions templates/app.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,56 @@
<html>
<head lang="en">
<meta charset="utf-8">
<%@ 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" method="POST">
<script
src="https://checkout.razorpay.com/v1/checkout.js"
data-key="rzp_test_WyK93y9mvps7SN"
data-amount="5100"
data-name="Daft Punk"
data-description="Purchase Description"
data-image="vk.jpg"
data-netbanking="true"
data-description="Tron Legacy"
data-prefill.name="Harshil Mathur"
data-prefill.email="[email protected]"
data-prefill.contact="9999999999"
data-notes.shopping_order_id="21">
</script>
<input type="hidden" name="shopping_order_id" value="21">
<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": "[email protected]",
"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>