Merge branch 'dev' into 5036-regularizar-historicos
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
commit
9ff920c67e
|
@ -12,6 +12,9 @@ services:
|
|||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
resources:
|
||||
limits:
|
||||
memory: 1G
|
||||
back:
|
||||
image: registry.verdnatura.es/salix-back:${BRANCH_NAME:?}
|
||||
build: .
|
||||
|
@ -38,6 +41,9 @@ services:
|
|||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
resources:
|
||||
limits:
|
||||
memory: 4G
|
||||
configs:
|
||||
datasources:
|
||||
external: true
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
},
|
||||
"node_modules/@uirouter/angularjs": {
|
||||
"version": "1.0.30",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/@uirouter/angularjs/-/angularjs-1.0.30.tgz",
|
||||
"integrity": "sha512-qkc3RFZc91S5K0gc/QVAXc9LGDPXjR04vDgG/11j8+yyZEuQojXxKxdLhKIepiPzqLmGRVqzBmBc27gtqaEeZg==",
|
||||
"dependencies": {
|
||||
"@uirouter/core": "6.0.8"
|
||||
},
|
||||
|
@ -38,22 +39,28 @@
|
|||
},
|
||||
"node_modules/@uirouter/core": {
|
||||
"version": "6.0.8",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/@uirouter/core/-/core-6.0.8.tgz",
|
||||
"integrity": "sha512-Gc/BAW47i4L54p8dqYCJJZuv2s3tqlXQ0fvl6Zp2xrblELPVfxmjnc0eurx3XwfQdaqm3T6uls6tQKkof/4QMw==",
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/angular": {
|
||||
"version": "1.8.3",
|
||||
"license": "MIT"
|
||||
"resolved": "https://registry.npmjs.org/angular/-/angular-1.8.3.tgz",
|
||||
"integrity": "sha512-5qjkWIQQVsHj4Sb5TcEs4WZWpFeVFHXwxEBHUhrny41D8UrBAd6T/6nPPAsLngJCReIOqi95W3mxdveveutpZw==",
|
||||
"deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward."
|
||||
},
|
||||
"node_modules/angular-animate": {
|
||||
"version": "1.8.2",
|
||||
"license": "MIT"
|
||||
"resolved": "https://registry.npmjs.org/angular-animate/-/angular-animate-1.8.2.tgz",
|
||||
"integrity": "sha512-Jbr9+grNMs9Kj57xuBU3Ju3NOPAjS1+g2UAwwDv7su1lt0/PLDy+9zEwDiu8C8xJceoTbmBNKiWGPJGBdCQLlA==",
|
||||
"deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward."
|
||||
},
|
||||
"node_modules/angular-moment": {
|
||||
"version": "1.3.0",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/angular-moment/-/angular-moment-1.3.0.tgz",
|
||||
"integrity": "sha512-KG8rvO9MoaBLwtGnxTeUveSyNtrL+RNgGl1zqWN36+HDCCVGk2DGWOzqKWB6o+eTTbO3Opn4hupWKIElc8XETA==",
|
||||
"dependencies": {
|
||||
"moment": ">=2.8.0 <3.0.0"
|
||||
},
|
||||
|
@ -63,7 +70,8 @@
|
|||
},
|
||||
"node_modules/angular-translate": {
|
||||
"version": "2.19.0",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/angular-translate/-/angular-translate-2.19.0.tgz",
|
||||
"integrity": "sha512-Z/Fip5uUT2N85dPQ0sMEe1JdF5AehcDe4tg/9mWXNDVU531emHCg53ZND9Oe0dyNiGX5rWcJKmsL1Fujus1vGQ==",
|
||||
"dependencies": {
|
||||
"angular": "^1.8.0"
|
||||
},
|
||||
|
@ -73,25 +81,29 @@
|
|||
},
|
||||
"node_modules/angular-translate-loader-partial": {
|
||||
"version": "2.19.0",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/angular-translate-loader-partial/-/angular-translate-loader-partial-2.19.0.tgz",
|
||||
"integrity": "sha512-NnMw13LMV4bPQmJK7/pZOZAnPxe0M5OtUHchADs5Gye7V7feonuEnrZ8e1CKhBlv9a7IQyWoqcBa4Lnhg8gk5w==",
|
||||
"dependencies": {
|
||||
"angular-translate": "~2.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "1.0.10",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||
"dependencies": {
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/croppie": {
|
||||
"version": "2.6.5",
|
||||
"license": "MIT"
|
||||
"resolved": "https://registry.npmjs.org/croppie/-/croppie-2.6.5.tgz",
|
||||
"integrity": "sha512-IlChnVUGG5T3w2gRZIaQgBtlvyuYnlUWs2YZIXXR3H9KrlO1PtBT3j+ykxvy9eZIWhk+V5SpBmhCQz5UXKrEKQ=="
|
||||
},
|
||||
"node_modules/esprima": {
|
||||
"version": "4.0.1",
|
||||
"license": "BSD-2-Clause",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
||||
"bin": {
|
||||
"esparse": "bin/esparse.js",
|
||||
"esvalidate": "bin/esvalidate.js"
|
||||
|
@ -102,7 +114,8 @@
|
|||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "3.14.1",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
||||
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
|
||||
"dependencies": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
|
@ -113,36 +126,42 @@
|
|||
},
|
||||
"node_modules/mg-crud": {
|
||||
"version": "1.1.2",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/mg-crud/-/mg-crud-1.1.2.tgz",
|
||||
"integrity": "sha512-mAR6t0aQHKnT0QHKHpLOi0kNPZfO36iMpIoiLjFHxuio6mIJyuveBJ4VNlNXJRxLh32/FLADEb41/sYo7QUKFw==",
|
||||
"dependencies": {
|
||||
"angular": "^1.6.1"
|
||||
}
|
||||
},
|
||||
"node_modules/moment": {
|
||||
"version": "2.29.4",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
||||
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/oclazyload": {
|
||||
"version": "0.6.3",
|
||||
"license": "MIT"
|
||||
"resolved": "https://registry.npmjs.org/oclazyload/-/oclazyload-0.6.3.tgz",
|
||||
"integrity": "sha512-HpOSYUgjtt6sTB/C6+FWsExR+9HCnXKsUA96RWkDXfv11C8Cc9X2DlR0WIZwFIiG6FQU0pwB5dhoYyut8bFAOQ=="
|
||||
},
|
||||
"node_modules/require-yaml": {
|
||||
"version": "0.0.1",
|
||||
"license": "BSD",
|
||||
"resolved": "https://registry.npmjs.org/require-yaml/-/require-yaml-0.0.1.tgz",
|
||||
"integrity": "sha512-M6eVEgLPRbeOhgSCnOTtdrOOEQzbXRchg24Xa13c39dMuraFKdI9emUo97Rih0YEFzSICmSKg8w4RQp+rd9pOQ==",
|
||||
"dependencies": {
|
||||
"js-yaml": ""
|
||||
}
|
||||
},
|
||||
"node_modules/require-yaml/node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
"license": "Python-2.0"
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||
},
|
||||
"node_modules/require-yaml/node_modules/js-yaml": {
|
||||
"version": "4.1.0",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
|
||||
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
|
||||
"dependencies": {
|
||||
"argparse": "^2.0.1"
|
||||
},
|
||||
|
@ -152,11 +171,13 @@
|
|||
},
|
||||
"node_modules/sprintf-js": {
|
||||
"version": "1.0.3",
|
||||
"license": "BSD-3-Clause"
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="
|
||||
},
|
||||
"node_modules/validator": {
|
||||
"version": "6.3.0",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-6.3.0.tgz",
|
||||
"integrity": "sha512-BylxTwhqwjQI5MDJF7amCy/L0ejJO+74DvCsLV52Lq3+3bhVcVMKqNqOiNcQJm2G48u9EAcw4xFERAmFbwXM9Q==",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
|
@ -165,51 +186,73 @@
|
|||
"dependencies": {
|
||||
"@uirouter/angularjs": {
|
||||
"version": "1.0.30",
|
||||
"resolved": "https://registry.npmjs.org/@uirouter/angularjs/-/angularjs-1.0.30.tgz",
|
||||
"integrity": "sha512-qkc3RFZc91S5K0gc/QVAXc9LGDPXjR04vDgG/11j8+yyZEuQojXxKxdLhKIepiPzqLmGRVqzBmBc27gtqaEeZg==",
|
||||
"requires": {
|
||||
"@uirouter/core": "6.0.8"
|
||||
}
|
||||
},
|
||||
"@uirouter/core": {
|
||||
"version": "6.0.8"
|
||||
"version": "6.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@uirouter/core/-/core-6.0.8.tgz",
|
||||
"integrity": "sha512-Gc/BAW47i4L54p8dqYCJJZuv2s3tqlXQ0fvl6Zp2xrblELPVfxmjnc0eurx3XwfQdaqm3T6uls6tQKkof/4QMw=="
|
||||
},
|
||||
"angular": {
|
||||
"version": "1.8.3"
|
||||
"version": "1.8.3",
|
||||
"resolved": "https://registry.npmjs.org/angular/-/angular-1.8.3.tgz",
|
||||
"integrity": "sha512-5qjkWIQQVsHj4Sb5TcEs4WZWpFeVFHXwxEBHUhrny41D8UrBAd6T/6nPPAsLngJCReIOqi95W3mxdveveutpZw=="
|
||||
},
|
||||
"angular-animate": {
|
||||
"version": "1.8.2"
|
||||
"version": "1.8.2",
|
||||
"resolved": "https://registry.npmjs.org/angular-animate/-/angular-animate-1.8.2.tgz",
|
||||
"integrity": "sha512-Jbr9+grNMs9Kj57xuBU3Ju3NOPAjS1+g2UAwwDv7su1lt0/PLDy+9zEwDiu8C8xJceoTbmBNKiWGPJGBdCQLlA=="
|
||||
},
|
||||
"angular-moment": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/angular-moment/-/angular-moment-1.3.0.tgz",
|
||||
"integrity": "sha512-KG8rvO9MoaBLwtGnxTeUveSyNtrL+RNgGl1zqWN36+HDCCVGk2DGWOzqKWB6o+eTTbO3Opn4hupWKIElc8XETA==",
|
||||
"requires": {
|
||||
"moment": ">=2.8.0 <3.0.0"
|
||||
}
|
||||
},
|
||||
"angular-translate": {
|
||||
"version": "2.19.0",
|
||||
"resolved": "https://registry.npmjs.org/angular-translate/-/angular-translate-2.19.0.tgz",
|
||||
"integrity": "sha512-Z/Fip5uUT2N85dPQ0sMEe1JdF5AehcDe4tg/9mWXNDVU531emHCg53ZND9Oe0dyNiGX5rWcJKmsL1Fujus1vGQ==",
|
||||
"requires": {
|
||||
"angular": "^1.8.0"
|
||||
}
|
||||
},
|
||||
"angular-translate-loader-partial": {
|
||||
"version": "2.19.0",
|
||||
"resolved": "https://registry.npmjs.org/angular-translate-loader-partial/-/angular-translate-loader-partial-2.19.0.tgz",
|
||||
"integrity": "sha512-NnMw13LMV4bPQmJK7/pZOZAnPxe0M5OtUHchADs5Gye7V7feonuEnrZ8e1CKhBlv9a7IQyWoqcBa4Lnhg8gk5w==",
|
||||
"requires": {
|
||||
"angular-translate": "~2.19.0"
|
||||
}
|
||||
},
|
||||
"argparse": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||
"requires": {
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"croppie": {
|
||||
"version": "2.6.5"
|
||||
"version": "2.6.5",
|
||||
"resolved": "https://registry.npmjs.org/croppie/-/croppie-2.6.5.tgz",
|
||||
"integrity": "sha512-IlChnVUGG5T3w2gRZIaQgBtlvyuYnlUWs2YZIXXR3H9KrlO1PtBT3j+ykxvy9eZIWhk+V5SpBmhCQz5UXKrEKQ=="
|
||||
},
|
||||
"esprima": {
|
||||
"version": "4.0.1"
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "3.14.1",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
||||
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
|
@ -217,27 +260,39 @@
|
|||
},
|
||||
"mg-crud": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/mg-crud/-/mg-crud-1.1.2.tgz",
|
||||
"integrity": "sha512-mAR6t0aQHKnT0QHKHpLOi0kNPZfO36iMpIoiLjFHxuio6mIJyuveBJ4VNlNXJRxLh32/FLADEb41/sYo7QUKFw==",
|
||||
"requires": {
|
||||
"angular": "^1.6.1"
|
||||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.29.4"
|
||||
"version": "2.29.4",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
||||
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
|
||||
},
|
||||
"oclazyload": {
|
||||
"version": "0.6.3"
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/oclazyload/-/oclazyload-0.6.3.tgz",
|
||||
"integrity": "sha512-HpOSYUgjtt6sTB/C6+FWsExR+9HCnXKsUA96RWkDXfv11C8Cc9X2DlR0WIZwFIiG6FQU0pwB5dhoYyut8bFAOQ=="
|
||||
},
|
||||
"require-yaml": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/require-yaml/-/require-yaml-0.0.1.tgz",
|
||||
"integrity": "sha512-M6eVEgLPRbeOhgSCnOTtdrOOEQzbXRchg24Xa13c39dMuraFKdI9emUo97Rih0YEFzSICmSKg8w4RQp+rd9pOQ==",
|
||||
"requires": {
|
||||
"js-yaml": ""
|
||||
},
|
||||
"dependencies": {
|
||||
"argparse": {
|
||||
"version": "2.0.1"
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
|
||||
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
|
||||
"requires": {
|
||||
"argparse": "^2.0.1"
|
||||
}
|
||||
|
@ -245,10 +300,14 @@
|
|||
}
|
||||
},
|
||||
"sprintf-js": {
|
||||
"version": "1.0.3"
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "6.3.0"
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-6.3.0.tgz",
|
||||
"integrity": "sha512-BylxTwhqwjQI5MDJF7amCy/L0ejJO+74DvCsLV52Lq3+3bhVcVMKqNqOiNcQJm2G48u9EAcw4xFERAmFbwXM9Q=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,45 +32,66 @@ module.exports = Self => {
|
|||
|
||||
Self.confirm = async(signatureVersion, merchantParameters, signature) => {
|
||||
const $ = Self.app.models;
|
||||
let transaction;
|
||||
|
||||
const decodedParams = JSON.parse(
|
||||
base64url.decode(merchantParameters, 'utf8'));
|
||||
const params = {};
|
||||
try {
|
||||
const decodedParams = JSON.parse(
|
||||
base64url.decode(merchantParameters, 'utf8'));
|
||||
const params = {};
|
||||
|
||||
for (const param in decodedParams)
|
||||
params[param] = decodeURIComponent(decodedParams[param]);
|
||||
for (const param in decodedParams)
|
||||
params[param] = decodeURIComponent(decodedParams[param]);
|
||||
|
||||
const orderId = params['Ds_Order'];
|
||||
const merchantId = parseInt(params['Ds_MerchantCode']);
|
||||
const orderId = params['Ds_Order'];
|
||||
if (!orderId)
|
||||
throw new UserError('Order id not provided');
|
||||
|
||||
if (!orderId)
|
||||
throw new UserError('Order id not found');
|
||||
if (!merchantId)
|
||||
throw new UserError('Mechant id not found');
|
||||
transaction = await Self.findById(orderId, {fields: ['id']});
|
||||
if (!transaction)
|
||||
throw new UserError('Order not found');
|
||||
|
||||
const merchant = await $.TpvMerchant.findById(merchantId, {
|
||||
fields: ['id', 'secretKey']
|
||||
});
|
||||
await transaction.updateAttributes({
|
||||
merchantParameters,
|
||||
signature,
|
||||
signatureVersion,
|
||||
});
|
||||
|
||||
const base64hmac = Self.createSignature(
|
||||
orderId,
|
||||
merchant.secretKey,
|
||||
merchantParameters
|
||||
);
|
||||
const merchantId = parseInt(params['Ds_MerchantCode']);
|
||||
if (!merchantId)
|
||||
throw new UserError('Merchant id not provided');
|
||||
|
||||
if (base64hmac !== base64url.toBase64(signature))
|
||||
throw new UserError('Invalid signature');
|
||||
const merchant = await $.TpvMerchant.findById(merchantId, {
|
||||
fields: ['id', 'secretKey']
|
||||
});
|
||||
if (!merchant)
|
||||
throw new UserError('Merchant not found');
|
||||
|
||||
await Self.rawSql(
|
||||
'CALL hedera.tpvTransaction_confirm(?, ?, ?, ?, ?, ?)', [
|
||||
params['Ds_Amount'],
|
||||
const base64hmac = Self.createSignature(
|
||||
orderId,
|
||||
merchantId,
|
||||
params['Ds_Currency'],
|
||||
params['Ds_Response'],
|
||||
params['Ds_ErrorCode']
|
||||
]);
|
||||
merchant.secretKey,
|
||||
merchantParameters
|
||||
);
|
||||
|
||||
return true;
|
||||
if (base64hmac !== base64url.toBase64(signature))
|
||||
throw new UserError('Invalid signature');
|
||||
|
||||
await Self.rawSql(
|
||||
'CALL hedera.tpvTransaction_confirm(?, ?, ?, ?, ?, ?)', [
|
||||
params['Ds_Amount'],
|
||||
orderId,
|
||||
merchantId,
|
||||
params['Ds_Currency'],
|
||||
params['Ds_Response'],
|
||||
params['Ds_ErrorCode']
|
||||
]);
|
||||
|
||||
return true;
|
||||
} catch (err) {
|
||||
if (transaction)
|
||||
await transaction.updateAttribute('responseError', err.message);
|
||||
else
|
||||
console.error(err);
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -35,6 +35,18 @@
|
|||
},
|
||||
"created": {
|
||||
"type": "date"
|
||||
},
|
||||
"merchantParameters": {
|
||||
"type": "string"
|
||||
},
|
||||
"signature": {
|
||||
"type": "string"
|
||||
},
|
||||
"signatureVersion": {
|
||||
"type": "string"
|
||||
},
|
||||
"responseError": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
|
@ -45,4 +57,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
description="$ctrl.invoiceOut.ref"
|
||||
summary="$ctrl.$.summary">
|
||||
<slot-dot-menu>
|
||||
<vn-invoice-out-descriptor-menu
|
||||
<vn-invoice-out-descriptor-menu
|
||||
invoice-out="$ctrl.invoiceOut"
|
||||
parent-reload="$ctrl.reload()"
|
||||
/>
|
||||
|
@ -11,23 +11,23 @@
|
|||
<slot-body>
|
||||
<div class="attributes">
|
||||
<vn-label-value
|
||||
label="Date"
|
||||
label="Date"
|
||||
value="{{$ctrl.invoiceOut.issued | date: 'dd/MM/yyyy'}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Import"
|
||||
label="Import"
|
||||
value="{{$ctrl.invoiceOut.amount | currency: 'EUR': 2}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Client">
|
||||
<span
|
||||
<span
|
||||
ng-click="clientDescriptor.show($event, $ctrl.invoiceOut.client.id)"
|
||||
class="link">
|
||||
{{$ctrl.invoiceOut.client.name}}
|
||||
</span>
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Company"
|
||||
label="Company"
|
||||
value="{{$ctrl.invoiceOut.company.code}}">
|
||||
</vn-label-value>
|
||||
</div>
|
||||
|
@ -53,4 +53,7 @@
|
|||
</vn-descriptor-content>
|
||||
<vn-popup vn-id="summary">
|
||||
<vn-invoice-out-summary invoice-out="$ctrl.invoiceOut"></vn-invoice-out-summary>
|
||||
</vn-popup>
|
||||
</vn-popup>
|
||||
<vn-client-descriptor-popover
|
||||
vn-id="clientDescriptor">
|
||||
</vn-client-descriptor-popover>
|
||||
|
|
|
@ -59,17 +59,10 @@ module.exports = Self => {
|
|||
}
|
||||
|
||||
const writeStream = fs.createWriteStream(filePath);
|
||||
writeStream.on('open', () => {
|
||||
response.pipe(writeStream);
|
||||
});
|
||||
|
||||
writeStream.on('error', async error => {
|
||||
await errorHandler(image.itemFk, error, filePath);
|
||||
});
|
||||
|
||||
writeStream.on('finish', async function() {
|
||||
writeStream.end();
|
||||
});
|
||||
writeStream.on('open', () => response.pipe(writeStream));
|
||||
writeStream.on('error', async error =>
|
||||
await errorHandler(image.itemFk, error, filePath));
|
||||
writeStream.on('finish', writeStream.end());
|
||||
|
||||
writeStream.on('close', async function() {
|
||||
try {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -7,37 +7,27 @@ description:
|
|||
followGuide: Puedes utilizar como guía, el vídeo del montaje del ribon y la cinta
|
||||
<a href='https://www.youtube.com/watch?v=qhb0kgQF3o8' title='Youtube' target='_blank'
|
||||
style='color:#8dba25'>https://www.youtube.com/watch?v=qhb0kgQF3o8</a>. También
|
||||
necesitarás el QLabel, el programa para imprimir las cintas.
|
||||
downloadFrom: Puedes descargarlo desde este enlace <a href='https://cdn.verdnatura.es/public/QLabel_IV_V1.37_Install_en.exe'
|
||||
title='Descargar QLabel' target='_blank' style='color:#8dba25'>https://cdn.verdnatura.es/public/QLabel_IV_V1.37_Install_en.exe</a>
|
||||
necesitarás el GoLabel, el programa para imprimir las cintas.
|
||||
downloadFrom: Puedes descargarlo desde este enlace <a href='https://godex.s3-accelerate.amazonaws.com/_6f5glRrVhQAEBGhdUsqJA.file?v01'
|
||||
title='Descargar GoLabel' target='_blank' style='color:#8dba25'>https://godex.s3-accelerate.amazonaws.com/_6f5glRrVhQAEBGhdUsqJA.file?v01</a>
|
||||
downloadDriver: En este enlace puedes descargar el driver de la impresora <a href='https://es.seagullscientific.com/support/downloads/drivers/godex/download/'
|
||||
title='Descargar driver' target='_blank' style='color:#8dba25'>https://es.seagullscientific.com/support/downloads/drivers/godex/download/</a>
|
||||
sections:
|
||||
QLabel:
|
||||
title: Utilización de QLabel
|
||||
GoLabel:
|
||||
title: Utilización de GoLabel
|
||||
description: Para utilizar el programa de impresión de cintas sigue estos pasos
|
||||
steps:
|
||||
- Abre el programa QLabel
|
||||
- Haz clic en el icono de la barra superior con forma de 'carpeta'
|
||||
- Selecciona el archivo llamado 'model.ezp' adjunto en este correo, y haz clic
|
||||
en abrir
|
||||
- Ve a 'File' -> 'Save as' y guárdalo en el escritorio con otro nombre
|
||||
- Cierra el Qlabel y abre el archivo que acabamos de guardar
|
||||
- Haz clic <strong>encima del texto</strong> con el botón secundario del ratón
|
||||
- Elige la primera opción 'setup'
|
||||
- Cambia el texto para imprimir
|
||||
- Haz clic en el botón 'Ok'
|
||||
- Desplázate con el ratón para ver la medida máxima que ocupa el texto
|
||||
- Haz clic <strong>encima del texto</strong> con el botón secundario del ratón
|
||||
- Elige la segunda opción 'Setup printer'
|
||||
- Haz clic en la primera pestaña 'Label Setup'
|
||||
- Modifica la propiedad 'Paper Height' con la medida máxima consultada anteriormente
|
||||
- 'Comprueba el puerto de la impresora, botón de de la derecha ''SETUP PRINTER''
|
||||
y en la parte derecha, igual como la imagen que adjuntamos, seleccionar la que
|
||||
ponga ''USB00x: GODEX'''
|
||||
- Haz clic en el botón 'Ok'
|
||||
- Haz clic sobre el icono de la impresora
|
||||
- Haz clic en 'Print'
|
||||
- Abre el programa GoLabel
|
||||
- Haz clic en el icono de la barra superior con forma de carpeta con una hoja.
|
||||
- Selecciona el archivo llamado 'model.ezp'(que seguramente este en 'Descargas') adjunto en este correo, haz clic en abrir.
|
||||
- Una vez abierto el archivo, haz doble click sobre el texto, en el cuadro que nos sale pulse donde esta el texto de ejemplo (En este caso "TUS HERMANOS") y nos saldra en ese mismo recuadro a la parte izquierda para editarlo y escribir lo que quiera.
|
||||
- Cuando ya tenga el texto que desee pulse en el boton 'OK'.
|
||||
- Ve a 'Archivo' → 'Guardar Como' y guárdelo en el escritorio en el escritorio con otro nombre.
|
||||
- Luego para imprimir primero deberá configurar la impresora.
|
||||
- Pulse en el octavo icono de la barra de arriba, que en este caso será una impresora con un engranaje naranja.
|
||||
- Una vez ahí, pulsaremos en el desplegable de modelo de impresora y elegiremos el modelo que coincida con el nuestro 'G***'.
|
||||
- Pulse guardar y ya tendremos nuestra impresora con la configuración guardada.
|
||||
- Y por último, para imprimir, haz click en el noveno icono, el cual corresponde a una impresora azul.
|
||||
help:
|
||||
title: "¿Necesitas ayuda?"
|
||||
description: Si necesitas ayuda, descárgate nuestro programa de soporte para poder
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
<p v-html="$t('description.downloadFrom')"></p>
|
||||
<p v-html="$t('description.downloadDriver')"></p>
|
||||
|
||||
<h1>{{$t('sections.QLabel.title')}}</h1>
|
||||
<p>{{$t('sections.QLabel.description')}}:</p>
|
||||
<h1>{{$t('sections.GoLabel.title')}}</h1>
|
||||
<p>{{$t('sections.GoLabel.description')}}:</p>
|
||||
<ol>
|
||||
<li v-for="step in $t('sections.QLabel.steps')">
|
||||
<li v-for="step in $t('sections.GoLabel.steps')">
|
||||
<span v-html="step"></span>
|
||||
</li>
|
||||
</ol>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
SELECT
|
||||
io.amount,
|
||||
io.ref,
|
||||
io.issued,
|
||||
io2.amount,
|
||||
io2.ref,
|
||||
io2.issued,
|
||||
ict.description
|
||||
FROM invoiceOut io
|
||||
JOIN invoiceCorrection ic ON ic.correctingFk = io.id
|
||||
JOIN invoiceCorrectionType ict ON ict.id = ic.invoiceCorrectionTypeFk
|
||||
JOIN invoiceOut io2 ON io2.id = ic.correctedFk
|
||||
LEFT JOIN ticket t ON t.refFk = io.ref
|
||||
WHERE io.ref = ?
|
||||
JOIN invoiceCorrectionType ict ON ict.id = ic.invoiceCorrectionTypeFk
|
||||
WHERE io.ref = ?
|
||||
|
|
Loading…
Reference in New Issue