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-package==1.0.3
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.3.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for paylink_package-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f8dc71b5f84436b2caf7e2c6383d63d9bfb039cd4e05346bdea849b181a4dae |
|
MD5 | e3c25aafeed8960691f2e879489b5a19 |
|
BLAKE2b-256 | eea96062a28275277a4bddb06431f95182fc84446ef93d9edebb0c2501d49ac7 |