Tripay Client For Python (UNOFFICIAL)
Project description
tripay
Tripay Client For Python (UNOFFICIAL)
Support:
-
Sandbox & Production Mode
-
Get Payment Instruction
-
Fee Calculator
-
Get Payment Channels
-
Closed Payment
- Helper to make order items
- Automatic signature generation
- Request payment
- Detail transaction
- List transaction
-
Open Payment
- Automatic signature generation
- Request payment
- Detail transaction
- List transaction
-
Easy to use
Usage
Installation:
pip install tripay
Setup client:
from tripay import TriPay
tripay = TriPay(
api_key="DEV-xxx",
merchant_code="xxx",
merchant_private_key="xxx",
debug=True # sandbox mode
)
Get Payment Instruction:
tripay.get_payment_instruction("BRIVA").json()
Fee Calculator:
tripay.fee_calculator(5000).json()
Get Payment Channels:
tripay.get_payment_channel().json()
Closed Payment:
# access to closed payments
cp = tripay.closed_payment
# creating items
items = []
items.append(
cp.create_item(
sku="099999888",
name="sabun",
price=2500,
quantity=10
)
)
# request payment
resp = cp.request(
"BRIVA",
2500 * 10,
customer_name="Dadang",
customer_email="someone@test.com",
customer_phone="0899988234",
order_items=items
).json()
print(resp)
Open Payment:
# notes: for open payments currently does not support sandbox mode
tripay.debug = False
# access to open payments
op = tripay.open_payment
# request payment
resp = op.request("BCAVA").json()
print(resp)
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-0.1.1.tar.gz
(4.2 kB
view details)
Built Distribution
File details
Details for the file tripay-0.1.1.tar.gz
.
File metadata
- Download URL: tripay-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.5 Linux/5.4.0-80-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09259411b7667bb2006db5e5ad3341a970ba6083452be20e607239e9486d3b61 |
|
MD5 | cc95aa7693e011f24bc46b6522b31560 |
|
BLAKE2b-256 | 1c2870a62d5b301b8c8f9e76d45868219a69b2e2cff14b162474cdf8e4a8566f |
File details
Details for the file tripay-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: tripay-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.5 Linux/5.4.0-80-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d207db77d8f70433166c4391efa32ead18d91d5c950e95ec6503e011ab2a6d13 |
|
MD5 | 51865882bb4c8763e3ebf74e59da8059 |
|
BLAKE2b-256 | 6b00f2fb81dd9a1ac1f707664fb47afdb8875c7c0ed17f73ac6a88f239e48102 |