A Python package for interacting with the Paylink API
Project description
Paylink Package
A Python package for interacting with the Paylink API. It provides functionality to add and retrieve invoices.
Installation
You can install the package using pip:
pip install paylink
Usage
from paylink import Paylink, PaylinkProduct
paylink = Paylink(env='production')
# Add Invoice
invoice_details = paylink.add_invoice(
amount=10,
client_mobile='966123456789',
client_name='John Doe',
order_number='1234567890',
products=[
PaylinkProduct(title='Hand bag', price=4, qty=1),
PaylinkProduct(title='Book', price=3, qty=2),
],
callback_url='https://paylink.sa/test-python-sdk',
currency='USD',
)
print(invoice_details)
print('Transaction No:', invoiceDetails['transactionNo'])
print('Payment Url:', invoiceDetails['url'])
# Get Invoice
invoice_details = paylink.get_invoice(invoice_details['transactionNo'])
print('Payment Status:', invoice_details['orderStatus'])
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
paylink_package-0.1.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file paylink_package-0.1.tar.gz
.
File metadata
- Download URL: paylink_package-0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d07d267f366ec8660f489b19e9b6afd097451ef5dfcd8d5c0306c39ca4caf6b8 |
|
MD5 | fb9ed431dcea1ff889d35be16d3792a0 |
|
BLAKE2b-256 | d50a9ee2fc746aa1793554d02ce2f671fa9646896a9fde6f763cf02ef674dbc1 |
File details
Details for the file paylink_package-0.1-py3-none-any.whl
.
File metadata
- Download URL: paylink_package-0.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fefe26ce8c879783ebc63f93dec85b1ff0eb424ca271a27eb2138c52715ff25b |
|
MD5 | f44c094476b6a8778ddbf020cb2f04bf |
|
BLAKE2b-256 | e20c513645fa47591f5aa7ee41f3c57cf302d078128aa3a35516722dd1148ec0 |