pysslcmz


Namepysslcmz JSON
Version 1.1.3 PyPI version JSON
download
home_pagehttps://github.com/piecoders/pyssl
SummaryImplements SSLCOMMERZ payment gateway in python based web apps (python 3.8+).
upload_time2023-05-26 21:49:34
maintainer
docs_urlNone
authorPiecoders IT Solutions
requires_python>=3.8,<4.0
licenseMIT
keywords sslcommerz sslcommerz sslcommerz bkash nagod upai rocket
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SSLCOMMERZ Payment Gateway implementation in Python
Provides a python module to implement payment gateway in python based web apps.

## Installation
Via PIP
```bash
pip install pysslcmz
```
## Projected use
```python
from pysslcmz.payment import SSLCSession
from decimal import Decimal

mypayment = SSLCSession(sslc_is_sandbox=True, sslc_store_id='your_sslc_store_id', sslc_store_pass='your_sslc_store_passcode')

mypayment.set_urls(success_url='example.com/success', fail_url='example.com/failed', cancel_url='example.com/cancel', ipn_url='example.com/payment_notification')

mypayment.set_product_integration(total_amount=Decimal('20.20'), currency='BDT', product_category='clothing', product_name='demo-product', num_of_item=2, shipping_method='YES', product_profile='None')

mypayment.set_customer_info(name='John Doe', email='johndoe@email.com', address1='demo address', address2='demo address 2', city='Dhaka', postcode='1207', country='Bangladesh', phone='01711111111')

mypayment.set_shipping_info(shipping_to='demo customer', address='demo address', city='Dhaka', postcode='1209', country='Bangladesh')

# If you want to post some additional values
mypayment.set_additional_values(value_a='cusotmer@email.com', value_b='portalcustomerid', value_c='1234', value_d='uuid')

response_data = mypayment.init_payment()
```

## Response parameters
### When Successfull with Auth and Payloads provided
> status

> sessionkey

> GatewayPageURL

#### Example
```python
>>> response_data['status']
SUCCESS
>>> response_data['sessionkey']
F650E87F23DD2A8FFCB4E4E333C13B28
>>> response_data['GatewayPageURL']
https://sandbox.sslcommerz.com/EasyCheckOut/testcdef650e87f23dd2a8ffcb4234fasf3b28
```

### When Failed
> status

> failedreason

#### Example
```python
>>> response_data['status']
FAILED
>>> response_data['failedreason']
'Store Credential Error Or Store is De-active'
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/piecoders/pyssl",
    "name": "pysslcmz",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "SSLCommerz,sslcommerz,SSLCOMMERZ,bkash,nagod,upai,rocket",
    "author": "Piecoders IT Solutions",
    "author_email": "piecodersit@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7b/08/9d36d85e5811021666d3dc429b4f742582bbe9a4ebd4a345deea4f476611/pysslcmz-1.1.3.tar.gz",
    "platform": null,
    "description": "# SSLCOMMERZ Payment Gateway implementation in Python\nProvides a python module to implement payment gateway in python based web apps.\n\n## Installation\nVia PIP\n```bash\npip install pysslcmz\n```\n## Projected use\n```python\nfrom pysslcmz.payment import SSLCSession\nfrom decimal import Decimal\n\nmypayment = SSLCSession(sslc_is_sandbox=True, sslc_store_id='your_sslc_store_id', sslc_store_pass='your_sslc_store_passcode')\n\nmypayment.set_urls(success_url='example.com/success', fail_url='example.com/failed', cancel_url='example.com/cancel', ipn_url='example.com/payment_notification')\n\nmypayment.set_product_integration(total_amount=Decimal('20.20'), currency='BDT', product_category='clothing', product_name='demo-product', num_of_item=2, shipping_method='YES', product_profile='None')\n\nmypayment.set_customer_info(name='John Doe', email='johndoe@email.com', address1='demo address', address2='demo address 2', city='Dhaka', postcode='1207', country='Bangladesh', phone='01711111111')\n\nmypayment.set_shipping_info(shipping_to='demo customer', address='demo address', city='Dhaka', postcode='1209', country='Bangladesh')\n\n# If you want to post some additional values\nmypayment.set_additional_values(value_a='cusotmer@email.com', value_b='portalcustomerid', value_c='1234', value_d='uuid')\n\nresponse_data = mypayment.init_payment()\n```\n\n## Response parameters\n### When Successfull with Auth and Payloads provided\n> status\n\n> sessionkey\n\n> GatewayPageURL\n\n#### Example\n```python\n>>> response_data['status']\nSUCCESS\n>>> response_data['sessionkey']\nF650E87F23DD2A8FFCB4E4E333C13B28\n>>> response_data['GatewayPageURL']\nhttps://sandbox.sslcommerz.com/EasyCheckOut/testcdef650e87f23dd2a8ffcb4234fasf3b28\n```\n\n### When Failed\n> status\n\n> failedreason\n\n#### Example\n```python\n>>> response_data['status']\nFAILED\n>>> response_data['failedreason']\n'Store Credential Error Or Store is De-active'\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Implements SSLCOMMERZ payment gateway in python based web apps (python 3.8+).",
    "version": "1.1.3",
    "project_urls": {
        "Homepage": "https://github.com/piecoders/pyssl",
        "Repository": "https://github.com/piecoders/pyssl"
    },
    "split_keywords": [
        "sslcommerz",
        "sslcommerz",
        "sslcommerz",
        "bkash",
        "nagod",
        "upai",
        "rocket"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a0496ee82faf60bb502a453cc026faaae2dd827dff4440c35eb28cdb7e95dfa1",
                "md5": "4adf77824d18c781db1eb28c6fbaea3c",
                "sha256": "c5a729d5c6cc9f3ecd0c46a4ab0f93b6debdc4bc2f683f76710e2e47432c1448"
            },
            "downloads": -1,
            "filename": "pysslcmz-1.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4adf77824d18c781db1eb28c6fbaea3c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 5619,
            "upload_time": "2023-05-26T21:49:32",
            "upload_time_iso_8601": "2023-05-26T21:49:32.596624Z",
            "url": "https://files.pythonhosted.org/packages/a0/49/6ee82faf60bb502a453cc026faaae2dd827dff4440c35eb28cdb7e95dfa1/pysslcmz-1.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7b089d36d85e5811021666d3dc429b4f742582bbe9a4ebd4a345deea4f476611",
                "md5": "79a9dd0097b70915d15491b2591aca5a",
                "sha256": "fc1e8e013a9e8dc500748eb7efc0a6e3bb9073e6913a76bb914e8dd2d7ae1681"
            },
            "downloads": -1,
            "filename": "pysslcmz-1.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "79a9dd0097b70915d15491b2591aca5a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 4056,
            "upload_time": "2023-05-26T21:49:34",
            "upload_time_iso_8601": "2023-05-26T21:49:34.616436Z",
            "url": "https://files.pythonhosted.org/packages/7b/08/9d36d85e5811021666d3dc429b4f742582bbe9a4ebd4a345deea4f476611/pysslcmz-1.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-26 21:49:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "piecoders",
    "github_project": "pyssl",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pysslcmz"
}
        
Elapsed time: 0.08203s