{"id":15044040,"url":"https://github.com/shurjopay-plugins/sp-plugin-python","last_synced_at":"2025-10-23T20:30:22.975Z","repository":{"id":65548664,"uuid":"548023157","full_name":"shurjopay-plugins/sp-plugin-python","owner":"shurjopay-plugins","description":"shurjoPay plugin for Python, django, flask, bottle, fastapi etc.","archived":false,"fork":false,"pushed_at":"2023-06-01T09:12:40.000Z","size":164,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-27T09:43:23.492Z","etag":null,"topics":["django","fastapi","flask","pypi-package","python","shurjomukhi","shurjopay"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shurjopay-plugins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-08T19:28:40.000Z","updated_at":"2023-04-26T10:16:52.000Z","dependencies_parsed_at":"2024-09-25T02:02:36.253Z","dependency_job_id":null,"html_url":"https://github.com/shurjopay-plugins/sp-plugin-python","commit_stats":{"total_commits":103,"total_committers":4,"mean_commits":25.75,"dds":0.09708737864077666,"last_synced_commit":"1d34e580ad464581ee4fa2f727bc3579ec08ad6e"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shurjopay-plugins%2Fsp-plugin-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shurjopay-plugins%2Fsp-plugin-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shurjopay-plugins%2Fsp-plugin-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shurjopay-plugins%2Fsp-plugin-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shurjopay-plugins","download_url":"https://codeload.github.com/shurjopay-plugins/sp-plugin-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867932,"owners_count":16555811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","fastapi","flask","pypi-package","python","shurjomukhi","shurjopay"],"created_at":"2024-09-24T20:49:59.491Z","updated_at":"2025-10-23T20:30:17.560Z","avatar_url":"https://github.com/shurjopay-plugins.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![alt text](https://shurjopay.com.bd/dev/images/shurjoPay.png) Python package (plugin)\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)\n[![Python](https://img.shields.io/pypi/pyversions/shurjopay-plugin)](https://badge.fury.io/py/shurjopay-plugin)\n[![PyPI version](https://badge.fury.io/py/shurjopay-plugin.svg)](https://badge.fury.io/py/shurjopay-plugin)\n[![PyPi license](https://badgen.net/pypi/license/pip/)](https://pypi.com/project/pip/)\n\nOfficial shurjoPay python package (plugin) for merchants or service providers to connect with shurjoPay Payment Gateway v2.1 developed and maintained by shurjoMukhi Limited.\n\nThis plugin package can be used with any python application or framework (e.g. django, flask, FastAPI etc.).\n\nThis plugin package makes it easy for you to integrate with shurjoPay v2.1 with just three method calls:\n\n- make_payment()\n- verify_payment()\n\nAlso reduces many of the things that you had to do manually\n\n- Handles http request and errors\n- JSON serialization and deserialization\n- Authentication during checkout and verification of payments\n\n## Audience\n\nThis document is intended for the developers and technical personnel of merchants and service providers who want to integrate the shurjoPay online payment gateway using python.\n\n## How to use this shurjoPay Plugin\n\n#### Use `pip` to install this plugin inside your project environment.\n\n```\npip install shurjopay-plugin\n```\n\n#### Create a .env file inside your project's root directory. Here is a sample .env configuration.\n```\nSP_USERNAME=demo\nSP_PASSWORD=demowb4\u0026n$6un28$\nSP_ENDPOINT=https://dev.engine.shurjopayment.com\nSP_RETURN=https://dev.engine.shurjopayment.com/response\nSP_CANCEL=https://dev.engine.shurjopayment.com/response\nSP_LOGDIR=/var/log/shurjopay/shurjopay.log\nSP_PREFIX=SP_PLUGIN_PYTHON\n```\n#### After that, you can initiate payment request to shurjoPay using our package the way you want based on your application. Here we are providing a basic example code snippet for you.\n\n\n```python\nimport environ\nfrom shurjopay_plugin import *\nenv = environ.Env()\nenviron.Env.read_env('.env')\nsp_config = ShurjoPayConfigModel(\n    SP_USERNAME=env('SP_USERNAME'),\n    SP_PASSWORD=env('SP_PASSWORD'),\n    SP_ENDPOINT=env('SP_ENDPOINT'),\n    SP_RETURN=env('SP_RETURN'),\n    SP_CANCEL=env('SP_CANCEL'),\n    SP_PREFIX=env('SP_PREFIX'),\n    SP_LOGDIR=env('SP_LOGDIR')\n)\nshurjopay_plugin = ShurjopayPlugin(sp_config)\npayment_request = PaymentRequestModel(\n            amount=1000,\n            order_id='001',\n            currency='BDT',\n            customer_name='Mahabubul Hasan',\n            customer_address='Mohakhali',\n            customer_phone='01311310975',\n            customer_city='Dhaka',\n            customer_post_code='1229',\n        )\npayment_details = shurjopay_plugin.make_payment(payment_request)\n```\n\n#### Payment verification can be done after each transaction with shurjopay order id.\n\n```python\nshurjopay_plugin.verify_payment(order_id)\n```\n\n#### That's all! Now you are ready to use the python plugin to seamlessly integrate with shurjoPay to make your payment system easy and smooth.\n\n## References\n1. [Django example application](https://github.com/shurjopay-plugins/sp-plugin-usage-examples/tree/dev/django-app-python-plugin) showing usage of the python plugin.\n2. [Sample applications and projects](https://github.com/shurjopay-plugins/sp-plugin-usage-examples) in many different languages and frameworks showing shurjopay integration.\n3. [shurjoPay Postman site](https://documenter.getpostman.com/view/6335853/U16dS8ig) illustrating the request and response flow using the sandbox system.\n4. [shurjopay Plugins](https://github.com/shurjopay-plugins) home page on github\n\n## License\nThis code is under the [MIT open source License](LICENSE).\n#### Please [contact](https://shurjopay.com.bd/#contacts) with shurjoPay team for more detail.\n### Copyright ©️2022 [ShurjoMukhi Limited](https://shurjopay.com.bd/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshurjopay-plugins%2Fsp-plugin-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshurjopay-plugins%2Fsp-plugin-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshurjopay-plugins%2Fsp-plugin-python/lists"}