-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added MPESA Payments - Refactored previous method calls (No major change) - Added simple build script
- Loading branch information
1 parent
063c90b
commit 1276356
Showing
4 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ from python_flutterwave import payment | |
payment.token = 'YOUR_SECRET_KEY' | ||
``` | ||
|
||
- To trigger a payment that returns a redirect uri | ||
- To trigger a standard payment that returns a redirect uri | ||
|
||
``` | ||
uri = payment.initiate_payment(tx_ref="qwerty", amount=100, redirect_url='your_callback_url', | ||
|
@@ -37,4 +37,15 @@ then it may be `http://example.com/callback/?status=successful&tx_ref=qwerty&tra | |
- To check the transaction details e.g. successful or not, grab the transaction_id from the previous step. | ||
``` | ||
details = payment.get_payment_details(transaction_id) | ||
print(details) | ||
``` | ||
|
||
- To trigger an automatic mpesa charge on your customer, first configure your Webhook url in the dashboard, it may be a | ||
simple server; Flutterwave will post some data regarding your transaction status in that url. This method call will | ||
return a Python dict object. You can decide what to do thereon. | ||
``` | ||
mpesa_trans_details = payment.trigger_mpesa_payment(tx_ref="qwertyuio", amount=100, currency='KES', | ||
email='[email protected]', phone_number='1234567890', | ||
full_name='John Doe') | ||
print(mpesa_trans_details) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
rm -rf dist/ | ||
rm -rf *.egg-info | ||
|
||
python -m build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = python-flutterwave | ||
version = 0.0.4 | ||
version = 0.1.4 | ||
author = William Otieno | ||
author_email = [email protected] | ||
description = Python Wrapper for interacting with the Flutterwave Payments API | ||
|