Skip to content

PayTechUz/django_paytechuz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PayTech UZ Django πŸ’³

Simple Django REST API for creating orders with Payme and Click payment integration.

πŸš€ Quick Start

  1. Install dependencies:
pip install -r requirements.txt
  1. Setup environment variables:
cp .env.example .env
# Edit .env with your payment gateway credentials
  1. Run migrations:
python manage.py migrate
  1. Start server:
python manage.py runserver

Visit: http://127.0.0.1:8000/

πŸ“‹ API Usage

Create Order

POST /api/orders/create

{
  "product_name": "Test Product",
  "amount": "100.00",
  "payment_type": "payme" // click, atmos
}

Response:

{
  "order_id": 1,
  "payment_url": "https://test.paycom.uz/...",
  "payment_type": "payme", // click, atmos
  "amount": "100.00",
  "status": "pending"
}

Payment Types:

  • payme - Payme payment gateway
  • click - Click payment gateway

πŸ§ͺ Test with cURL

curl -X POST http://127.0.0.1:8000/api/orders/create \
  -H "Content-Type: application/json" \
  -d '{
    "product_name": "Test Product",
    "amount": "100.00",
    "payment_type": "payme" // click, atmos
  }'

βš™οΈ Configuration

Create .env file with your payment gateway credentials:

# Payme Configuration
PAYME_ID=your_payme_id
PAYME_KEY=your_payme_key

# Click Configuration
CLICK_SERVICE_ID=your_service_id
CLICK_MERCHANT_ID=your_merchant_id
CLICK_MERCHANT_USER_ID=your_merchant_user_id
CLICK_SECRET_KEY=your_secret_key

# Atmos Configuration
ATMOS_CONSUMER_KEY=your_atmos_consumer_key
ATMOS_CONSUMER_SECRET=your_atmos_consumer_secret
ATMOS_STORE_ID=your_atmos_store_id
ATMOS_TERMINAL_ID=your_atmos_terminal_id # optional
ATMOS_API_KEY=your_atmos_api_key
ATMOS_TEST_MODE=True

✨ Features

  • πŸ’³ Payme payment gateway integration
  • πŸ”— Click payment gateway integration
  • πŸš€ Simple REST API
  • βœ… Order management
  • πŸ”’ Input validation & error handling

About

🟒 Supports Multi Payment Provider in single Package (Example Demo Prodject)!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published