python sdk for benpay merchant
Project description
Python SDK for Benpay merchant API
API Documentation
Installation
pip install benpay_merchant_api_sdk
Usage
Consider
/v1/payment/createas a reference, the full code can be located in the demo directory.
- Get api key info
https://www.benpay.org/paymvp/business
- create order
import config
import sys
import uuid
sys.path.append("../../")
from benpay_merchant_api_sdk.client import BenpayMerchantClient
import benpay_merchant_api_sdk.param.benpay_merchant_param as benpay_param
client = BenpayMerchantClient(
api_key=config.API_KEY,
server=config.SERVER,
merchant_private_key_string=config.MERCHANT_PRIVATE_KEY_STRING,
platform_public_key_string=config.PLATFORM_PUBLIC_KEY_STRING
)
param = benpay_param.CreatePayOrderParam()
param.coin = "BUSD"
param.amount = "0.1"
param.merchant_order_no = uuid.uuid4().hex
param.merchant_note = "22222"
resp = client.create_pay_order(param)
if resp.status_code == 200:
print(resp.json())
else:
print(resp.text)
```%
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file benpay_merchant_api_sdk-1.0.2.tar.gz.
File metadata
- Download URL: benpay_merchant_api_sdk-1.0.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.0 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a39802579d49cf833efa2eb0b1207d5baf6a1f99696e47f46ca99d078c514b2
|
|
| MD5 |
1915de529460aa93b99ea7693e6baf92
|
|
| BLAKE2b-256 |
e4202f5e0622eae55094124f51718ef8fad1ebaf9d051a03796260e7dd3616f1
|
File details
Details for the file benpay_merchant_api_sdk-1.0.2-py3-none-any.whl.
File metadata
- Download URL: benpay_merchant_api_sdk-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.0 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb390954055148d56aeec4122061c4b2a6d1076a027ca9ea8b328d4a33e960e3
|
|
| MD5 |
a6f17900e00b75781ff14fda15594676
|
|
| BLAKE2b-256 |
8caa75f784d40158d02fb5755bf39455c6cdc58a618c210693ff46bfc4e500e0
|