festpay-sdk


Namefestpay-sdk JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/festpay/paymentpage-sdk-python
Summary
upload_time2022-12-16 11:12:29
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            [![Build Status](https://travis-ci.com/festpay/paymentpage-sdk-python.svg?branch=main)](https://travis-ci.com/festpay/paymentpage-sdk-python)

# FestPay payment page SDK

This is a set of libraries in the Python language to ease integration of your service
with the Payment Page.

Please note that for correct SDK operating you must have at least Python 3.5.  

## Payment flow

![Payment flow](flow.png)

## Installation

Install with pip
```bash
pip install festpay-sdk
```

### Get URL for payment

```python
from payment_page_sdk.gate import Gate
from payment_page_sdk.payment import Payment

gate = Gate('secret')
payment = Payment('402')
payment.payment_id = 'some payment id'
payment.payment_amount = 1001
payment.payment_currency = 'USD'
payment_url = gate.get_purchase_payment_page_url(payment)
``` 

`payment_url` here is the signed URL.

### Handle callback from FestPay

You'll need to autoload this code in order to handle notifications:

```python
from payment_page_sdk.gate import Gate

gate = Gate('secret')
callback = gate.handle_callback(data)
```

`data` is the JSON data received from payment system;

`callback` is the Callback object describing properties received from payment system;
`callback` implements these methods: 
1. `callback.get_payment_status()`
    Get payment status.
2. `callback.get_payment()`
    Get all payment data.
3. `callback.get_payment_id()`
    Get payment ID in your system.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/festpay/paymentpage-sdk-python",
    "name": "festpay-sdk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "sdk@festpay.ru",
    "download_url": "https://files.pythonhosted.org/packages/ea/8c/e3328d8de32cf4a5446a645ca0d2964d3ae18cb414465e714d5b866bab3d/festpay-sdk-1.0.1.tar.gz",
    "platform": null,
    "description": "[![Build Status](https://travis-ci.com/festpay/paymentpage-sdk-python.svg?branch=main)](https://travis-ci.com/festpay/paymentpage-sdk-python)\n\n# FestPay payment page SDK\n\nThis is a set of libraries in the Python language to ease integration of your service\nwith the Payment Page.\n\nPlease note that for correct SDK operating you must have at least Python 3.5.  \n\n## Payment flow\n\n![Payment flow](flow.png)\n\n## Installation\n\nInstall with pip\n```bash\npip install festpay-sdk\n```\n\n### Get URL for payment\n\n```python\nfrom payment_page_sdk.gate import Gate\nfrom payment_page_sdk.payment import Payment\n\ngate = Gate('secret')\npayment = Payment('402')\npayment.payment_id = 'some payment id'\npayment.payment_amount = 1001\npayment.payment_currency = 'USD'\npayment_url = gate.get_purchase_payment_page_url(payment)\n``` \n\n`payment_url` here is the signed URL.\n\n### Handle callback from FestPay\n\nYou'll need to autoload this code in order to handle notifications:\n\n```python\nfrom payment_page_sdk.gate import Gate\n\ngate = Gate('secret')\ncallback = gate.handle_callback(data)\n```\n\n`data` is the JSON data received from payment system;\n\n`callback` is the Callback object describing properties received from payment system;\n`callback` implements these methods: \n1. `callback.get_payment_status()`\n    Get payment status.\n2. `callback.get_payment()`\n    Get all payment data.\n3. `callback.get_payment_id()`\n    Get payment ID in your system.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "",
    "version": "1.0.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "17498b7a613e89270bfefe02d7cd4fd0",
                "sha256": "1c6bd8affb5697c6227c0c204487bb017efcad2f26ae59d4b84ea20dc5153ddb"
            },
            "downloads": -1,
            "filename": "festpay-sdk-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "17498b7a613e89270bfefe02d7cd4fd0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7098,
            "upload_time": "2022-12-16T11:12:29",
            "upload_time_iso_8601": "2022-12-16T11:12:29.500057Z",
            "url": "https://files.pythonhosted.org/packages/ea/8c/e3328d8de32cf4a5446a645ca0d2964d3ae18cb414465e714d5b866bab3d/festpay-sdk-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-16 11:12:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "festpay",
    "github_project": "paymentpage-sdk-python",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "festpay-sdk"
}
        
Elapsed time: 0.04407s