ekata-gateway-processor-helper-0.1.9
توضیحات
Backend helper functions for ekata gateway processor
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | ekata-gateway-processor-helper-0.1.9 |
| نام | ekata-gateway-processor-helper |
| نسخه کتابخانه | 0.1.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | EkataIO Wizard |
| ایمیل نویسنده | support@ekata.io |
| آدرس صفحه اصلی | https://ekata.io |
| آدرس اینترنتی | https://pypi.org/project/ekata-gateway-processor-helper/ |
| مجوز | MIT |
### Ekata Gateway Processor backend helper functions
#### Create form id
Use this function to create a form id from your backend, if successful it will return `form_id` and `created_on`.
```python
from ekata_gateway_processor_helper import create_payment_form
from ekata_gateway_processor_helper.exceptions import (
InvalidAPIKeyException, InvalidProjectException, NoEnabledCurrencyException,
InvalidArgumentsException
)
try:
form_id, created_on = create_payment_form(
amount=int(Decimal(amount) * 100) # Always provide in atomic amount of fiat currency,
fiat_currency='USD',
project_id='',
api_key=''
)
except InvalidProjectException as e:
print(e.message)
except InvalidAPIKeyException as e:
print(e.message)
except NoEnabledCurrencyException as e:
print(e.message)
except InvalidArgumentsException as e:
print(e.arguments)
```
#### Verify payment payload
Use this function to verify payment payload received after successful payment
```python
from ekata_gateway_processor_helper import verify_payload
if verify_payload(
payload='' # payload received from frontend or webhook,
signature_secret='' #payment signature secret
):
# Proceed with checkout, like send success message to frontend etc
```
نیازمندی
| مقدار | نام |
|---|---|
| >=2.27.1,<3.0.0 | requests |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6,<4.0 | Python |
نحوه نصب
نصب پکیج whl ekata-gateway-processor-helper-0.1.9:
pip install ekata-gateway-processor-helper-0.1.9.whl
نصب پکیج tar.gz ekata-gateway-processor-helper-0.1.9:
pip install ekata-gateway-processor-helper-0.1.9.tar.gz