-> Create a vitual environment.
== virtualenv -p python3.6 venv
-> Activate your virtual environment using this command
== source venv/bin/activate
-> Install required python libraries by using pip installer.
== pip install -r requirements.txt
-> Migrate database.
== python manage.py migrate
-> Finally, run your django runserver.
== python manage.py runserver
like:-
Request = {
"amount": "100",
“currency”: "USD",
"type": "creditcard",
"card": {
"number": "4111111111111111",
"expirationMonth": "2",
"expirationYear": "2020",
"cvv": "111"
}
}
Response = {
"amount": "100",
“currency”: “USD”,
“type”: “creditcard”
"card": {
"number": "4111111111111111"
}
“status”: “success”,
“authorization_code”: “SDSD23232333”
“time”: “2020-05-16 07:00:00”
}
Error Respinse = {
"amount": "100",
"currency": "100",
"type": "100",
"card": {
"number": "100"
},
"status": "error",
"error": "'expirationYear'was not present in the response",
"authorization_code": "Jaytlpzepdcw"
"time": "2020-10-02 19:00:16.744329",
}
like:-
Response = [
[
1,
{
"card": {
"number": "100"
},
"time": "2020-10-02 19:00:16.413080",
"type": "100",
"error": "'expirationYear'was not present in the response",
"amount": "100",
"status": "error",
"currency": "100",
"authorization_code": "Nkxw0lunfkq5"
}
],
[
2,
{
"card": {
"number": "100"
},
"time": "2020-10-02 19:00:16.744329",
"type": "100",
"error": "'expirationYear'was not present in the response",
"amount": "100",
"status": "error",
"currency": "100",
"authorization_code": "Jaytlpzepdcw"
}
],
[
3,
{
"card": {
"number": "100"
},
"time": "2020-10-02 19:01:51.073078",
"type": "100",
"amount": "100",
"status": "success",
"currency": "100",
"authorization_code": "E3boeq1gheut"
}
] ............................................
]