paypro: minor fix to createPaymentTx callback.

This commit is contained in:
Christopher Jeffrey 2014-09-16 09:57:21 -07:00
parent efdf8c902a
commit f3ed336278
1 changed files with 8 additions and 1 deletions

View File

@ -1303,7 +1303,14 @@ Wallet.prototype.createPaymentTx = function(options, cb) {
return self.receivePaymentRequest(options, pr, cb);
})
.error(function(data, status, headers, config) {
return cb(new Error('Status: ' + status));
log.debug('Server was did not return PaymentRequest.');
log.debug('XHR status: ' + status);
if (options.fetch) {
return cb(new Error('Status: ' + status));
} else {
// Should never happen:
return cb(null, null, null);
}
});
};