Mpesa payment gateway
Project description
Mpesa Payment Lib
An Mpesa payment library for django framework
Getting Started Guide
Project description
This is a simple payment library to help you implement Mpesa payment in your dango application.
It's give all the required utility functions and methods to seamlessly work with mpesa
Installation
It's very simple to install. Use:
pip install dj-mpesa-payment or pipenv install dj-mpesa-payment when using pip and pipenv respectively
Setup
In your project's top level setting.py file, define the following mandatory variable;
-
MPESA_CONSUMER_KEY =
consumer_key- This is a consumer key from daraja developers account
-
MPESA_CONSUMER_SECRET =
secret_key- This key is also obtained from daraja developers account
-
MPESA_BASE_URL =
mpesa_api_base_url- This is the Mpesa api end point. For example the sandbox base url is https://sandbox.safaricom.co.ke
- Remember not to include trailing
/in thebase url
-
CONFIRMATION_CALL_BACK_URL =
your_confirm_url_endpoint- This is a POST endpoint in your project that Safaricom will be sending the payment confirmation data successful payments
-
VALIDATION_CALL_BACK_URL =
your_validation_url_endpoint.- Not yet implemented. Read more on daraja api documentation
-
PASS_KEY =
pass_key- This key is as well obtained from daraja developers account
-
SHORT_CODE =
your_paybill_or_till_number -
ACCOUNT_REFERENCE =
your_organisation_name- This is your organisation's name
-
TRANSACTION_DESCRIPTION =
transaction_description- This is a short text describing to user when the stk push pops what this transaction is for
Also, add in your setting.py, add the app in the INSTALLED_APP as
INSTALLED_APPS = [
#Other apps
'mpayments',
]
Usage
Coming Soon.
For guidance, contact the Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dj-mpesa-payment-0.0.1.tar.gz.
File metadata
- Download URL: dj-mpesa-payment-0.0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d540d8f8b75419cbeebabc9eec2b267eebfcd8df022a98fc4455cc9d8d44d20
|
|
| MD5 |
a920b8479a3745bda5419c7346ef7b4b
|
|
| BLAKE2b-256 |
d0215b29540cbbc65ed864d9224d9e97d2a576724e422437148d4f0141ba91de
|
File details
Details for the file dj_mpesa_payment-0.0.1-py3-none-any.whl.
File metadata
- Download URL: dj_mpesa_payment-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ec70e64f46553e7ba8c74e70d0767a79612300d9e310685df32d2c5d68b7629
|
|
| MD5 |
c212988c5499dcaa0d7c6d601b3fa200
|
|
| BLAKE2b-256 |
7d56536bad72e2e327cd00a99c5b8867d46727bbfee31712bea1209130cd45b7
|