Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matusf/pay-by-square
Generate pay-by-square code that can by used to create QR code for banking apps
https://github.com/matusf/pay-by-square
by-square bysquare hacktoberfest pay-by-square paybysquare payment
Last synced: about 23 hours ago
JSON representation
Generate pay-by-square code that can by used to create QR code for banking apps
- Host: GitHub
- URL: https://github.com/matusf/pay-by-square
- Owner: matusf
- License: mit
- Created: 2020-07-04T20:24:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T10:39:48.000Z (6 months ago)
- Last Synced: 2024-08-10T23:25:09.901Z (5 months ago)
- Topics: by-square, bysquare, hacktoberfest, pay-by-square, paybysquare, payment
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 24
- Watchers: 5
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PAY by square
Generate codes for [by square](https://bysquare.com/) payments.
## Installation
Note: `pay-by-square` generates string that can be passes to QR code generator to create
image. To run example below, you need to install
[qrcode module](https://github.com/lincolnloop/python-qrcode) as well.```sh
pip install pay-by-square
```## Usage
### API
```text
pay_by_square.generate(
*,
amount: float,
iban: str,
swift: str = '',
date: Optional[date] = None,
beneficiary_name: str = '',
currency: str = 'EUR',
variable_symbol: str = '',
constant_symbol: str = '',
specific_symbol: str = '',
note: str = '',
beneficiary_address_1: str = '',
beneficiary_address_2: str = '',
) -> str:
Generate pay-by-square code that can by used to create QR code for banking appsWhen date is not provided current date will be used.
```### Example
```python
import qrcode
import pay_by_squarecode = pay_by_square.generate(
amount=10,
iban='SK7283300000009111111118',
swift='FIOZSKBAXXX',
variable_symbol='47',
)print(code)
img = qrcode.make(code)
img.show()
```## Testing
```sh
python -m unittest tests.py
```---
Kudos to [guys from devel.cz](https://devel.cz/otazka/qr-kod-pay-by-square)