Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aprilahijriyan/tripay-python
Tripay Client For Python (UNOFFICIAL)
https://github.com/aprilahijriyan/tripay-python
Last synced: 9 days ago
JSON representation
Tripay Client For Python (UNOFFICIAL)
- Host: GitHub
- URL: https://github.com/aprilahijriyan/tripay-python
- Owner: aprilahijriyan
- Created: 2021-09-30T14:58:23.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-01T08:57:28.000Z (about 3 years ago)
- Last Synced: 2024-10-06T10:19:01.794Z (about 1 month ago)
- Language: Python
- Size: 13.7 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```python
from tripay import TriPaytripay = TriPay(
api_key="DEV-xxx",
merchant_code="xxx",
merchant_private_key="xxx",
debug=True # sandbox mode
)
```Get Payment Instruction:
```python
tripay.get_payment_instruction("BRIVA").json()
```Fee Calculator:
```python
tripay.fee_calculator(5000).json()
```Get Payment Channels:
```python
tripay.get_payment_channel().json()
```Closed Payment:
```python
# 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="[email protected]",
customer_phone="0899988234",
order_items=items
).json()
print(resp)
```Open Payment:
```python
# 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)
```