shurjopay version 2 payment gateway integration package for python users.
Project description
ShurjoPay
shurjopay python integration steps
Prerequisite
To integrate ShurjoPay you need few credentials to access shurjopay:
:param prefix: Any string not more than 5 characters. It distinguishes the stores of a merchant.
:param currency: ISO format,(only BDT and USD are allowed).
:param return_url: Merchant should provide a GET Method return url to verify users initiated transaction status.
:param cancel_url: Merchant should provide a cancel url to redirect the user if he/she cancels the transaction in midway.
:param client_ip: User's ip
:param username: Merchant Username provided by shurjopay.
:param password: Merchant Password provided by shurjopay.
:param post_address: Live shurjopay version 2 URL.
📝 NOTE For shurjoPay version 2 live engine integration all necessary credential will be given to merchant after subscription completed on shurjoPay gateway.
prefix="SP"
currency="BDT"
Installation
Use the package manager pip to install Shuropay python package
pip install -i https://test.pypi.org/simple/ shurjopay-pkg-tareq
Usage
from shurjopay import shurjoPay
#initialize with the test credentials
testpay = shurjoPay.ShurjoPay(MERCHANT_USERNAME, MERCHANT_PASSWORD, SHURJOPAY_URL, DECRYPT_URL, MERCHANT_PREFIX)
now the payment transaction can be initiated and
send client_ip, transaction_id (note: transaction id should be an unique id with the given prefix for each request. For test environment you may use "NOK".), transaction_amount, return_url with the send_request method
spform = testpay.send_request('127.0.0.1', 'NOK151545452', 50, "http://127.0.0.1:8000/return_url/")
note*
This testpay.send_request() will return an HTML shurjopay form you need to render this in your application for your users to complete the transaction.
After success/faild transaction; Transaction information will be sent to your rutrun URL in encrypted format. You should be able to access those from spdata
To decrypt the transaction data from return url use get_decrypt() method
xml = testpay.get_decrypt(spdata)
note* this data will be in xml format; to convert it in json you can use any conversion method to parse.
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 shurjopay-V2-0.0.1.tar.gz.
File metadata
- Download URL: shurjopay-V2-0.0.1.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c81b9b4a578697cea7e1b0491a9b02f7659e1419b6621dc83b10d3bc31654973
|
|
| MD5 |
8f02b418309a0557015e304022b1374e
|
|
| BLAKE2b-256 |
bb3eb0be7c6852e460aec5cd83694ca6f5d078ec19bddb4db2c8f18c31f07424
|
File details
Details for the file shurjopay_V2-0.0.1-py3-none-any.whl.
File metadata
- Download URL: shurjopay_V2-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d7a5d7948bbbd080c27af53cae7f9e005febc11a783d68cb748714ac420aab8
|
|
| MD5 |
2622cc2fae81ce0c6bda90d82974a3ed
|
|
| BLAKE2b-256 |
2f1738f3bbfb38faffbd1c31bbb4dde4182a745487e8832bd506b74808f6bb0e
|