A Python wrapper for the CARDLINK api
Reason this release was yanked:
Incompatibility with Python <3.7 and bugs
Project description
cardlinky
Usage
First of all, you need to create a store in the system https://cardlink.link/. After confirmation, you will be able to get a token and a shop ID to work with the API.
Creating a bill and getting a payment link:
from cardlinky import Cardlinky
def print_bill_url(token: str, shop_id: str, amount: float) -> None:
# Creating an instance of the class
cardlinky = Cardlinky(token)
# Create a bill and save it
bill = cardlinky.create_bill(amount=amount, shop_id=shop_id)
# Getting a payment link and printing
print(bill.link_url)
print_bill_url("YOUR-TOKEN", "YOUR-SHOP-ID", 100.0)
# https://cardlink.link/link/GkLWvKx3
Getting a bill status:
from cardlinky import Cardlinky
def print_bill_status(token: str, id: str) -> None:
# Creating an instance of the class
cardlinky = Cardlinky(token)
# Create a bill and save it
bill_status = cardlinky.get_bill_status(id=id)
# Getting a status and printing
print(bill_status.status)
print_bill_status("YOUR-TOKEN", "BILL-ID")
# NEW
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cardlinky-1.0.tar.gz
(7.9 kB
view hashes)
Built Distribution
cardlinky-1.0-py3-none-any.whl
(10.9 kB
view hashes)