Giter VIP home page Giter VIP logo

momoapi-php's People

Contributors

bqevin avatar mossplix avatar mwakaambrose avatar raybesiga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

momoapi-php's Issues

Error on installation

[RuntimeException]
No composer.json present in the current directory, this may be the cause of the following exception.

[InvalidArgumentException]
Could not find a version of package sparkplug/momoapi-php matching your minimum-stability (stable). Require it with
an explicit version constraint allowing its desired stability.

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...

Add Remittances

This library doesn't currently support the Remittances API. We need to add a module to support remittances. It should support the following operations:

  • POST /token (we need to add an authorizer for this)
  • POST /transfer
  • GET /transfer/{referenceId}
  • GET /v1_0/account/balance
  • GET /v1_0/accountholder/{accountHolderIdType}/{accountHolderId}/active

Reference

Add Unit Testing

Problem

Most of the code currently in master is not tested. This means it will be hard to detect when this library starts to fail.

Solution

To ensure that the library behaves as expected, we need to add tests.

Tasks

  • setup testing suite
  • add unit tests for collections, disbursements, remittances
  • add unit tests for users

Add Custom Error Handling

Is your feature request related to a problem? Please describe.

The library needs to throw custom errors depending on what errors are returned by MTN

Describe the solution you'd like

We should add custom error classes and throw them when the corresponding error occurs

Tasks

  • Add error classes for all possible MTN errors
  • Throw the correct exceptions depending on errors that occur

Add Validation

Is your feature request related to a problem? Please describe.

Currently, we don't have any validation to ensure users are invoking functions with the right parameters. The only validation we get is from the API. Ideally, we should identify errors and fail fast before they reach the API

Describe the solution you'd like

We need to add assertions on functions and constructors to ensure that the correct information is being given.

Continuous Integration and Testing

We need to add CI to facilitate automation of testing and publishing. We shall use Travis CI.
For the start, the CI should publish to Composer when a PR is reviewed and merged to master.

Progress

  • configure pylint
  • configure testing
  • configure semantic versioning
  • configure travis ci
  • add appropriate Composer token and github token to Travis CI secrets

Handle global and product specific environment variables

Some of the variables required to initialize the library are global, while others are product specific.

The global variables are;

  • Base URL (Sandbox or Production URL)
  • Platform Environment (Sandbox or Production)
  • Callback Host

The product specific ones are;

  • Subscription Key (Primary or Secondary)
  • User ID
  • User/API Secret

Describe the solution you'd like

We should initialize the library with global variables and then initialize the product clients with product-specific variables.

Add Collections

The client does not fully support the Collections API. We need to add a module to support the following operations:

  • POST /token (we need to already have an authorizer for this)
  • POST /requesttopay
  • GET /requesttopay/{referenceId}
  • GET /v1_0/account/balance
  • GET /v1_0/accountholder/{accountHolderIdType}/{accountHolderId}/active

Reference

Add Disbursements

The library does not fully support the Disbursements API. We need to add a module to support disbursements. The module must support the following operations:

  • POST /token (we need to create an authorizer for this)
  • POST /transfer
  • GET /transfer/{referenceId}
  • GET /v1_0/account/balance
  • GET /v1_0/accountholder/{accountHolderIdType}/{accountHolderId}/active

Reference

Update README

The README needs to be updated to reflect the changes that are being made and will be made in the production library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.