...
|
...
|
@@ -18,18 +18,18 @@ exports.payment = options => { |
|
|
|
|
|
}
|
|
|
return result;
|
|
|
})
|
|
|
});
|
|
|
|
|
|
// mock
|
|
|
.catch()
|
|
|
.then(() => {
|
|
|
let mockData = require('./_buynow-mock').payment;
|
|
|
|
|
|
return {
|
|
|
code: 200,
|
|
|
data: paymentProcess.tranformPayment(mockData.data)
|
|
|
};
|
|
|
});
|
|
|
// .catch()
|
|
|
// .then(() => {
|
|
|
// let mockData = require('./_buynow-mock').payment;
|
|
|
|
|
|
// return {
|
|
|
// code: 200,
|
|
|
// data: paymentProcess.tranformPayment(mockData.data)
|
|
|
// };
|
|
|
// });
|
|
|
};
|
|
|
|
|
|
|
...
|
...
|
@@ -39,15 +39,15 @@ exports.compute = options => { |
|
|
method: 'app.Buynow.compute',
|
|
|
}, options);
|
|
|
|
|
|
return API.post(url, queryData)
|
|
|
return API.post(url, queryData);
|
|
|
|
|
|
// mock
|
|
|
.catch()
|
|
|
.then(() => {
|
|
|
let mockData = require('./_buynow-mock').compute;
|
|
|
// .catch()
|
|
|
// .then(() => {
|
|
|
// let mockData = require('./_buynow-mock').compute;
|
|
|
|
|
|
return mockData;
|
|
|
});
|
|
|
// return mockData;
|
|
|
// });
|
|
|
};
|
|
|
|
|
|
|
...
|
...
|
@@ -57,13 +57,13 @@ exports.submit = options => { |
|
|
method: 'app.Buynow.submit'
|
|
|
}, options);
|
|
|
|
|
|
return API.post(url, queryData)
|
|
|
return API.post(url, queryData);
|
|
|
|
|
|
// mock
|
|
|
.catch()
|
|
|
.then(()=> {
|
|
|
let mockData = require('./_buynow-mock').submit;
|
|
|
// .catch()
|
|
|
// .then(()=> {
|
|
|
// let mockData = require('./_buynow-mock').submit;
|
|
|
|
|
|
return mockData;
|
|
|
});
|
|
|
// return mockData;
|
|
|
// });
|
|
|
}; |
...
|
...
|
|