Skip to content

Commit

Permalink
Merge branch 'hotfix/0.0.3' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Malte Legenhausen committed Dec 21, 2011
2 parents a74e21d + 790cc73 commit 2131140
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion lib/ogone.js
Expand Up @@ -86,7 +86,7 @@ Request.prototype._send = function(callback) {
if (prepared instanceof Error) {
return callback(prepared);
}
var body = qs.stringify(prepared);
var body = Request.stringify(prepared);
request.post({
url: this.url,
headers: {
Expand All @@ -107,6 +107,15 @@ Request.prototype._send = function(callback) {
}.bind(this));
};

//TODO: Fix for qs issue #23
Request.stringify = function(obj) {
var result = {};
Object.keys(obj).each(function(key) {
result[key] = obj[key].toString();
});
return qs.stringify(result);
};

Request.normalize = function(method, obj) {
var result = {};
Object.keys(obj).map(function(key) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"author": "Malte Legenhausen <mlegenhausen@gmail.com>",
"name": "ogone-directlink",
"description": "Thin wrapper around the directlink http api of the ogone payment service",
"version": "0.0.2",
"version": "0.0.3",
"repository": {
"type": "git",
"url": "git://github.com/mlegenhausen/node-ogone-directlink.git"
Expand Down

0 comments on commit 2131140

Please sign in to comment.