Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Commit ab94114

Browse files
committed
v0.6.9
- Minor refactoring
1 parent d268717 commit ab94114

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

python_flutterwave/payment.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
token = ""
66

77

8-
def initiate_payment(tx_ref: str, amount: float, currency: Optional[str], redirect_url: str, customer_name: str,
9-
payment_options: Optional[str], title: Optional[str], customer_email: str,
10-
customer_phone_number: Optional[str], description: Optional[str]) -> str:
8+
def initiate_payment(tx_ref: str, amount: float, redirect_url: str, customer_name: str,
9+
customer_email: str, currency: Optional[str] = None, payment_options: Optional[str] = None,
10+
title: Optional[str] = None, description: Optional[str] = None,
11+
customer_phone_number: Optional[str] = None,
12+
) -> str:
1113
"""This is used to initiate standard payments. It takes in the arguments and returns the url to redirect users for
1214
payments """
1315
payment_url = "https://api.flutterwave.com/v3/payments"
@@ -53,8 +55,8 @@ def get_payment_details(trans_id: str) -> dict:
5355
return dict(response.json())
5456

5557

56-
def trigger_mpesa_payment(tx_ref: str, amount: float, currency: str, email: Optional[str], phone_number: str,
57-
full_name: str) -> dict:
58+
def trigger_mpesa_payment(tx_ref: str, amount: float, currency: str, phone_number: str, full_name: str,
59+
email: Optional[str] = None) -> dict:
5860
"""
5961
This will automatically trigger an MPESA payment in form of an STK Push from your customer. It will return a
6062
dictionary with details regarding the transaction. Flutterwave will also send the status to your webhook configured

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = python-flutterwave
3-
version = 0.5.9
3+
version = 0.6.9
44
author = William Otieno
55
author_email = jimmywilliamotieno@gmail.com
66
description = Python Wrapper for interacting with the Flutterwave Payments API

0 commit comments

Comments
 (0)