Skip to content

Commit 34aabd7

Browse files
committed
fix: transactionid and status fix
1 parent 4c2a210 commit 34aabd7

File tree

2 files changed

+108
-2
lines changed

2 files changed

+108
-2
lines changed

backend/fees/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ def billdesk_order_callback(request):
231231

232232

233233
context = {
234-
"TransactionID " : decoded_response.get('transactionid', ''),
234+
"TransactionID" : decoded_response.get('transactionid', ''),
235235
"OrderID" : decoded_response.get('orderid', ''),
236-
"TransactionStatus" : decoded_response.get('transaction_error_type', '').upper(),
236+
"TransactionStatus" : decoded_response.get('transaction_error_type', ''),
237237
"TransactionTime" : decoded_response.get('transaction_date', ''),
238238
"TransactionAmount" : decoded_response.get('amount', ''),
239239
"PaymentMethod" : decoded_response.get('payment_method_type', '')

backend/templates/fees/bill.html

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<!-- bill_template.html -->
2+
<!DOCTYPE html>
3+
<html lang="en">
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>Invoice</title>
9+
10+
<style>
11+
body {
12+
font-family: 'Helvetica', Arial, sans-serif;
13+
margin: 20px;
14+
background-color: #f9f9f9;
15+
color: #333;
16+
}
17+
18+
h1 {
19+
color: #1a1a1a;
20+
text-align: center;
21+
border-bottom: 2px solid #ccc;
22+
padding-bottom: 10px;
23+
margin-bottom: 20px;
24+
}
25+
26+
.bill-details {
27+
border: 1px solid #ddd;
28+
padding: 20px;
29+
margin-top: 20px;
30+
background-color: #fff;
31+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
32+
}
33+
34+
p {
35+
margin-bottom: 15px;
36+
}
37+
38+
strong {
39+
font-weight: bold;
40+
}
41+
42+
.transaction-status {
43+
display: inline-block;
44+
padding: 8px 12px;
45+
border-radius: 5px;
46+
text-transform: uppercase;
47+
font-weight: bold;
48+
color: #fff;
49+
}
50+
51+
.transaction-status.pending {
52+
background-color: #f39c12; /* Orange for pending */
53+
}
54+
55+
.transaction-status.success {
56+
background-color: #2ecc71; /* Green for success */
57+
}
58+
59+
.transaction-status.failed {
60+
background-color: #e74c3c; /* Red for failed */
61+
}
62+
63+
.print-button {
64+
margin-top: 20px;
65+
text-align: center;
66+
}
67+
68+
button {
69+
background-color: #3498db;
70+
color: #fff;
71+
padding: 10px 20px;
72+
border: none;
73+
border-radius: 5px;
74+
font-size: 16px;
75+
cursor: pointer;
76+
}
77+
78+
button:hover {
79+
background-color: #2980b9;
80+
}
81+
82+
/* Add more styles as needed */
83+
</style>
84+
</head>
85+
<body>
86+
<h1>Invoice</h1>
87+
<div class="bill-details">
88+
<p><strong>Order ID:</strong> {{ OrderID }}</p>
89+
<p><strong>Transaction ID:</strong> {{ TransactionID }}</p>
90+
<p><strong>Payment Method:</strong> {{ PaymentMethod }}</p>
91+
<p><strong>Transaction Status:</strong> <span>{{ TransactionStatus }}</span></p>
92+
<p><strong>Transaction Time:</strong> {{ TransactionTime }}</p>
93+
<p><strong>Transaction Amount:</strong> {{ TransactionAmount }}</p>
94+
</div>
95+
96+
<div class="print-button">
97+
<button onclick="printBill()">Print Invoice</button>
98+
</div>
99+
100+
<script>
101+
function printBill() {
102+
window.print();
103+
}
104+
</script>
105+
</body>
106+
</html>

0 commit comments

Comments
 (0)