Unofficial SDK for Tripay payment gateway
Project description
Tripay Python SDK (UnOfficial)
Enum Mode
class ModeEnum(str, Enum):
sandbox = "https://tripay.co.id/api-sandbox/"
prod = "https://tripay.co.id/api/"
Authentication
async def payment():
t = Tripay(api_key, private_key, mode)
Closed Transaction
Create Transaction
async def payment():
t = Tripay(api_key, private_key, mode)
return await t.ClosedTransaction.create(merchant_code, payload, order_items)
Detail Transaction
async def payment():
t = Tripay(api_key, private_key, mode)
return await t.ClosedTransaction.detail(payload)
example payload:
{ "reference": "T0001000000000000006" }
Open Transaction
Open Transaction isn't support Sanbox Mode
Create Transaction
async def payment():
t = Tripay(api_key, private_key, mode)
return await t.OpenTransaction.create(payload, order_items)
Example order items:
[ { 'sku': 'PRODUK1', 'name': 'Nama Produk 1', 'price': 500000, 'quantity': 1, 'product_url': 'https://tokokamu.com/product/nama-produk-1', 'image_url': 'https://tokokamu.com/product/nama-produk-1.jpg' }, { 'sku': 'PRODUK2', 'name': 'Nama Produk 2', 'price': 500000, 'quantity': 1, 'product_url': 'https://tokokamu.com/product/nama-produk-2', 'image_url': 'https://tokokamu.com/product/nama-produk-2.jpg' } ]
Detail
async def payment():
t = Tripay(api_key, private_key, mode)
return await t.OpenTransaction.detail(uuid)
Listing Payment
async def payment():
t = Tripay(api_key, private_key, mode)
return await t.OpenTransaction.listing_payment(uuid)
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
tripay_sdk-0.1.0.tar.gz
(6.4 kB
view hashes)
Built Distribution
Close
Hashes for tripay_sdk-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46a6fbff0c7589862efe458f665d6bb322a725d4478a2fd6fdb207eaf57cdef8 |
|
MD5 | 7c2edd64f0d578bad8a81572acc488e2 |
|
BLAKE2b-256 | 1bd4bd9bd93212f6891675e64b2e1e1abd14fb53c7b4646aa8d246e45896b24c |