Skip to content

Commit

Permalink
Merge pull request #51 from justinelut/main
Browse files Browse the repository at this point in the history
Main
  • Loading branch information
justinelut authored Jul 18, 2023
2 parents 7f42d8d + adabdaf commit 3cf1cf6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 65 deletions.
5 changes: 0 additions & 5 deletions .changeset/thirty-weeks-sniff.md

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# mpesapay

## 4.3.5

### Patch Changes

- fd4d94d: edited the list of contributers

## 4.3.4

### Patch Changes

- c2fc798: adding all contributers

## 4.3.3

### Patch Changes
Expand Down
72 changes: 13 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# Mpesa Pay
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Mpesa Pay is a JavaScript library that enables developers to easily integrate Mpesa payments into their Node.js, Next.js, SvelteKit, and Nuxt.js applications. It provides an easy-to-use interface for initiating STK Push requests, facilitating Business-to-Business transactions, checking Account Balances, and verifying Transaction statuses.

Expand Down Expand Up @@ -41,16 +35,13 @@ import MpesaPay from 'mpesapay';
Or use commonjs syntax:

```javascript
const { MpesaPay } = require('mpesapay');

const { MpesaPay } = require('mpesapay')

or
or;

const MpesaPay = require('mpesapay').default;

```


Create an instance of the `MpesaPay` class with your Mpesa API credentials:

```javascript
Expand All @@ -60,13 +51,11 @@ const Business_Short_Code = 'YOUR_BUSINESS_SHORT_CODE';
const Passkey = 'YOUR_PASS_KEY';
const Transaction_Description = 'YOUR_TRANSACTION_DESCRIPTION';
const Account_Reference = 'YOUR_ACCOUNT_REFERENCE';
const PartyA = "YOUR_MPESA_PARTYA"
const B2C_Security_Credential = "YOUR MPESA B2C SECURITY CREDENTIAL"
const Initiator_Name = "YOUR MPESA INITIATORS NAME"
const Environment = 'THE ENVIRONMENT i.e sandbox or live'
const Transaction_Type = "YOUR SHORTCODE TYPE i.e paybill or till"


const PartyA = 'YOUR_MPESA_PARTYA';
const B2C_Security_Credential = 'YOUR MPESA B2C SECURITY CREDENTIAL';
const Initiator_Name = 'YOUR MPESA INITIATORS NAME';
const Environment = 'THE ENVIRONMENT i.e sandbox or live';
const Transaction_Type = 'YOUR SHORTCODE TYPE i.e paybill or till';

const mpesapay = new MpesaPay(
Consumer_Key,
Expand All @@ -85,7 +74,7 @@ const mpesapay = new MpesaPay(

Replace the placeholders with your actual Mpesa credentials.

> To get your Mpesa credentials, you can follow the procedures outlined in our official documentation available at [Getting Mpesa Credentials](https://mpesapay.verixr.com/getting-started/gettingcredentials).
> To get your Mpesa credentials, you can follow the procedures outlined in our official documentation available at [Getting Mpesa Credentials](https://mpesapay.verixr.com/getting-started/gettingcredentials).
**Initiating a Payment**

Expand Down Expand Up @@ -120,28 +109,28 @@ The `stkPush` method initiates the payment process and returns a Promise. The Pr

Make sure to handle the response data and errors accordingly in your application.


## TypeScript Support

The Mpesa Pay module includes TypeScript type definitions, providing enhanced development experience and type checking capabilities when using the library in a TypeScript project.


That's it! You can now integrate Mpesa payments into your Node.js application using the Mpesa Pay library.

> Please note that `stkPush` only initiates payments, and the results will be sent to the provided callback URL. Make sure to implement the necessary server-side logic to handle the payment confirmation notifications and update your database accordingly.
> Please note that ```stkPush``` only initiates payments, and the results will be sent to the provided callback URL. Make sure to implement the necessary server-side logic to handle the payment confirmation notifications and update your database accordingly.
## Contributors ✨

## Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

[![All Contributors](https://img.shields.io/github/all-contributors/justinelut/mpesapay?color=ee8449&style=flat-square)](#contributors)

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://verixr.com"><img src="https://avatars.githubusercontent.com/u/51832166?v=4?s=100" width="100px;" alt="Justine Gichana"/><br /><sub><b>Justine Gichana</b></sub></a><br /><a href="https://github.com/justinelut/mpesapay/commits?author=justinelut" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hamisirizwan"><img src="https://avatars.githubusercontent.com/u/72559592?v=4?s=100" width="100px;" alt="Dev_riz"/><br /><sub><b>Dev_riz</b></sub></a><br /><a href="https://github.com/justinelut/mpesapay/commits?author=hamisirizwan" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://verixr.com"><img src="https://avatars.githubusercontent.com/u/51832166?v=4?s=100" width="100px;" alt="Justine Gichana"/><br /><sub><b>Justine Gichana</b></sub></a><br /><a href="https://github.com/justinelut/mpesapay/commits?author=justinelut" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand All @@ -151,16 +140,6 @@ That's it! You can now integrate Mpesa payments into your Node.js application us

<!-- ALL-CONTRIBUTORS-LIST:END -->

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->


[Justine Gichana](https://github.com/justinelut)

[Github URL](https://github.com/justinelut/mpesapay)
Expand All @@ -170,28 +149,3 @@ That's it! You can now integrate Mpesa payments into your Node.js application us
[Contributing](https://mpesapay.verixr.com/contributing)

[Support Via Paypal](https://www.paypal.com/donate/?hosted_button_id=DYVVE53QU35FS)




## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>

</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mpesapay",
"version": "4.3.3",
"version": "4.3.5",
"description": "A module for processing MPESA payments",
"type": "module",
"private": false,
Expand Down

0 comments on commit 3cf1cf6

Please sign in to comment.