0% found this document useful (0 votes)
3 views7 pages

Project

The document outlines the steps to create a payment gateway using Django and Razorpay. It includes instructions for installing dependencies, creating a new project, setting up templates, views, and URLs, and running the project. Contact information for two branches of JSTC in Bhopal is also provided.

Uploaded by

0105al221002
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

Project

The document outlines the steps to create a payment gateway using Django and Razorpay. It includes instructions for installing dependencies, creating a new project, setting up templates, views, and URLs, and running the project. Contact information for two branches of JSTC in Bhopal is also provided.

Uploaded by

0105al221002
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JSTC(SOFTWARE TRAINING CENTRE)-POWERED BY SOFTBLOCK OPC PVT LTD

Step1). Install django and razorpay dependencies


pip install django
pip install razorpay
step 2).create new project and entered int it
django-admin startproject paymentgateway
cd paymentgateway
python [Link] startapp customer

Step 3). Register your app into a project [Link] file

BRANCH1: E-3/285,ARERA COLONY,10NUMBER MARKET,BHOPAL


BRANCH 2:SECTOR-C,56,NEAR LENSKART,INDRAPURI,BHOPAL CONTACT:9589016060,9584636781
JSTC(SOFTWARE TRAINING CENTRE)-POWERED BY SOFTBLOCK OPC PVT LTD

Step 4). Working on templates:

BRANCH1: E-3/285,ARERA COLONY,10NUMBER MARKET,BHOPAL


BRANCH 2:SECTOR-C,56,NEAR LENSKART,INDRAPURI,BHOPAL CONTACT:9589016060,9584636781
JSTC(SOFTWARE TRAINING CENTRE)-POWERED BY SOFTBLOCK OPC PVT LTD

Step 5). Create HTML page [Link] and [Link]


[Link]
<!DOCTYPE html>
<html lang="en">
<head>
<title>Title</title>
</head>
<body>
<form action="{%url 'order' %}" method="post">
{%csrf_token%}
Enter Amount:<input type="text" name="t1"/>
<input type="submit" value="create order">
</form>
</body>
</html>
[Link]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form action="[Link] method="POST">
<script
src="[Link]
data-key="<<Client-API>>"
data-amount={{amount}}
data-currency="INR"
data-order_id={{ordid}}
data-buttontext="Pay Fees"
data-name="JSTC"
data-description="JSTC(Software training centre) "
data-image="[Link]
[Link]="customername "

BRANCH1: E-3/285,ARERA COLONY,10NUMBER MARKET,BHOPAL


BRANCH 2:SECTOR-C,56,NEAR LENSKART,INDRAPURI,BHOPAL CONTACT:9589016060,9584636781
JSTC(SOFTWARE TRAINING CENTRE)-POWERED BY SOFTBLOCK OPC PVT LTD

[Link]="customeremail@[Link]"
[Link]="#F37254"
></script>
<input type="hidden" custom="Hidden Element" name="hidden"/>
</form>
</body>
</html>
Step 6).Working on View:

[Link]
from [Link] import render
import razorpay

def lp(request):
return render(request,"[Link]")

def createOrder(request):
client = [Link](auth=("<API-Secret-Key> ", "<API-Secret-Value>"))

ord=[Link]({
"amount": int([Link]["t1"])*100,
"currency": "INR",
"receipt": "receipt#1",
"notes": {
"key1": "JSTC (Software training center)-10 number market-9589016060",
"key2": " JSTC (Software training center)-indrapuri-9589016060"

BRANCH1: E-3/285,ARERA COLONY,10NUMBER MARKET,BHOPAL


BRANCH 2:SECTOR-C,56,NEAR LENSKART,INDRAPURI,BHOPAL CONTACT:9589016060,9584636781
JSTC(SOFTWARE TRAINING CENTRE)-POWERED BY SOFTBLOCK OPC PVT LTD

}
})
print(ord)
return render(request,"[Link]",{'ordid':[Link]('id'),'amount':[Link]('amount')})
Step 7).Working on URLS:

customer/[Link]
from [Link] import path
from . import views
urlpatterns = [
path('',[Link]),
path('neworder',[Link],name="order")
]

BRANCH1: E-3/285,ARERA COLONY,10NUMBER MARKET,BHOPAL


BRANCH 2:SECTOR-C,56,NEAR LENSKART,INDRAPURI,BHOPAL CONTACT:9589016060,9584636781
JSTC(SOFTWARE TRAINING CENTRE)-POWERED BY SOFTBLOCK OPC PVT LTD

paymentgateway/[Link]

from [Link] import admin


from [Link] import path,include

urlpatterns = [
path('admin/', [Link]),
path('', include('[Link]')),
]

Step 8). Registered your templates folder into a project


(paymentgateway->[Link])

BRANCH1: E-3/285,ARERA COLONY,10NUMBER MARKET,BHOPAL


BRANCH 2:SECTOR-C,56,NEAR LENSKART,INDRAPURI,BHOPAL CONTACT:9589016060,9584636781
JSTC(SOFTWARE TRAINING CENTRE)-POWERED BY SOFTBLOCK OPC PVT LTD

TEMPLATES = [
{
'BACKEND': '[Link]',
'DIRS': [BASE_DIR/'templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'[Link].context_processors.debug',
'[Link].context_processors.request',
'[Link].context_processors.auth',
'[Link].context_processors.messages',
],
},
},
]

Step 9). Run the project


python [Link] runserver

BRANCH1: E-3/285,ARERA COLONY,10NUMBER MARKET,BHOPAL


BRANCH 2:SECTOR-C,56,NEAR LENSKART,INDRAPURI,BHOPAL CONTACT:9589016060,9584636781

You might also like