node-easywechat 3.6.2 → 3.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.md +16 -0
- package/CHANGELOG.md +4 -0
- package/dist/Pay/Client.js +10 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 我的环境 / My Environment
|
|
11
|
+
|
|
12
|
+
* Node 版本 / Version:
|
|
13
|
+
* node-easywechat 版本 / Version:
|
|
14
|
+
* 所用框架及版本 / Framework & Version:
|
|
15
|
+
|
|
16
|
+
## 问题描述 / Description the issue
|
package/CHANGELOG.md
CHANGED
package/dist/Pay/Client.js
CHANGED
|
@@ -62,10 +62,19 @@ class Client {
|
|
|
62
62
|
payload.headers['user-agent'] = (0, Utils_1.createUserAgent)();
|
|
63
63
|
}
|
|
64
64
|
if (this.isV3Request(url) && !payload.headers['authorization']) {
|
|
65
|
+
if (typeof payload.json !== 'undefined') {
|
|
66
|
+
if (typeof payload.json === 'object') {
|
|
67
|
+
payload.data = JSON.stringify(payload.json);
|
|
68
|
+
}
|
|
69
|
+
else if (typeof payload.json === 'string') {
|
|
70
|
+
payload.data = payload.json;
|
|
71
|
+
}
|
|
72
|
+
delete payload.json;
|
|
73
|
+
}
|
|
65
74
|
payload.headers['authorization'] = this.createSignature(method, url, payload);
|
|
66
75
|
}
|
|
67
76
|
else {
|
|
68
|
-
if (payload.xml) {
|
|
77
|
+
if (typeof payload.xml !== 'undefined') {
|
|
69
78
|
if (typeof payload.xml === 'object') {
|
|
70
79
|
payload.xml = (0, Utils_1.buildXml)(this.attachLegacySignature(payload.xml));
|
|
71
80
|
}
|