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 paytring
Install Django Rest Framework:
pip install djangorestframework
Install 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
Hashes for django_paytring-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cefe97078efa8fb3c98d141cf2c6874bf78622b457434d4b5b8e810e7f9fdb39 |
|
MD5 | 1e5947efbf5d3b887612b5ebb03c9b66 |
|
BLAKE2b-256 | 2b077541d6efaf9fd959c82d8d09ed871e12c14e86ce37b25851d783788ab824 |