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 hashes)
Built Distribution
tripay-0.1.1-py3-none-any.whl
(5.2 kB
view hashes)