Skip to main content

Paycomuz

Project description

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 = {
    "PAYCOM_ENV": False,  # test host
    "TOKEN": "token",  # token
    "SECRET_KEY": "password",  # password
    "ACCOUNTS": {
        "KEY_1": "order_id",
        "KEY_2": None  # or "type"
    }
}

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.methods_subscribe_api import Paycom
from django.urls import path

class CheckOrder(Paycom):
    def check_order(self, amount, account):
        return self.ORDER_FOUND

class TestView(MerchantAPIView):
    VALIDATE_CLASS = CheckOrder

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

create_transaction.py

from paycomuz.methods_subscribe_api import Paycom
paycom = Paycom()

# Create Card
amount = 5000.00
card = paycom.create_cards(card_number='8600 4954 7331 6478', expire='03/20', amount=amount, save=False)
print(card)
token = card['token']

# Create Transaction
result = paycom.create_transaction(token=token, order_id=1, amount=amount)
print(result)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PaycomUz, version 2.1
Filename, size File type Python version Upload date Hashes
Filename, size PaycomUz-2.1-py3-none-any.whl (10.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size PaycomUz-2.1.tar.gz (6.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page