Metadata-Version: 1.1
Name: django-khalti
Version: 0.1
Summary: A Django app to verify server side payment verification.
Home-page: https://www.example.com/
Author: Aashish Dhakal
Author-email: yourname@example.com
License: BSD-3-Clause  # Example license
Description: django-khalti
        =============
        
        django-khalti is a Django app based on djangorestframework to conduct
        server based payment verification of khalti payment gateway. For each
        payment,it can verify and return status of payment through transaction
        token and paid amount.
        
        Detailed documentation is in the "docs" directory.
        
        Quick start
        -----------
        1. Intall the django-khalti and django rest framework like this::
        
            pip install djangorestframework
            pip install django-khalti
        
        2. Add "django-khalti" and "djangorestframework "to your INSTALLED_APPS setting like this::
        
            INSTALLED_APPS = [
                ...
                'rest_framework',
                'khalti',
            ]
        
        3. Include the django-khalti URLconf in your project urls.py like this::
        
            path('khalti/', include('khalti.urls')),
        
        
        4. Add Khalti Merchant API key and Verify URL in your settings.py ::
        
            KHALTI_SECRET_KEY = "<your api key>"
            KHALTI_VERIFY_URL = "https://khalti.com/api/v2/payment/verify/"
        
        5.Test your endpoints like this::
        
            POST: /khalti/verifypayment/
            body:{
                'token':<transaction token>,
                'amount':<transaction amount>
            }
        
        6.You will get responses like this::
        
            On Success:
                {
                    'status':True,
                    'details':{
                                  "idx": "8xmeJnNXfoVjCvGcZiiGe7",
                                  "type": {
                                    "idx": "e476BL6jt9kgagEmsakyTL",
                                    "name": "Wallet payment"
                                  },
                                  "state": {
                                    "idx": "DhvMj9hdRufLqkP8ZY4d8g",
                                    "name": "Completed",
                                    "template": "is complete"
                                  },
                                  "amount": 1000,
                                  "fee_amount": 30,
                                  "refunded": false,
                                  "created_on": "2018-06-20T14:48:08.867125+05:45",
                                  "ebanker": null,
                                  "user": {
                                    "idx": "cCaPkRPQGn5D8StkiqqMJg",
                                    "name": "Test User",
                                    "mobile": "98XXXXXXX9"
                                  },
                                  "merchant": {
                                    "idx": "UM75Gm2gWmZvA4TPwkwZye",
                                    "name": "Test Merchant",
                                    "mobile": "testmerchant@khalti.com"
                                  }
                            }
                }
        
            On Error:
                {
                    'status':False,
                    'details':{'token': ['Invalid token.']}
                }
        
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
