Skip to main content

Zibal payment platform

Project description

Zibal Payment Gateway

N|Zibal

Installation

Zibal Platform pacakge requires Requests to run.

Install the package using pip

$ pip install zibalPlatform

For upgrading to newer versions

$ pip install zibalPlatform --upgrade

Usage

You can access Zibal.ir platform API using this package. Also you can use this package to translate the result codes to printable messages. Pass your "access-token" while creating a zibalPlatform instance.

Below is an example of how you can use this package to access 'wallet/list' endpoint

import zibalPlatform.zibalPlatform as zibalPlatform

access_token = 'Your access-token'
platform_endpoint = 'v1/wallet/balance'

zb = zibalPlatform.zibalPlatform(access_token)
data = {
    "id": "1010101",
}

request_to_zibal = zb.sendRequestToZibal(path=platform_endpoint, parameters=data)

Now you can access the parameters like this example

result_code = request_to_zibal['result']

Pass the result code to the translator function "platform_result(result_code)" to receive printable output Python3 example:

print(zb.platform_result(result_code))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zibalPlatform-1.0.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

zibalPlatform-1.0.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page