Skip to main content

A Python wrapper for the ECRAS API.

Project description

Test and Deploy Python Wrapper

ECRASPAY Python SDK [Alpha]

ECRASPAY SDK provides a convenient and Pythonic way to interact with the ECRASPAY API for managing payments and transactions. This package simplifies initiating and managing payments, such as card payments, USSD, bank transfers, and transaction verification.


Features

  • Direct integration with the ECRASPAY API:

    • Transaction Management:

      • Fetch transaction details and status.
      • Cancel transactions.
      • Verify transactions.
    • Card Payments:

      • Initiate card payments.
      • Submit and resend OTPs.
      • Fetch card transaction details.
      • Verify card payments.
    • USSD Payments:

      • Initiate USSD payments.
      • Retrieve a list of supported banks for USSD payments.
    • Bank Transfers:

      • Initialize bank transfers by requesting bank account details.
  • Checkout Payments:

    • Initiate checkout transactions.
    • Verify checkout transactions.

Installation

Prerequisites

  • Python 3.6 or later.

Installation via pip

pip install ecraspay-py

Usage

Initialize the EcrasPay client

- Checkouts Payments

</code></pre>
<h2>Contributing</h2>
<p>We welcome contributions to the ECRASPAY Python SDK! Whether you're fixing bugs, adding new features, or improving documentation, your contributions are highly appreciated.</p>
<h3>How to Contribute</h3>
<ol>
<li>
<p><strong>Fork the Repository</strong>:</p>
<ul>
<li>Navigate to the repository's GitHub page and click the <strong>Fork</strong> button.</li>
</ul>
</li>
<li>
<p><strong>Clone Your Fork</strong>:</p>
<ul>
<li>Clone your fork to your local machine:
<pre lang="bash"><code>git clone https://github.com/thelimeskies/ecraspay-sdk.git
  • Create a Branch:

    • Create a new branch for your feature or bugfix:
      git checkout -b feature-or-bugfix-name
      
  • Make Your Changes:

    • Implement your changes in the appropriate files.
    • Follow the project's coding standards and ensure your changes align with the rest of the codebase.
  • Write Tests:

    • Add tests for your changes to ensure functionality is maintained.
    • Use pytest to run the test suite:
      pytest
      
  • Commit Your Changes:

    • Commit your changes with a descriptive commit message:
      git commit -m "Add <feature-or-bugfix-name>"
      
  • Push Your Branch:

    • Push your branch to your forked repository:
      git push origin feature-or-bugfix-name
      
  • Create a Pull Request:

    • Go to the original repository on GitHub.
    • Click the Pull Requests tab, then click New Pull Request.
    • Select your branch and provide a detailed description of your changes.

  • Contribution Guidelines

    • Ensure your code follows the PEP 8 Python style guide.
    • Write meaningful commit messages.
    • Add or update documentation when necessary.
    • Run all tests to verify your changes don't break existing functionality.

    Reporting Issues

    If you encounter any issues or bugs, please create an issue on the GitHub Issues page with the following details:

    • A clear and descriptive title.
    • Steps to reproduce the issue.
    • Expected and actual behavior.
    • Any relevant logs or screenshots.

    Thank you for contributing to ECRASPAY Python SDK!

    TODO

    • Finish Documentation
    • Add examples
    • Finish Tests
    • Write and Document all Utility functions for the SDK(Django, Flask, FastAPI, Pure Python) - e.g. get_device_details, encrypt_card, clean_phone_number, clean_amount, clean_email, clean_name, clean_transaction_id.

    Project details


    Download files

    Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

    Source Distribution

    ecraspay_py-0.1.0.tar.gz (11.7 kB view details)

    Uploaded Source

    Built Distribution

    If you're not sure about the file name format, learn more about wheel file names.

    ecraspay_py-0.1.0-py3-none-any.whl (14.7 kB view details)

    Uploaded Python 3

    File details

    Details for the file ecraspay_py-0.1.0.tar.gz.

    File metadata

    • Download URL: ecraspay_py-0.1.0.tar.gz
    • Upload date:
    • Size: 11.7 kB
    • Tags: Source
    • Uploaded using Trusted Publishing? No
    • Uploaded via: twine/6.0.1 CPython/3.11.9

    File hashes

    Hashes for ecraspay_py-0.1.0.tar.gz
    Algorithm Hash digest
    SHA256 7eb98975712c5bc2b09c18a1b265712ffefe3aa89095d9d44a231d84455f4320
    MD5 9a37b4f950c4b58d0b3d4f2b62cd5c3c
    BLAKE2b-256 94dced50971d502ff265bd1a78e3fedf4ddc954f79c1622f79fbd520077c89ad

    See more details on using hashes here.

    File details

    Details for the file ecraspay_py-0.1.0-py3-none-any.whl.

    File metadata

    • Download URL: ecraspay_py-0.1.0-py3-none-any.whl
    • Upload date:
    • Size: 14.7 kB
    • Tags: Python 3
    • Uploaded using Trusted Publishing? No
    • Uploaded via: twine/6.0.1 CPython/3.11.9

    File hashes

    Hashes for ecraspay_py-0.1.0-py3-none-any.whl
    Algorithm Hash digest
    SHA256 43e3f2d59654186bd1e008cac74810837d8469ae4a07a9e338fcc858f12deba4
    MD5 0b2c6c92289354b2a252ad87f455db0c
    BLAKE2b-256 0438a22c52e508389ce24d76a924727e6bd38338dd44671d8932bf7e9cf51dea

    See more details on using hashes here.

    Supported by

    AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page