paypro: use unspecified GET method for first paypro request.

This commit is contained in:
Christopher Jeffrey 2014-08-11 19:03:45 -04:00 committed by Manuel Araoz
parent 08f1a49259
commit efe41cead4
3 changed files with 4 additions and 4 deletions

View File

@ -801,7 +801,7 @@ Wallet.prototype.createPaymentTx = function(options, cb) {
}
return Wallet.request({
method: options.method || 'POST',
method: 'GET',
url: options.uri,
headers: {
'Accept': PayPro.PAYMENT_REQUEST_CONTENT_TYPE

View File

@ -101,7 +101,7 @@ function startServer(cb) {
var old = Wallet.request;
var server = {
POST: {
GET: {
/**
* Receive "I want to pay"

View File

@ -182,7 +182,7 @@ describe('PayPro (in Wallet) model', function() {
req.headers[key.toLowerCase()] = req.headers[key];
});
server.POST['/-/request'](req, function(err, res, body) {
server.GET['/-/request'](req, function(err, res, body) {
var data = PayPro.PaymentRequest.decode(body);
pr = new PayPro();
pr = pr.makePaymentRequest(data);
@ -431,7 +431,7 @@ describe('PayPro (in Wallet) model', function() {
req.headers[key.toLowerCase()] = req.headers[key];
});
server.POST['/-/request'](req, function(err, res, body) {
server.GET['/-/request'](req, function(err, res, body) {
var data = PayPro.PaymentRequest.decode(body);
pr = new PayPro();
pr = pr.makePaymentRequest(data);