refs #5595 Fix: ctx & userId removed from TpvTransaction/confirm
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
71651b96a3
commit
1c666cd48e
|
@ -2,7 +2,7 @@ const UserError = require('vn-loopback/util/user-error');
|
||||||
const base64url = require('base64url');
|
const base64url = require('base64url');
|
||||||
|
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
Self.remoteMethodCtx('confirm', {
|
Self.remoteMethod('confirm', {
|
||||||
description: 'Confirms electronic payment transaction',
|
description: 'Confirms electronic payment transaction',
|
||||||
accessType: 'WRITE',
|
accessType: 'WRITE',
|
||||||
accepts: [
|
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;
|
const $ = Self.app.models;
|
||||||
let transaction;
|
let transaction;
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ module.exports = Self => {
|
||||||
params['Ds_Currency'],
|
params['Ds_Currency'],
|
||||||
params['Ds_Response'],
|
params['Ds_Response'],
|
||||||
params['Ds_ErrorCode']
|
params['Ds_ErrorCode']
|
||||||
], {userId: ctx.req.accessToken.userId});
|
]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue