Skip to content

Commit ff4299e

Browse files
authored
Merge pull request #7 from beamkenya/develop
New Mpesa Library alpha v0.1.0
2 parents b18dae9 + d33b947 commit ff4299e

39 files changed

+2068
-30
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: 'Feature Request: '
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Work Involved**
17+
What would would need to be done to deliver this?
18+
19+
**Definition of Done**
20+
A clear and concise description of what done would look like for this issue
21+
22+
**Additional context**
23+
Add any other context or screenshots about the feature request here.

.github/workflows/coveralls.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Elixir Coveralls
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
- develop
12+
13+
jobs:
14+
coveralls-coverage:
15+
16+
runs-on: ubuntu-latest
17+
env:
18+
MIX_ENV: test
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Create dev file
24+
run: mv config/dev.sample.exs config/dev.exs
25+
- name: Setup elixir
26+
uses: actions/setup-elixir@v1
27+
with:
28+
elixir-version: '1.9.4'
29+
otp-version: '22.2'
30+
experimental-otp: true
31+
- name: Install Dependencies
32+
run: mix deps.get
33+
- name: Coverals Coverage
34+
run: mix coveralls.github

.github/workflows/elixir.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Elixir CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
- develop
12+
13+
jobs:
14+
check-lint-and-test:
15+
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
otp: [21.3.8.10, 22.2]
20+
elixir: [1.8.2, 1.9.4]
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Create dev file
25+
run: mv config/dev.sample.exs config/dev.exs
26+
- name: Setup elixir
27+
uses: actions/setup-elixir@v1
28+
with:
29+
otp-version: ${{matrix.otp}}
30+
elixir-version: ${{matrix.elixir}}
31+
experimental-otp: true
32+
- name: Install Dependencies
33+
run: mix deps.get
34+
- name: Run Tests
35+
run: mix test
36+
- name: Check formatting
37+
run: mix format --check-formatted
38+
- name: Checking compile warnings
39+
run: mix compile --warnings-as-errors --force

.github/workflows/greetings.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Greetings
2+
3+
on: [pull_request_target, issues]
4+
5+
jobs:
6+
greeting:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/first-interaction@v1
10+
with:
11+
repo-token: ${{ secrets.GITHUB_TOKEN }}
12+
issue-message: "Thank you @${{ github.actor }} for your issue! We are glad you contributed!"
13+
pr-message: "Thank you @${{ github.actor }} for your first pull Request!"

.github/workflows/hex-publish.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on:
2+
push:
3+
tags:
4+
- '*'
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out
11+
uses: actions/checkout@v2
12+
13+
- name: Publish to Hex.pm
14+
uses: erlangpack/github-action@v1
15+
env:
16+
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ erl_crash.dump
2222
# Ignore package tarball (built via "mix hex.build").
2323
ex_mpesa-*.tar
2424

25+
config/dev.exs
26+
/.vscode
27+
/.DS_Store

README.md

Lines changed: 89 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
1-
# ExMpesa
1+
<p align="left"><img src="assets/mpesa.png" width="140"></p>
22

3-
**TODO: Add description**
3+
[![Actions Status](https://github.com/beamkenya/ex_mpesa/workflows/Elixir%20CI/badge.svg)](https://github.com/beamkenya/ex_mpesa/actions) ![Hex.pm](https://img.shields.io/hexpm/v/ex_mpesa) ![Hex.pm](https://img.shields.io/hexpm/dt/ex_mpesa) [![Coverage Status](https://coveralls.io/repos/github/beamkenya/ex_mpesa/badge.svg?branch=develop)](https://coveralls.io/github/beamkenya/ex_mpesa?branch=develop)
4+
5+
# ExMpesa
6+
7+
> Payment Library For Most Mpesa(Daraja) Payment API's in Kenya. Let us get this :moneybag:
8+
9+
## Table of contents
10+
11+
- [Features](#features)
12+
- [Installation](#installation)
13+
- [Configuration](#configuration)
14+
- [Documentation](#documentation)
15+
- [Contribution](#contribution)
16+
- [Contributors](#contributors)
17+
- [Licence](#licence)
18+
19+
## Features
20+
21+
- [x] STK Transaction Validation
22+
- [x] B2C
23+
- [x] B2B
24+
- [x] C2B
25+
- [x] Reversal
26+
- [x] Transaction Status
27+
- [x] Account Balance
428

529
## Installation
630

@@ -15,7 +39,67 @@ def deps do
1539
end
1640
```
1741

18-
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
19-
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
20-
be found at [https://hexdocs.pm/ex_mpesa](https://hexdocs.pm/ex_mpesa).
42+
## Configuration
43+
44+
Create a copy of `config/dev.exs` or `config/prod.exs` from `config/dev.sample.exs`
45+
Use the `sandbox` key to `true` when you are using sandbox credentials, chnage to `false` when going to `:prod`
46+
47+
### Mpesa (Daraja)
48+
49+
Mpesa Daraja API link: https://developer.safaricom.co.ke
50+
51+
Add below config to dev.exs / prod.exs files
52+
This asumes you have a clear understanding of how [Daraja API works](https://developer.safaricom.co.ke/get-started).
53+
54+
You can also refer to this Safaricom Daraja API Tutorial: https://peternjeru.co.ke/safdaraja/ui/ by Peter Njeru
55+
56+
```elixir
57+
config :ex_mpesa,
58+
consumer_key: "72yw1nun6g1QQPPgOsAObCGSfuimGO7b",
59+
consumer_secret: "vRzZiD5RllMLIdLD",
60+
mpesa_short_code: "174379",
61+
mpesa_passkey: "bfb279f9aa9bdbcf158e97dd71a467cd2e0c893059b10f78e6b72ada1ed2c919",
62+
mpesa_callback_url: "http://91eb0af5.ngrok.io/api/payment/callback"
63+
```
64+
65+
## Documentation
66+
67+
The docs can be found at [https://hexdocs.pm/ex_mpesa](https://hexdocs.pm/ex_mpesa).
68+
69+
### Quick Examples
70+
71+
#### Mpesa Express (STK)
72+
73+
```elixir
74+
iex> ExMpesa.Stk.request(%{amount: 10, phone: "254724540000", reference: "reference", description: "description"})
75+
{:ok,
76+
%{
77+
"CheckoutRequestID" => "ws_CO_010320202011179845",
78+
"CustomerMessage" => "Success. Request accepted for processing",
79+
"MerchantRequestID" => "25558-10595705-4",
80+
"ResponseCode" => "0",
81+
"ResponseDescription" => "Success. Request accepted for processing"
82+
}}
83+
```
84+
85+
## Contribution
86+
87+
If you'd like to contribute, start by searching through the [issues](https://github.com/beamkenya/ex_mpesa/issues) and [pull requests](https://github.com/beamkenya/ex_mpesa/pulls) to see whether someone else has raised a similar idea or question.
88+
If you don't see your idea listed, [Open an issue](https://github.com/beamkenya/ex_mpesa/issues).
89+
90+
Check the [Contribution guide](contributing.md) on how to contribute.
91+
92+
## Contributors
93+
94+
Auto-populated from:
95+
[contributors-img](https://contributors-img.firebaseapp.com/image?repo=beamkenya/ex_mpesa)
96+
97+
<a href="https://github.com/beamkenya/ex_mpesa/graphs/contributors">
98+
<img src="https://contributors-img.firebaseapp.com/image?repo=beamkenya/ex_mpesa" />
99+
</a>
100+
101+
## Licence
102+
103+
ExPesa is released under [MIT License](https://github.com/appcues/exsentry/blob/master/LICENSE.txt)
21104

105+
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=for-the-badge)](#)

assets/mpesa.png

15.7 KB
Loading

config/config.exs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file is responsible for configuring your application
2+
# and its dependencies with the aid of the Mix.Config module.
3+
use Mix.Config
4+
5+
import_config "#{Mix.env()}.exs"

config/dev.sample.exs

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
use Mix.Config
2+
config :tesla, adapter: Tesla.Adapter.Hackney
3+
4+
config :ex_mpesa,
5+
# When changed to "false" one will use the live endpoint url
6+
sandbox: true,
7+
consumer_key: "72yw1nun6g1QQPPgOsAObCGSfuimGO7b",
8+
consumer_secret: "vRzZiD5RllMLIdLD",
9+
mpesa_short_code: "174379",
10+
# had to pass this for registerurl to work for C2B
11+
c2b_short_code: "600247",
12+
mpesa_passkey: "bfb279f9aa9bdbcf158e97dd71a467cd2e0c893059b10f78e6b72ada1ed2c919",
13+
mpesa_callback_url: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4ewguN1UDZvPWetSyfBk10Wbpor4znQ4TJ3Y9uCvsJH\n41ldblDvZZ2z4kB2UYQ7iBkPlJSxSOaFgW/GGDXq49sz/995xzhVITHxh2SdLkI=\n-----END CERTIFICATE-----\n",
16+
b2b: [
17+
short_code: "600247",
18+
initiator_name: "John Doe",
19+
password: "Safaricom133",
20+
timeout_url: "https://58cb49b30213.ngrok.io/b2b/timeout_url",
21+
result_url: "https://58cb49b30213.ngrok.io/b2b/result_url",
22+
security_credential:
23+
"kxlZ1Twlfr6xQru0GId03LbegvuTPelnz3qITkvUJxaCTQt1HaD2hN801Pgbi38x6dEq/hsanBBtfj6JbePayipE/srOyMQ61ieiO+5uHb/JX/NLi1Jy6Alvi0hKbCbq9cVwC/bZBhli7AUAtpfKVgIyXq2InNyfzXpzR8FhrbXiaMhTPJ8WleozPm5CnXe2bFlFP7K0yhCRlT+UOPl7xh0LqU23rMTj3TN/ms600c3j/m2FxQZdmY5/rdORrJeTQV1vw6kXr1QrGaSDSdRMUiaGbg5uPL8LSNwC5bn3M92oPY2cWmkyH9rOzbCN+o5+23TvweaKZlrKuv7etKXMFg=="
24+
],
25+
b2c: [
26+
short_code: "600247",
27+
initiator_name: "John Doe",
28+
password: "Safaricom133",
29+
timeout_url: "https://58cb49b30213.ngrok.io/b2c/timeout_url",
30+
result_url: "https://58cb49b30213.ngrok.io/b2c/result_url"
31+
],
32+
balance: [
33+
short_code: "602843",
34+
initiator_name: "Safaricom1",
35+
password: "Safaricom133",
36+
timeout_url: "https://58cb49b30213.ngrok.io/b2b/timeout_url",
37+
result_url: "https://58cb49b30213.ngrok.io/b2b/result_url",
38+
security_credential:
39+
"kxlZ1Twlfr6xQru0GId03LbegvuTPelnz3qITkvUJxaCTQt1HaD2hN801Pgbi38x6dEq/hsanBBtfj6JbePayipE/srOyMQ61ieiO+5uHb/JX/NLi1Jy6Alvi0hKbCbq9cVwC/bZBhli7AUAtpfKVgIyXq2InNyfzXpzR8FhrbXiaMhTPJ8WleozPm5CnXe2bFlFP7K0yhCRlT+UOPl7xh0LqU23rMTj3TN/ms600c3j/m2FxQZdmY5/rdORrJeTQV1vw6kXr1QrGaSDSdRMUiaGbg5uPL8LSNwC5bn3M92oPY2cWmkyH9rOzbCN+o5+23TvweaKZlrKuv7etKXMFg=="
40+
],
41+
transaction_status: [
42+
initiator_name: "John Doe",
43+
password: "Safaricom133",
44+
timeout_url: "https://58cb49b30213.ngrok.io/transaction/timeout_url",
45+
result_url: "https://58cb49b30213.ngrok.io/transaction/result_url",
46+
security_credential: ""
47+
],
48+
reversal: [
49+
short_code: "600247",
50+
initiator_name: "Jane Doe",
51+
password: "superStrong@1",
52+
timeout_url: "https://58cb49b30213.ngrok.io/reversal/timeout_url",
53+
result_url: "https://58cb49b30213.ngrok.io/reversal/result_url",
54+
security_credential:
55+
"kxlZ1Twlfr6xQru0GId03LbegvuTPelnz3qITkvUJxaCTQt1HaD2hN801Pgbi38x6dEq/hsanBBtfj6JbePayipE/srOyMQ61ieiO+5uHb/JX/NLi1Jy6Alvi0hKbCbq9cVwC/bZBhli7AUAtpfKVgIyXq2InNyfzXpzR8FhrbXiaMhTPJ8WleozPm5CnXe2bFlFP7K0yhCRlT+UOPl7xh0LqU23rMTj3TN/ms600c3j/m2FxQZdmY5/rdORrJeTQV1vw6kXr1QrGaSDSdRMUiaGbg5uPL8LSNwC5bn3M92oPY2cWmkyH9rOzbCN+o5+23TvweaKZlrKuv7etKXMFg=="
56+
]

config/test.exs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
use Mix.Config
2+
config :tesla, adapter: Tesla.Mock
3+
4+
config :ex_mpesa,
5+
sandbox: true,
6+
consumer_key: "72yw1nun6g1QQPPgOsAObCGSfuimGO7b",
7+
consumer_secret: "vRzZiD5RllMLIdLD",
8+
mpesa_short_code: "174379",
9+
mpesa_passkey: "bfb279f9aa9bdbcf158e97dd71a467cd2e0c893059b10f78e6b72ada1ed2c919",
10+
mpes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a6wvcbc4ewguN1UDZvPWetSyfBk10Wbpor4znQ4TJ3Y9uCvsJH\n41ldblDvZZ2z4kB2UYQ7iBkPlJSxSOaFgW/GGDXq49sz/995xzhVITHxh2SdLkI=\n-----END CERTIFICATE-----\n",
13+
b2b: [
14+
short_code: "600247",
15+
initiator_name: "John Doe",
16+
password: "Safaricom133",
17+
timeout_url: "https://58cb49b30213.ngrok.io/b2b/timeout_url",
18+
result_url: "https://58cb49b30213.ngrok.io/b2b/result_url",
19+
# Leace blank to increase util test coverage
20+
security_credential: ""
21+
],
22+
b2c: [
23+
short_code: "600247",
24+
initiator_name: "John Doe",
25+
password: "Safaricom133",
26+
timeout_url: "https://58cb49b30213.ngrok.io/b2c/timeout_url",
27+
result_url: "https://58cb49b30213.ngrok.io/b2c/result_url"
28+
],
29+
balance: [
30+
short_code: "600247",
31+
initiator_name: "Safaricom1",
32+
password: "Safaricom133",
33+
timeout_url: "https://58cb49b30213.ngrok.io/b2b/timeout_url",
34+
result_url: "https://58cb49b30213.ngrok.io/b2b/result_url",
35+
security_credential:
36+
"kxlZ1Twlfr6xQru0GId03LbegvuTPelnz3qITkvUJxaCTQt1HaD2hN801Pgbi38x6dEq/hsanBBtfj6JbePayipE/srOyMQ61ieiO+5uHb/JX/NLi1Jy6Alvi0hKbCbq9cVwC/bZBhli7AUAtpfKVgIyXq2InNyfzXpzR8FhrbXiaMhTPJ8WleozPm5CnXe2bFlFP7K0yhCRlT+UOPl7xh0LqU23rMTj3TN/ms600c3j/m2FxQZdmY5/rdORrJeTQV1vw6kXr1QrGaSDSdRMUiaGbg5uPL8LSNwC5bn3M92oPY2cWmkyH9rOzbCN+o5+23TvweaKZlrKuv7etKXMFg=="
37+
],
38+
transaction_status: [
39+
initiator_name: "John Doe",
40+
password: "Safaricom133",
41+
timeout_url: "https://58cb49b30213.ngrok.io/transaction/timeout_url",
42+
result_url: "https://58cb49b30213.ngrok.io/transaction/result_url",
43+
security_credential:
44+
"kxlZ1Twlfr6xQru0GId03LbegvuTPelnz3qITkvUJxaCTQt1HaD2hN801Pgbi38x6dEq/hsanBBtfj6JbePayipE/srOyMQ61ieiO+5uHb/JX/NLi1Jy6Alvi0hKbCbq9cVwC/bZBhli7AUAtpfKVgIyXq2InNyfzXpzR8FhrbXiaMhTPJ8WleozPm5CnXe2bFlFP7K0yhCRlT+UOPl7xh0LqU23rMTj3TN/ms600c3j/m2FxQZdmY5/rdORrJeTQV1vw6kXr1QrGaSDSdRMUiaGbg5uPL8LSNwC5bn3M92oPY2cWmkyH9rOzbCN+o5+23TvweaKZlrKuv7etKXMFg=="
45+
],
46+
reversal: [
47+
short_code: "600247",
48+
initiator_name: "Jane Doe",
49+
password: "superStrong@1",
50+
timeout_url: "https://58cb49b30213.ngrok.io/reversal/timeout_url",
51+
result_url: "https://58cb49b30213.ngrok.io/reversal/result_url",
52+
security_credential:
53+
"kxlZ1Twlfr6xQru0GId03LbegvuTPelnz3qITkvUJxaCTQt1HaD2hN801Pgbi38x6dEq/hsanBBtfj6JbePayipE/srOyMQ61ieiO+5uHb/JX/NLi1Jy6Alvi0hKbCbq9cVwC/bZBhli7AUAtpfKVgIyXq2InNyfzXpzR8FhrbXiaMhTPJ8WleozPm5CnXe2bFlFP7K0yhCRlT+UOPl7xh0LqU23rMTj3TN/ms600c3j/m2FxQZdmY5/rdORrJeTQV1vw6kXr1QrGaSDSdRMUiaGbg5uPL8LSNwC5bn3M92oPY2cWmkyH9rOzbCN+o5+23TvweaKZlrKuv7etKXMFg=="
54+
]

0 commit comments

Comments
 (0)