diff --git a/lib/payment.js b/lib/payment.js index 332cc04..017895e 100644 --- a/lib/payment.js +++ b/lib/payment.js @@ -282,8 +282,12 @@ Payment.prototype.parseCsv = function(text){ }; Payment.prototype.buildXml = function (obj) { - var builder = new xml2js.Builder(); - var xml = builder.buildObject({xml:obj}); + var builder = new xml2js.Builder({ + allowSurrogateChars: true + }); + var xml = builder.buildObject({ + xml:obj + }); return xml; }; diff --git a/package.json b/package.json index 9c49224..227fe53 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,14 @@ { "name": "wechat-pay", - "version": "0.2.2", + "version": "0.2.4", "description": "wechat payment api for document v3.3.5", "main": "index.js", - "scripts": { + "scripts": + { "test": "echo \"Error: no test specified\" && exit 1" }, - "repository": { + "repository": + { "type": "git", "url": "git://github.com/supersheep/wechat-pay.git" }, @@ -16,15 +18,17 @@ ], "author": "spud", "license": "ISC", - "bugs": { + "bugs": + { "url": "https://github.com/supersheep/wechat-pay/issues" }, "homepage": "https://github.com/supersheep/wechat-pay", - "dependencies": { + "dependencies": + { "md5": "^2.0.0", "request": "^2.45.0", "sha1": "^1.1.0", "underscore": "^1.7.0", "xml2js": "^0.4.4" } -} +} \ No newline at end of file