为paylike.io的REST API提供的Python包装器
项目描述
paylike-python-sdk
Paylike.io rest api的Python实现
限制
仅实现了交易管理部分,您可以在以下位置找到官方API文档:[链接](https://github.com/paylike/api-docs#transactions)
基本用法
client = PaylikeApiClient(api_key, merchant_id)
方法
cancel_transaction
'''
Void or partially void the reserved amount on a transaction
- transactionId: String, // required
- amount: Decimal, // If no amount is given, the full amount will be voided
'''
client.cancel_transaction(transaction_id, amount=None)
capture_transaction
'''
Capture a transaction
- transactionId: String, // required
- amount: Decimal, // required
- descriptor: String, // optional, text on client bank statement
- currency: String, // optional, expected currency (for additional verification)
'''
client.capture_transaction(transaction_id, amount, descriptor='', currency=None)
create_payment_from_transaction
请确保阅读有关周期性支付的说明。
'''
Create a payment, based on an existing transaction (used for recurring payments)
- transactionId: String, // required
- currency: String, // required, three letter ISO
- amount: Decimal, // required, amount in minor units
- descriptor: String, // optional, the statement on the customers bankaccount. Will fallback to merchant descriptor
'''
client.create_payment_from_transaction(transaction_id, currency, amount, descriptor='')
create_payment_from_saved_card
请确保阅读有关周期性支付的说明。建议使用create_payment_from_transaction。
'''
Create a payment from a saved card token
- cardId: String, // required
- currency: String, // required, three letter ISO
- amount: Decimal, // required
- descriptor: String, // optional, the statement on the customers bankaccount. Will fallback to merchant descriptor
'''
client.create_payment_from_saved_card(card_id, currency, amount, descriptor='')
get_transaction
'''
Fetch a transaction
- transactionId: String, // required
'''
client.get_transaction(transaction_id)
get_transactions
'''
Fetch transactions
- limit: Number, // optional, the number of transactions to fetch. Default 100
'''
client.get_transactions(limit=100)
refund_transaction
'''
Refund, or partially refund a transaction
- transactionId: String, // required
- amount: Decimal, // required
- descriptor: String, // optional, the statement on the customers bankaccount. Will fallback to merchant descriptor
'''
client.refund_transaction(self, transaction_id, amount, descriptor="")
'''
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分布
paylike-1.0.tar.gz (3.2 kB 查看哈希值)
构建版本
paylike-1.0-py3-none-any.whl (3.9 kB 查看哈希值)
关闭
paylike-1.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 48472e0da141c186e11168354eacb981ab47f572a91f5b0a20e1095b517c2680 |
|
MD5 | eeb7ba406210bf1ddbfc1da29561d8ae |
|
BLAKE2b-256 | c02879ad9e8929703094ec1b0e57623fafe783dd059cfa270eeb763b3ea818d1 |
关闭
paylike-1.0-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 1372d4fbfaafd0ce9273b0c7f26fcf180400e850d67653887a2fbeb951ea7eb1 |
|
MD5 | efdfb040cdc53201ef06a794ded3112c |
|
BLAKE2b-256 | 29036dc91ef5f7824005abe990edf20f753a6adf9b3a7a60c8c00cd37470aa70 |