salix/services/loopback/common/methods/client/confirmTransaction.js

25 lines
621 B
JavaScript
Raw Normal View History

2018-09-28 13:00:12 +00:00
module.exports = Self => {
2018-10-02 10:03:39 +00:00
Self.remoteMethod('confirmTransaction', {
description: 'Confirm a web payment',
accessType: 'WRITE',
2018-09-28 13:00:12 +00:00
accepts: [{
arg: 'id',
type: 'number',
required: true,
description: 'Transaction id'
}],
returns: {
type: 'Object',
root: true
},
http: {
path: `/confirmTransaction`,
verb: 'POST'
}
});
2018-10-02 10:03:39 +00:00
Self.confirmTransaction = async id => {
2018-09-28 13:00:12 +00:00
return await Self.rawSql('CALL hedera.tpvTransactionConfirmById(?)', [id]);
};
};