paylike.io的rest api的python包装器
paylike的Python项目详细描述
PayLike Python开发包
paylike.io的rest api的python实现
限制
只有事务管理部分已经实现,您可以在这里找到正式的api文档: https://github.com/paylike/api-docs#transactions
基本用法
client=PaylikeApiClient(api_key,merchant_id)
方法
取消交易
'''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 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)
从交易创建付款
请务必阅读有关recurring payments的内容。
'''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='')
从保存的卡创建付款
请务必阅读有关recurring payments的内容。 建议使用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='')
获取事务
'''Fetch a transaction - transactionId: String, // required'''client.get_transaction(transaction_id)
获取交易
'''Fetch transactions - limit: Number, // optional, the number of transactions to fetch. Default 100'''client.get_transactions(limit=100)