-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from makindajack/main
π styling readme.md
- Loading branch information
Showing
4 changed files
with
47 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
<p align="center"><img src="img/mpesa.png" width="400px" alt="M-Pesa Logo"></p> | ||
|
||
# Pesa SDK for Nodejs using M-Pesa Open API | ||
|
||
![npm (scoped)](https://img.shields.io/npm/v/@openpesa/pesa-js) | ||
[![Build Status](https://travis-ci.org/openpesa/pesa-js.svg)](https://travis-ci.org/openpesa/pesa-js) | ||
![documentation](https://github.com/openpesa/pesa-js/workflows/documentation/badge.svg) | ||
[![NPM](https://nodei.co/npm/@openpesa/pesa-js.png?mini=true)](https://npmjs.org/package/@openpesa/pesa-js) | ||
|
||
The **Pesa SDK for Node.js** makes it easy for developers to access [OpenAPI](https://openapiportal.m-pesa.com/) in their Javascript code, and build robust applications and software using services like Customer 2 Bussiness, Query, etc. | ||
|
||
## Documentation | ||
<h1 align="center">Node pesa</h1> | ||
|
||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/@openpesa/pesa-js"> | ||
<img src="https://img.shields.io/npm/v/@openpesa/pesa-js" alt="npm (scoped)"> | ||
</a> | ||
<a href="https://npmjs.org/package/@openpesa/pesa-js"> | ||
<img src="https://nodei.co/npm/@openpesa/pesa-js.png?mini=true" alt="NPM"> | ||
</a> | ||
</p> | ||
|
||
<p align="center"> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="./img/banner/header-dark.png"> | ||
<img alt="node pesa" src="./img/banner/header-light.png"> | ||
</picture> | ||
<p align="center"><p>Integration that simplifies access to <a href="https://openapiportal.m-pesa.com/login">M-Pesa's OpenAPI</a> for developers to build applications/ software by providing easy access to services like Customer to Business (C2B), Query, and more.</p> | ||
</p> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/openpesa/node-pesa/issues/new/choose">Report Bug</a> | ||
Β· | ||
<a href="https://github.com/openpesa/node-pesa/issues/new/choose">Request Feature</a> | ||
</p> | ||
|
||
## π§ Documentation | ||
|
||
Take a look at the [API docs here](https://openpesa.github.io/pesa-js/). | ||
|
||
## Getting Started | ||
|
||
## π Getting Started | ||
|
||
1. **Sign up for OpenAPI Portal** β Before you begin, you need to sign up for an account and retrieve your credentials. | ||
|
||
|
@@ -32,11 +48,10 @@ Take a look at the [API docs here](https://openpesa.github.io/pesa-js/). | |
1. **Using the SDK** β The best way to become familiar with how to use the SDK | ||
is to read the [User Guide](https://openpesa.github.io/pesa-js/). | ||
|
||
## Usage | ||
|
||
### Quick Examples | ||
## πΌ Usage | ||
|
||
```js | ||
import { Pesa } from '@openpesa/pesa-js'; | ||
// Populate the credentials | ||
|
@@ -61,19 +76,18 @@ pesa.c2b(data) | |
.catch((e) => { | ||
console.log('err: ' + e); | ||
}); | ||
``` | ||
### Testing | ||
## π§ͺ Test | ||
```bash | ||
npm test | ||
``` | ||
## Opening Issues | ||
npm test | ||
If you have a feature request or you encounter a bug, please file an issue on [our issue tracker on GitHub](https://github.com/openpesa/pesa-js/issues). | ||
``` | ||
## Road Map | ||
## πΊοΈ Road Map | ||
1. Validate data input using Regex before the API call. | ||
2. If fields are not provided then generate a random string for "input_ThirdPartyConversationID" and "input_TransactionReference" | ||
|
@@ -82,18 +96,23 @@ If you have a feature request or you encounter a bug, please file an issue on [o | |
5. Validate Secret Keys length and format. | ||
6. Allow user use custom sessionID on any/each transaction. (Portal allow for seesion with several hours of validity) | ||
7. Add and improve documentation and examples(example will include expressjs app) | ||
8. | ||
## π Changelog | ||
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. | ||
## π€ Contributing | ||
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details. | ||
### Security | ||
## π Security Vulnerabilities | ||
If you discover any security-related issues, please email [[email protected]](mailto:[email protected]) instead of using the issue tracker. | ||
Please review [our security policy](../../security/policy) on how to report security vulnerabilities. | ||
## Credits | ||
## π₯ Credits | ||
- [Openpesa](https://github.com/openpesa) | ||
- [All Contributors](../../contributors) | ||
## License | ||
## π License | ||
The MIT License (MIT). Please see [License File](LICENSE.md) for more information. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.