binance / binance/binance-pay-connector-python
API returning Request body is not a valid json object.
- Dominant language
- Python
- Stars
- 31
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Hey guys, how are you doing today?
I'm using this library in a work project, but when I make the request, I'm getting as response: `{"status":"FAIL","code":"400008","errorMessage":"Request body is not a valid json object."}` I'm following your documentation, and this is the code I'm using to make the request:
```python3
parameters = {
"env": {
"terminalType": terminal_type,
},
"merchantTradeNo": order_id,
"orderAmount": order_amount,
"currency": currency,
"goods": items_list,
"buyer": {
"buyerName": {"firstName": first_name, "lastName": last_name},
"buyerEmail": email,
},
# "webhookUrl": settings.BINANCE_PAY_WEBHOOK_URL,
}
if client_ip is not None:
parameters["env"]["orderClientIp"] = client_ip
if middle_name is not None:
parameters["buyer"]["buyerName"]["middleName"] = middle_name
print("Parameters: {}".format(parameters))
return client.new_order(parameters)
```
I looked at your source code and the request body seems to be correctly formatted as json, so what is happening? Can someone help me with this?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.