Coder Social home page Coder Social logo

maxthen / click Goto Github PK

View Code? Open in Web Editor NEW

This project forked from click-llc/click-integration-django

0.0 0.0 0.0 12 KB

This module allows you to integrate payment acceptance using "CLICK" payment system into Python Django web applications. Click-API module is integrated to "django-payments" module as payment provider.

Home Page: https://docs.click.uz

Python 100.00%

click's Introduction

This module allows you to integrate payment acceptance using "CLICK" payment system into Python Django web applications. Click-API module is integrated to django-payments module as payment provider. Detailed documentation is available here https://docs.click.uz.

Installing

$ pip install django-payments
$ pip install click.tar.gz

Add "payments" and "click" to your INSTALLED_APPS setting like this::

INSTALLED_APPS = [
    ...
    'payments',
    'click',
    ...
]

Add the variables to your settings.py like this::

PAYMENT_HOST = '<your_ip_address>:<your_port>'
PAYMENT_USES_SSL = False # set the True value if you are using the SSL
PAYMENT_MODEL = '<your_payment_model>' 
# payment model format like this :: '<app_name>.<model_name>'
# add "click" to your variants
PAYMENT_VARIANTS = {
    ...
    'click' : ('click.ClickProvider', {
        'merchant_id' : 1111,
        'merchant_service_id' : 11111,
        'merchant_user_id' : 11111,
        'secret_key' : 'AAAAAA'
    })
    ...
}

Include the click and payments URLconf in your project urls.py like this::

path('payments/', include('payments.urls'))
path('payments/', include('click.urls'))

Create your payment model to models.py like this::

from payments.models import BasePayment
class Payment(BasePayment):
    pass

Add the model to your admin.py like this::

from django.contrib import admin
from .models import Payment

class PaymentAdmin(admin.ModelAdmin):
    pass

admin.site.register(Payment, PaymentAdmin)

Run python manage.py migrate to create the payment and your other models.

Start the development server and visit http://127.0.0.1:8000/admin/ to create a payment.

Click service urls as pattern : payments/process/click/service/<service_type> :

Service types

1) create_invoice
2) check_invoice
3) create_card_token
4) verify_card_token
5) payment_with_token
5) delete_card_token

The "prepare" and "complete" urls as pattern:

prepare : payments/process/click/prepare
complate : payments/process/click/complete

click's People

Contributors

maxthen avatar tensor2flow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.