Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor things while debugging

  • Loading branch information...
commit 49a41cc8926e39791ddb4cf37467927a983643e1 1 parent ee049c4
@tcurdt tcurdt authored
View
13 lib/gateway-client.js
@@ -25,13 +25,14 @@ function GatewayClient(opts, authInfo){
options.key = authInfo.key;
}
- var req = https.request(options, function(res){
- res.on('data', function(data){
- callback(opts.responseParser.parseResponse(request, data.toString()));
- });
- });
-
+ var req = https.request(options);
req.end(requestString);
+ req.on('response', function(res){
+ res.on('data', function(data){
+ // TODO add error handling
+ callback(opts.responseParser.parseResponse(request, data.toString()))
+ })
+ })
}
}
View
4 lib/payflowpro/client.js
@@ -36,7 +36,7 @@ exports.levels = require('levels');
exports.createClient = function(options){
options.version = '64.0';
var client = options.cert ?
- new PaypalNetworkClient(options.level(options), {cert:options.cert, key:options.key}) :
+ new PaypalNetworkClient(options.level(options), { cert: options.cert, key: options.key }) :
new PaypalNetworkClient(options.level(options));
return new Client(options, client);
@@ -70,7 +70,7 @@ function Client(options, paypal){
function merge(a, b){
var no = [ 'cert', 'key', 'password', 'level' ]
- Object.keys(b).filter(function(s){ return no.indexOf(s) ==-1 }).forEach(function(k){
+ Object.keys(b).filter(function(s){ return no.indexOf(s) == -1 }).forEach(function(k){
a[k] = b[k];
});
View
1  lib/paynode.js
@@ -3,4 +3,3 @@ require.paths.unshift(__dirname);
exports.use = function(name){
return require(__dirname + '/'+name+'/client')
}
-
Please sign in to comment.
Something went wrong with that request. Please try again.