A Django app helps to create/fetch an order, subscription-plan, subscription on Paytring.
Project description
Django Paytring Collections is a Django app designed to facilitate the creation and retrieval of orders, subscription plans, and subscriptions on Paytring.
Installation
Install the latest Paytring:
pip install paytringInstall Django Rest Framework:
pip install djangorestframeworkInstall Django Paytring plugin:
pip install django-paytring
Quick Start
Add “order” to your INSTALLED_APPS setting in your project’s settings.py file:
INSTALLED_APPS = [ ..., "order", ]Include the order URLconf in your project urls.py:
path('order/', include("order.urls")),Add the CALLBACK_URL variable to your settings.py file:
CALLBACK_URL = "www.xyz.com"Set up Environment Variables in your settings.py file:
import os os.environ['key'] = "your_key" os.environ['secret'] = "your_secret"Start the development server.
Use “order/create-order” (POST) to create an order on Paytring. Include the following JSON in the request:
{ "payment_info": { "amount": "100", "currency": "INR" }, "customer_info": { "cname": "test", "email": "abc@gmail.com", "phone": "9999999999" }, "billing_info": { "firstname": "John", "lastname": "Doe", "phone": "09999999999", "line1": "Address Line 1", "line2": "Address Line 2", "city": "Gurugram", "state": "Haryana", "country": "India", "zipcode": "122001" }, "shipping_info": { "firstname": "John", "lastname": "Doe", "phone": "09999999999", "line1": "Address Line 1", "line2": "Address Line 2", "city": "Gurugram", "state": "Haryana", "country": "India", "zipcode": "122001" }, "notes": { "udf1": "udf1", "udf2": "udf2", "udf3": "udf3" } }Use “order/create-order/{paytring-order-id}” to retrieve order details.
Use “order/subscription-plan” (POST) to create a subscription plan on Paytring. Include the following JSON in the request:
{ "payment_info": { "amount": "100", "currency": "INR" }, "plan_info": { "title": "Daily 1 rupee plan", "description": "test plan", "frequency": "1", "cycle": "12" }, "notes": { "udf1": "udf1", "udf2": "udf2", "udf3": "udf3" } }Use “order/subscription-plan/{paytring-plan-id}” to retrieve subscription plan details.
Use “order/subscription” (POST) to create a subscription on Paytring. Include the following JSON in the request:
{ "payment_info": { "amount": "100", "currency": "INR" }, "plan_id": "123xxxxxxxxxxxxxxx", "customer_info": { "cname": "test", "email": "abc@gmail.com", "phone": "9999999999" }, "billing_info": { "firstname": "John", "lastname": "Doe", "phone": "09999999999", "line1": "Address Line 1", "line2": "Address Line 2", "city": "Gurugram", "state": "Haryana", "country": "India", "zipcode": "122001" }, "shipping_info": { "firstname": "John", "lastname": "Doe", "phone": "09999999999", "line1": "Address Line 1", "line2": "Address Line 2", "city": "Gurugram", "state": "Haryana", "country": "India", "zipcode": "122001" }, "notes": { "udf1": "udf1", "udf2": "udf2", "udf3": "udf3" } }Use “order/subscription/{paytring-subscription-id}” to retrieve subscription details.
Note: You will receive order, plan, and subscription IDs in the response after creating them on Paytring.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-paytring-1.0.0.tar.gz.
File metadata
- Download URL: django-paytring-1.0.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03c8d8903d6c649048ac16f6679ac0d3b7fbf488cde7759ca87d4e91fb12c3b2
|
|
| MD5 |
67e2acdfd7f4ab8a288da5ebea9162ce
|
|
| BLAKE2b-256 |
8db15ea8d873a7a42bee2a547cf2d9cc7867e70be0b16936614c1dac40ddac48
|
File details
Details for the file django_paytring-1.0.0-py3-none-any.whl.
File metadata
- Download URL: django_paytring-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cefe97078efa8fb3c98d141cf2c6874bf78622b457434d4b5b8e810e7f9fdb39
|
|
| MD5 |
1e5947efbf5d3b887612b5ebb03c9b66
|
|
| BLAKE2b-256 |
2b077541d6efaf9fd959c82d8d09ed871e12c14e86ce37b25851d783788ab824
|