Python SDK for maib ecommerce API
Project description
Python SDK for maib ecommerce API
- maib e-commerce API docs: https://docs.maibmerchants.md/e-commerce/
- GitHub project https://github.com/alexminza/maib-ecommerce-sdk-python
- PyPI package https://pypi.org/project/maib-ecommerce-sdk/
Installation
To easily install or upgrade to the latest release, use pip:
pip install --upgrade maib-ecommerce-sdk
Getting started
Import SDK:
from maib_ecommerce_sdk import MaibAuthRequest, MaibApiRequest
Add project configuration:
import os
MAIB_PROJECT_ID = os.getenv('MAIB_PROJECT_ID')
MAIB_PROJECT_SECRET = os.getenv('MAIB_PROJECT_SECRET')
MAIB_SIGNATURE_KEY = os.getenv('MAIB_SIGNATURE_KEY')
SDK usage examples
Get Access Token with Project ID and Project Secret
maib_auth = MaibAuthRequest.create().generate_token(MAIB_PROJECT_ID, MAIB_PROJECT_SECRET)
maib_token = maib_auth['accessToken']
maib_refresh_token = maib_auth['refreshToken']
Get Access Token with Refresh Token
maib_auth = MaibAuthRequest.create().generate_token(maib_refresh_token)
maib_token = maib_auth['accessToken']
maib_refresh_token = maib_auth['refreshToken']
Direct Payment
# Set up required payment parameters
maib_pay_data = {
'amount': 10.25,
'currency': 'EUR',
'clientIp': '127.0.0.1'
}
# Initiate Direct Payment
maib_pay = MaibApiRequest.create().pay(maib_pay_data, maib_token)
maib_pay_url = maib_pay['payUrl']
maib_pay_id = maib_pay['payId']
For more examples see PHP SDK for maib ecommerce API
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maib_ecommerce_sdk-1.1.4.tar.gz.
File metadata
- Download URL: maib_ecommerce_sdk-1.1.4.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ca4b6b435a520cd27da512157194f5410e303f009d6f585fe3b1ed2071e767b
|
|
| MD5 |
4253b3f0dedf7f84e3c69380a072c512
|
|
| BLAKE2b-256 |
4a2b57b4b6f0523e8afcfcf072104aa1e819a9d9631e309857136f741b9ff699
|
Provenance
The following attestation bundles were made for maib_ecommerce_sdk-1.1.4.tar.gz:
Publisher:
action-pypi-publish.yml on alexminza/maib-ecommerce-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maib_ecommerce_sdk-1.1.4.tar.gz -
Subject digest:
9ca4b6b435a520cd27da512157194f5410e303f009d6f585fe3b1ed2071e767b - Sigstore transparency entry: 571578051
- Sigstore integration time:
-
Permalink:
alexminza/maib-ecommerce-sdk-python@a8276ad9db0b56c681cfc349ba3018782fe3c8e2 -
Branch / Tag:
refs/tags/v1.1.4 - Owner: https://github.com/alexminza
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
action-pypi-publish.yml@a8276ad9db0b56c681cfc349ba3018782fe3c8e2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file maib_ecommerce_sdk-1.1.4-py3-none-any.whl.
File metadata
- Download URL: maib_ecommerce_sdk-1.1.4-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f2ab9baf3322f0569505a59393ca8b7a9de3874139c401d1d7b32561a8688b6
|
|
| MD5 |
2127599e4775d9a5db6a84e670420a75
|
|
| BLAKE2b-256 |
3d4fae51c42a440de4ff7997c24fad7533ba0b4273e8e8ee3b16787bf1168e32
|
Provenance
The following attestation bundles were made for maib_ecommerce_sdk-1.1.4-py3-none-any.whl:
Publisher:
action-pypi-publish.yml on alexminza/maib-ecommerce-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maib_ecommerce_sdk-1.1.4-py3-none-any.whl -
Subject digest:
4f2ab9baf3322f0569505a59393ca8b7a9de3874139c401d1d7b32561a8688b6 - Sigstore transparency entry: 571578056
- Sigstore integration time:
-
Permalink:
alexminza/maib-ecommerce-sdk-python@a8276ad9db0b56c681cfc349ba3018782fe3c8e2 -
Branch / Tag:
refs/tags/v1.1.4 - Owner: https://github.com/alexminza
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
action-pypi-publish.yml@a8276ad9db0b56c681cfc349ba3018782fe3c8e2 -
Trigger Event:
push
-
Statement type: