mirror of https://github.com/BTCPrivate/copay.git
paypro: use unspecified GET method for first paypro request.
This commit is contained in:
parent
08f1a49259
commit
efe41cead4
|
@ -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
|
||||
|
|
|
@ -101,7 +101,7 @@ function startServer(cb) {
|
|||
var old = Wallet.request;
|
||||
|
||||
var server = {
|
||||
POST: {
|
||||
GET: {
|
||||
|
||||
/**
|
||||
* Receive "I want to pay"
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue