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-1.0.2.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for paylink_package-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 522e60e77d59c95de3b85d8d6a1df0a350fe9cc073ec0f9305b4e0a30a77c6da |
|
MD5 | db130c9626f1522a1a8adbc0294d6a34 |
|
BLAKE2b-256 | cb4f87ce11e3d458280bec490874079ef63a336a3baca57097c95ed87bf881d2 |