Skip to main content

alt text

Downloads alt text Downloads Downloads

Requirements

pip install django
pip install djangorestframework
pip install PaycomUz 
pip install requests

# supported versions
python 3.5 +
django 2 +
djangorestframework 3.7 +
PaycomUz 2 +

settings.py

PAYCOM_SETTINGS = {
    "KASSA_ID": "KASSA ID",  # token
    "SECRET_KEY": "TEST KEY OR PRODUCTIN KEY",  # password
    "ACCOUNTS": {
        "KEY": "order_id"
    },
}

INSTALLED_APPS = [
    'rest_framework',
    'paycomuz',
    ...
]
python manage.py migrate

Create paycom user

python manage.py create_paycom_user

view.py

from paycomuz.views import MerchantAPIView
from paycomuz import Paycom
from django.urls import path

class CheckOrder(Paycom):
    def check_order(self, amount, account, *args, **kwargs):
        return self.ORDER_FOUND
        
   def successfully_payment(self, account, transaction, *args, **kwargs):
        print(account)

   def cancel_payment(self, account, transaction, *args, **kwargs):
        print(account)
      

class TestView(MerchantAPIView):
    VALIDATE_CLASS = CheckOrder

urlpatterns = [
    path('paycom/', TestView.as_view())
]

create_initialization.py

https://help.paycom.uz/uz/initsializatsiya-platezhey/otpravka-cheka-po-metodu-get

from paycomuz import Paycom
paycom = Paycom()
url = paycom.create_initialization(amount=5.00, order_id='197', return_url='https://example.com/success/')
print(url)

alt text

Metadata

Release files for PaycomUz 3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PaycomUz 3.1
File Size Uploaded
PaycomUz-3.1.tar.gz 8.9 kB Details

Release files / PaycomUz-3.1.tar.gz

Download URL PaycomUz-3.1.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3a9c46e64e8906f2eea722acb79bb26153585a3e3ce0313c118c2e21e43ea41d
BLAKE2b-256 checksum
How to use checksums
97f903bc7e1fdf433969277bd1b64d62d8e038dd0601447d2dbb66a5faba80fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

3.1 This release

1 release file

3.0

2 release files

2.2

2 release files

2.1

2 release files

2.0

2 release files

1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page