Skip to content

Commit ec237e6

Browse files
authored
Merge pull request #1 from openpesa/main
Update repository
2 parents a4a7242 + 18ecce4 commit ec237e6

16 files changed

Lines changed: 438 additions & 197 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
/.scrutinizer.yml export-ignore
1010
/tests export-ignore
1111
/docs export-ignore
12+
/art export-ignore
1213
/.editorconfig export-ignore

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ coverage
77
.idea
88
/examples/http-client.private.env.json
99
/examples/my-simple.php
10+
.phpunit.result.cache

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"cSpell.words": [
3+
"Openpesa",
4+
"Pesa",
5+
"phpseclib"
6+
]
7+
}

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
# Changelog
22

3-
All notable changes to `pesa` will be documented in this file
3+
All notable changes to `php-pesa` will be documented in this file
4+
5+
6+
## 0.1.0 - 2020-10-12
7+
8+
9+
### Add
10+
- Support for PHP v8
11+
- Support for phpunit v9
12+
- Improve enviroment configs
13+
- Revamp Documentation
14+
- Switch from Travis CI to Github Actions for CI/CD
15+
16+
17+
18+
## 0.0.3 - 2020-10-19
19+
20+
- Minor bug fixes
21+
- Support for Guzzle v7 and v7
22+
423

524
## 0.0.1 - 2020-10-12
625

README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,46 @@
1-
# Pesa SDK for PHP
1+
<p align="center"><img src="./art/Openpesa_PHP.png"/></p>
2+
<h1 align="center">Pesa SDK for PHP</h1>
3+
<br/>
24

3-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/openpesa/pesa.svg?style=flat-square&?include_prereleases)](https://packagist.org/packages/openpesa/pesa)
5+
> <h1>Version 2 | Work in Progress 🚧</h1>
46
7+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/openpesa/pesa.svg?style=flat-square&?include_prereleases)](https://packagist.org/packages/openpesa/pesa)
58
![Test](https://github.com/openpesa/php-pesa/workflows/Test/badge.svg)
69
![documentation](https://github.com/openpesa/php-pesa/workflows/documentation/badge.svg)
10+
[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fopenpesa%2Fphp-pesa&count_bg=%2379C83D&title_bg=%23555555&icon=codeigniter.svg&icon_color=%23E7E7E7&title=hits&edge_flat=true)](https://hits.seeyoufarm.com)
711
[![codecov.io](https://img.shields.io/codecov/c/github/openpesa/php-pesa/main?style=flat-square)](https://codecov.io/github/openpesa/php-pesa)
812
[![Total Downloads](https://img.shields.io/packagist/dt/openpesa/pesa.svg?style=flat-square)](https://packagist.org/packages/openpesa/pesa)
913

1014
The **Pesa SDK for PHP** makes it easy for developers to access [OpenAPI](https://openapiportal.m-pesa.com/) in their PHP code, and build robust applications and software using services like Customber 2 Bussiness, Query etc.
1115

1216
## Documentation
1317

14-
Take a look at the [API docs here](https://php-pesa.netlify.app/).
18+
Take a look at the [API docs here](https://openpesa.github.io/php-pesa/).
1519

1620
## Getting Started
1721

1822
1. **Sign up for OpenAPI Portal** – Before you begin, you need to
1923
sign up for an account and retrieve your credentials.
2024

2125
1. **Minimum requirements** – To run the SDK, your system will need to meet the
22-
[minimum requirements](https://php-pesa.netlify.app/docs/requirements.html), including having **PHP >= 7.1**.
23-
<!-- We highly recommend having it compiled with the cURL extension and cURL
24-
7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL). -->
26+
[minimum requirements](https://openpesa.github.io/php-pesa/guide/installation#system-requirements), including having **PHP >= 7.1**.
27+
<!-- We highly recommend having it compiled with the cURL extension and cURL
28+
7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL). -->
2529
1. **Install the SDK** – Using [Composer] is the recommended way to install the
2630
Pesa SDK for PHP. The SDK is available via [Packagist] under the
2731
[`openpesa/php-pesa`](https://packagist.org/packages/openpesa/pesa) package. If Composer is installed globally on your system, you can run the following in the base directory of your project to add the SDK as a dependency:
2832
```sh
2933
composer require openpesa/pesa
3034
```
3135
Please see the
32-
[Installation section of the User Guide](https://php-pesa.netlify.app/docs/installation.html) for more
36+
[Installation section of the User Guide](https://openpesa.github.io/php-pesa/guide/installation) for more
3337
detailed information about installing the SDK through Composer and other
3438
means.
3539
1. **Using the SDK** – The best way to become familiar with how to use the SDK
36-
is to read the [User Guide](https://php-pesa.netlify.app/docs/guide.html).
40+
is to read the [User Guide](https://openpesa.github.io/php-pesa/guide/quick_guide).
3741

38-
<!-- The [Getting Started Guide](#) will help you become familiar with
39-
the basic concepts. -->
42+
<!-- The [Getting Started Guide](#) will help you become familiar with
43+
the basic concepts. -->
4044

4145
## Usage
4246

@@ -53,7 +57,7 @@ $pesa = new Pesa([
5357
'api_key' => 'YOUR_API_KEY',
5458
'public_key' => 'PUBLIC_KEY',
5559
'client_options' => [],
56-
]);
60+
],'sandbox');
5761
5862
// Setup the transaction
5963
$data = [
@@ -87,6 +91,15 @@ composer test
8791

8892
If you have a feature requrest or you encounter a bug, please file an issue on [our issue tracker on GitHub](https://github.com/openpesa/php-pesa/issues).
8993

94+
## Resources
95+
96+
* [User Guide](https://openpesa.github.io/php-pesa/) – For both getting started and in-depth SDK usage information
97+
* [API Docs](https://openapiportal.m-pesa.com/) – For details about operations, parameters, and responses
98+
* [Blog](https://openpesa.github.io/blog/) – Tips & tricks, articles, and announcements
99+
* [Sample Project](https://github.com/alphaolomi/laravel-pesa-demo) - A quick, sample project to help get you started
100+
* [Issues](https://github.com/openpesa/php-pesa/issues) – Report issues, submit pull requests, and get involved
101+
* [@openpesa](https://twitter.com/openpesa) – Follow us on Twitter
102+
90103
### Changelog
91104

92105
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

art/Openpesa_PHP.png

55.5 KB
Loading

composer.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
"description": "Pesa PHP SDK",
44
"keywords": [
55
"api",
6-
"openpesa",
7-
"pesa"
6+
"mobile-money",
7+
"tanzania",
8+
"pesa",
9+
"pesa-sdk",
10+
"pesa-sdk-php",
11+
"openpesa"
812
],
913
"homepage": "https://github.com/openpesa/pesa",
1014
"license": "MIT",
@@ -22,14 +26,14 @@
2226
}
2327
],
2428
"require": {
25-
"php": "^7.1|^8.0",
26-
"guzzlehttp/guzzle": "^6.0|^7.0",
27-
"phpseclib/phpseclib": "^2.0",
29+
"php": "^7.2|^8.0",
2830
"ext-json": "*",
29-
"ext-openssl": "*"
31+
"ext-openssl": "*",
32+
"guzzlehttp/guzzle": "^6.0|^7.4",
33+
"phpseclib/phpseclib": "~3.0"
3034
},
3135
"require-dev": {
32-
"phpunit/phpunit": "^7.0|^9.5"
36+
"phpunit/phpunit": "^8.5|^9.5"
3337
},
3438
"autoload": {
3539
"psr-4": {

examples/api.http

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/pesa-demo/composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Simple SDK usage",
44
"type": "project",
55
"require": {
6-
"php": ">=7.1",
7-
"openpesa/pesa": "dev-develop"
6+
"openpesa/pesa": "^0.0.7"
87
},
98
"license": "MIT",
109
"authors": [
@@ -13,4 +12,4 @@
1312
"email": "alphaolomi@gmail.com"
1413
}
1514
]
16-
}
15+
}

examples/pesa-demo/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
'input_Country' => 'TZN',
1919
'input_Currency' => 'TZS',
2020
'input_ServiceProviderCode' => '000000',
21-
'input_TransactionReference' => 'T12344Z',
22-
'input_ThirdPartyConversationID' => '1e9b774d1da34af78412a498cbc28f5d',
21+
'input_TransactionReference' => 'T12644Z',
22+
'input_ThirdPartyConversationID' => '1g9b774d1da34af78412a498cbc28f5d',
2323
'input_PurchasedItemsDesc' => 'Test Three Item'
2424
];
2525

0 commit comments

Comments
 (0)