==================
A class that implements the classic payment function of http://www.paysafecard.com
================================
## Instalation:
```
pip install paysafecard
```
## Example usage
Create the disposition and if it is successfull then redirect to the url.
```
from paysafecard.main import PaySafeCard
paysafe = PaySafeCard(username="", password="", debug=True, test=True)
paysafe.set_field('currency', 'EUR')
paysafe.set_field('amount', '10.00')
paysafe.set_field('mtid', 'transaction-id')
paysafe.set_field('merchantclientid', 'user-id')
paysafe.set_field('mid', 'currency-id')
paysafe.set_field('clientIp', '192.168.0.1')
paysafe.set_field('okUrl', '')
paysafe.set_field('nokUrl', '')
paysafe.set_field('pnUrl', '')
if paysafe.create_disposition():
redirect_url = paysafe.get_url()
else:
return False
```
After the client enters the required information you may have 2 cases one on the pnurl other to the okurl this function ensures that the amount was taken from paysafe to your account.
```
from paysafecard.main import PaySafeCard
paysafe = PaySafeCard(username='', password='', debug=True, test=True)
paysafe.set_field('amount', '10.00')
response = paysafe.get_serial_numbers('currency-id', 'EUR')
if response:
if response == 'execute':
if paysafe.execute_debit('10.00'):
return True
else:
return False
else:
return False
else:
return False
```
Metadata
Release files for paysafecard 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| paysafecard-0.2.4.tar.gz | 4.1 kB | Without provenance | Details for paysafecard-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| paysafecard-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for paysafecard-0.2.4-py3-none-any.whl |
Total release size: 10.3 kB
Release files / paysafecard-0.2.4.tar.gz
| Download URL | paysafecard-0.2.4.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d297e25b65ba3704f19c5a1c08d87671b739afae4c4f26534c26850b1600037
|
|
BLAKE2b-256 checksum How to use checksums |
292963917cf3644ca96b245c682b8c3e626b90141e9ff6fcae628f30114fc950
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / paysafecard-0.2.4-py3-none-any.whl
| Download URL | paysafecard-0.2.4-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e077e839095af37f9ddfeb2a854c483f0dcc4cba409294bf72146e4d21234e89
|
|
BLAKE2b-256 checksum How to use checksums |
69eab4967c59cdbaea9d8d3da6ded0abeb6bd36bfd4f3ff7d77e88099354b3ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for paysafecard 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.