Logo Lanfrica

Lipad-Africa-Limited/python-sdk

Domaine:

digital infrastructure

Type de record:

software
Créateur:
Lip
Hôte:
# Lipad Python SDK ## Introduction The Lipad Python SDK facilitates the integration of Lipad's Direct API and Checkout features into your Python applications. This comprehensive guide will assist you in the setup and utilization of the Lipad SDK. ## Prerequisites Before getting started, ensure you have the following: - Python: Ensure that you have Python installed on your system. You can download Python from the official Python website. - You have installed: requests, aiohttp, pycryptodome - Lipad API credentials, including the IV Key, Consumer Secret, Consumer Key. - Environment: Decide whether you want to work in the production or sandbox environment. Lipad provides different URLs for each environment, so choose accordingly. ## Installation 1. **Download the Lipad SDK:** Download the Lipad SDK and include it in your project. ```bash # Example using pip pip install lipad-sdk 2. **Import the Lipad class and necessary libraries:** ```bash from lipad import Lipad import json import ayncio 3. **Create an asynchronous main function.** ```bash async def main(): // Replace these values with your actual credentials iv_key = "your_iv_key"; consumer_secret = "your_consumer_secret"; consumer_key = "your_consumer_key" environment = "sandbox", "production"; charge_request_id = "your_charge_request_id" 4. **Running the script** ### To execute the script and run the main function, add the following line at the end of your script: ```bash if __name__ == "__main__": asyncio.run(main()) ## Checkout Usage 1. **To initialize the Lipad class, provide the iv_key, consumer_key, consumer_secret, and environment parameters. The environment should be one of the following: 'production' or 'sandbox'.** ```bash lipad = new Lipad(iv_key, consumer_key, consumer_secret, environment); 2. **Validate Payload** ```bash payload = { "msisdn": "", "account_number": "", "country_code": "", "currency_code": "", "client_code": "", "due_date": "", "customer_email": "", "customer_first_na …