Skip to content

Commit

Permalink
Merge pull request #90 from OVINC-CN/fix_wxpay
Browse files Browse the repository at this point in the history
fix(wxpay): sign api failed
  • Loading branch information
OrenZhang authored Dec 16, 2024
2 parents af9b964 + 8ba1094 commit 04ab9a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.test
tmp
.DS_Store
.vscode

# Env
.env
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ qcloud-python-sts==3.1.6

# qrcode
qrcode==8.0.0
pillow==11.0.0

# claude
anthropic==0.40.0
Expand Down
2 changes: 1 addition & 1 deletion utils/wxpay/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def generate(cls, request_method: str, request_url: str, request_body: dic
request_url=request_path,
timestamp=timestamp,
nonce=nonce,
request_body=json.dumps(request_body) if request_body else "",
request_body=json.dumps(request_body, ensure_ascii=False, separators=(",", ":")) if request_body else "",
)
signature = trader_cert.private_key.sign(
data=raw_info.encode("utf-8"),
Expand Down

0 comments on commit 04ab9a6

Please sign in to comment.