-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
8 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,4 +1,4 @@ | ||
# Unofficial laravel package for Chapa's API | ||
# Unofficial laravel package for Chapa's API (Laravel 5,6,7,9 ) | ||
|
||
If your are doing a laravel project and want to integrate chapa's payment | ||
solution, this package would help big time. | ||
|
@@ -9,15 +9,34 @@ Go to [Chapa](https://dashboard.chapa.co/) to signup and get your public and pri | |
|
||
Please visit [Chapa](https://developer.chapa.co/docs/accept-payments/) for full documentation. | ||
|
||
|
||
## Guide | ||
|
||
Please visit [Developers Guide](https://developer.chapa.co/laravel-sdk/) for full guide and examples. | ||
|
||
### Usage | ||
|
||
You can check [this](https://github.com/Chapa-Et/sdk-examples/tree/master/chapa-laravel-example) sample laravel code as a reference. | ||
|
||
### Configuration | ||
|
||
Open your .env file and add your public key, secret keys, and other environment variables like this: | ||
|
||
``` | ||
CHAPA_PUBLIC_KEY=FLWPUBK-xxxxxxxxxxxxxxxxxxxxx-X | ||
CHAPA_SECRET_KEY=FLWSECK-xxxxxxxxxxxxxxxxxxxxx-X | ||
CHAPA_WEBHOOK_SECRET='My_webook_secret_key123' | ||
``` | ||
|
||
## Features | ||
|
||
The current features have been implemented | ||
|
||
- Initiate Payment | ||
- Payment verification verification | ||
|
||
## API Reference | ||
|
||
#### Collecting Customer Information | ||
### Collecting Customer Information | ||
|
||
```https | ||
POST https://api.chapa.co/v1/transaction/initialize | ||
|
@@ -36,6 +55,16 @@ Please visit [Developers Guide](https://developer.chapa.co/laravel-sdk/) for ful | |
| `customization[tiitle] ` | `string` | **No**. | The customizations field (optional) allows you to customize the look and feel of the payment modal. You can set a logo, the store name to be displayed (title), and a description for the payment.. | | ||
| `customization[description]` | `string` | **No**. | The customizations field (optional) allows you to customize the look and feel of the payment modal. | | ||
|
||
### Verify Payments | ||
|
||
```https | ||
GET https://api.chapa.dev/v1/transaction/verify/{tx-ref} | ||
``` | ||
|
||
| Parameter | Type | Required | Description | | ||
| :-------- | :------- | :------- | :------------------------------------------------------------------------------------------------------------------- | | ||
| `key` | `string` | **Yes**. | This will be your public key from Chapa. When on test mode use the test key, and when on live mode use the live key. | | ||
|
||
### Changelog | ||
|
||
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. | ||
|
@@ -44,11 +73,6 @@ Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recen | |
|
||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. | ||
|
||
## Credits | ||
|
||
- [kidus363](https://github.com/chapa) | ||
- [isrugeek](https://github.com/chapa) | ||
|
||
## License | ||
|
||
The MIT License (MIT). Please see [License File](LICENSE.md) for more information. |