@houlak/plexo-sdk 0.1.40 → 0.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -114,16 +114,20 @@ var unwrapCallback = function (fingerprint, response) { return __awaiter(void 0,
114
114
  case 3:
115
115
  certificate = new crypto_1.X509Certificate(Buffer.from(plexoResponse.Object.Object.Response.Key, 'base64'));
116
116
  key = certificate.publicKey.export({ format: 'pem', type: 'pkcs1' });
117
+ logger_lib_1.default.info(response.object, 'Objeto de respuesta de Plexo');
117
118
  canonizedObject = signatureUtils_1.signatureUtils.canonizeJson(response.object, [
118
119
  'CreditLimits',
119
120
  'creditLimits',
120
121
  ]);
122
+ logger_lib_1.default.info(canonizedObject, 'Objeto canonizado');
121
123
  objectInPascalCase = utils_1.caseUtils.toPascalKeys(canonizedObject);
122
124
  objectSorted = signatureUtils_1.signatureUtils.sortObject(objectInPascalCase);
125
+ logger_lib_1.default.info(objectSorted, 'Objeto a verificar');
123
126
  objectBuffer = Buffer.from(JSON.stringify(objectSorted));
124
127
  verifySignature = (0, crypto_1.createVerify)('SHA512')
125
128
  .update(objectBuffer)
126
129
  .verify(key, response.signature, 'base64');
130
+ logger_lib_1.default.info(verifySignature, 'Verify Signature');
127
131
  serverResponse = {
128
132
  response: response.object.object,
129
133
  resultCode: verifySignature ? __1.ResultCodes.Ok : __1.ResultCodes.InvalidSignature,
@@ -5,6 +5,7 @@ var js_convert_case_1 = require("js-convert-case");
5
5
  var specialWords = [
6
6
  { word: 'UtcUnixTimeExpiration', substitute: 'UTCUnixTimeExpiration' },
7
7
  { word: 'UtcunixTimeExpiration', substitute: 'UTCUnixTimeExpiration' },
8
+ { word: 'utcunixTimeExpiration', substitute: 'UTCUnixTimeExpiration' },
8
9
  { word: 'VatAmount', substitute: 'VATAmount' },
9
10
  { word: 'InstrumentExpirationUtc', substitute: 'InstrumentExpirationUTC' },
10
11
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@houlak/plexo-sdk",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "description": "Node SDK for Plexo payment services",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",