Skip to content

melsaq/Wit-airtel-money-python-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Wit Airtel money developer python SDK

PROJECT REQUIREMENTS

First step edit environment_mode, x_country, x_currency, client_id and client_secret values from /classes/airtel_pay.py as shown below:

    #Main
    x_country = "country_code?"
    x_currency = "currency_code?"
    #Check if sandbox or production
    #Choose either sandbox or production
    environment_mode = "stagging"
    #pin
    disbursement_pin = "your disbursement pin?"

    #Configure keys
    client_id = "client_id?"
    client_secret = "client_secret?"

After configuring the above initiliasation steps, then you are ready to collect and disburse the payments. Follow the below instructions.

REQUEST PAYMENT CALL

To collect or request a payment you kindly need to call the following function

from classes.airtel_pay import AirtelPay

#Request pay
pay = AirtelPay.pay("ten_digits_phone_number", "amount", "currency_code", "country_code", "transaction_id")
print(pay["jsondata"])

CHECK/VERIFY TRANSACTION CALL

To check the transaction status or verify, follow the below instructions:

from classes.airtel_pay import AirtelPay

#Verify/check transaction status
verify = AirtelPay.verify_transaction("transaction_id")
print(verify)

DISBURSE/TRANSFER THE MONEY

To transfer or disburse money into your mobile money account, follow the below instructions: ALERT!!!! This calling does not work without the disbursement pin!!! Follow the first instruction to configure your disbursement pin!

from classes.airtel_pay import AirtelPay

#Disburse funds
transfer = AirtelPay.transfermoney("airtel_phone_number", "amount")
print(transfer)

That's all for this tutorial fam. For personal support/assistance kindly use these details:

Thank you for your time!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%