(20250102) Safaricom M-Pesa work.
This commit is contained in:
@@ -339,6 +339,8 @@ class SafaricomMPesaExpress:
|
||||
"TransactionDesc": description[:13] if len(description) > 13 else description
|
||||
}
|
||||
|
||||
print("HEADERS:", input_headers)
|
||||
|
||||
# Make the API call:
|
||||
api_response = await self.__post(
|
||||
url = r"https://api.safaricom.co.ke/mpesa/stkpush/v1/processrequest",
|
||||
@@ -392,11 +394,14 @@ if __name__ == "__main__":
|
||||
# Make the request:
|
||||
response = await my_m_pesa.request_payment(
|
||||
amount = 1.00,
|
||||
party_a = "254748877373",
|
||||
party_a = "254700123007",
|
||||
type = "CustomerPayBillOnline",
|
||||
reference = "TestTransactionTXN12345678",
|
||||
description = "Some description about the payment reason...",
|
||||
callback_url = r"https://api.thecaoffice.com/converse/test/callback",
|
||||
# callback_url = r"https://api.thecaoffice.com/converse/test/callback",
|
||||
callback_url = r"https://v2.api.bicree.com/user/callback/test",
|
||||
payer_no = "254700123007",
|
||||
|
||||
)
|
||||
|
||||
# Show the response:
|
||||
|
||||
Reference in New Issue
Block a user