refs #5595 Fix: ctx & userId removed from TpvTransaction/confirm
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2023-06-15 13:10:44 +02:00
parent 71651b96a3
commit 1c666cd48e
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ const UserError = require('vn-loopback/util/user-error');
const base64url = require('base64url');
module.exports = Self => {
Self.remoteMethodCtx('confirm', {
Self.remoteMethod('confirm', {
description: 'Confirms electronic payment transaction',
accessType: 'WRITE',
accepts: [
@ -30,7 +30,7 @@ module.exports = Self => {
}
});
Self.confirm = async(ctx, signatureVersion, merchantParameters, signature) => {
Self.confirm = async(signatureVersion, merchantParameters, signature) => {
const $ = Self.app.models;
let transaction;
@ -83,7 +83,7 @@ module.exports = Self => {
params['Ds_Currency'],
params['Ds_Response'],
params['Ds_ErrorCode']
], {userId: ctx.req.accessToken.userId});
]);
return true;
} catch (err) {