-
Notifications
You must be signed in to change notification settings - Fork 2
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
0 parents
commit 34a0082
Showing
14 changed files
with
944 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
my_env/ | ||
dist/ | ||
.env | ||
__pycache__/ | ||
chargily_pay.egg-info/ | ||
.pytest_cache/ | ||
.pypirc |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"python.analysis.autoImportCompletions": true, | ||
"python.testing.unittestArgs": [ | ||
"-v", | ||
"-s", | ||
"./tests", | ||
"-p", | ||
"test_*.py" | ||
], | ||
"python.testing.pytestEnabled": false, | ||
|
||
"python.testing.unittestEnabled": true, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
MIT License | ||
Copyright (c) 2018 YOUR NAME | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include README.md | ||
include LICENSE |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# chargily-pay V2 | ||
Chargily ePay Gateway (Python Library) for Chargily API V2 | ||
|
||
![Chargily ePay Gateway](https://raw.githubusercontent.com/Chargily/epay-gateway-php/main/assets/banner-1544x500.png "Chargily ePay Gateway") | ||
|
||
This Plugin is to integrate ePayment gateway with Chargily easily. | ||
- Currently support payment by **CIB / EDAHABIA** cards and soon by **Visa / Mastercard** | ||
- This repo is recently created for **Python Library**, If you are a developer and want to collaborate to the development of this library, you are welcomed! | ||
|
||
## installation | ||
```bash | ||
pip install chargily-pay | ||
``` | ||
|
||
## Usage | ||
```python | ||
from chargily_pay import ChargilyClient | ||
from chargily_pay.settings import CHARGILIY_TEST_URL | ||
from chargily_pay.entity import Checkout | ||
|
||
import requests | ||
|
||
key = "YOUR_KEY" | ||
secret = "YOUR_SECRET" | ||
|
||
chargily = ChargilyClient(key, secret, CHARGILIY_TEST_URL) | ||
|
||
|
||
print(chargily.get_balance()) | ||
``` | ||
|
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.PHONY: test | ||
|
||
test: | ||
python -m unittest discover -s tests -p 'test_*.py' | ||
|
||
build: | ||
python -m build | ||
|
||
publish: | ||
python -m twine upload dist/* |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "chargily_pay" | ||
version = "0.1.1" | ||
authors = [{ name = "Berkane Tarek", email = "[email protected]" }] | ||
description = "This Plugin is to integrate ePayment gateway with Chargily V2 easily." | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
keywords = ["chargily", "api", "payment"] | ||
license = { text = "MIT" } | ||
classifiers = ["Programming Language :: Python :: 3"] | ||
dependencies = ["requests==2.31"] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] # ["."] by default | ||
exclude = ["chargily_pay.egg-info", "__pycache__", "tests"] |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
from .api import ChargilyClient |
Oops, something went wrong.