diff --git a/processor/package-lock.json b/processor/package-lock.json index e743cc3..56ef91b 100644 --- a/processor/package-lock.json +++ b/processor/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@adyen/api-library": "22.1.0", "@commercetools-backend/loggers": "22.38.1", - "@commercetools/connect-payments-sdk": "0.16.1", + "@commercetools/connect-payments-sdk": "0.17.2", "@fastify/autoload": "6.0.3", "@fastify/cors": "10.0.2", "@fastify/formbody": "8.0.2", @@ -822,12 +822,11 @@ } }, "node_modules/@commercetools/connect-payments-sdk": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@commercetools/connect-payments-sdk/-/connect-payments-sdk-0.16.1.tgz", - "integrity": "sha512-w/6mZCavCE9FROe0eca09tpVFFdJSeYE3QoTka0ph1ivNQ5naYqmxoG+iNVFR3txTf7mZkEKpb3utjNgKqSB6g==", - "license": "ISC", + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/@commercetools/connect-payments-sdk/-/connect-payments-sdk-0.17.2.tgz", + "integrity": "sha512-6PCdbGZoUAtaRxWbxfcCafZNTMD0qLBCzm9H0W4KH045OZ2cm1BbLWmN90B3RzKHaFpe2yjEOplUMtpLMZZ/iQ==", "dependencies": { - "@commercetools-backend/loggers": "22.38.1", + "@commercetools-backend/loggers": "22.39.0", "@commercetools/platform-sdk": "8.1.0", "@commercetools/sdk-client-v2": "2.5.0", "jsonwebtoken": "9.0.2", @@ -836,6 +835,39 @@ "logform": "2.7.0" } }, + "node_modules/@commercetools/connect-payments-sdk/node_modules/@commercetools-backend/loggers": { + "version": "22.39.0", + "resolved": "https://registry.npmjs.org/@commercetools-backend/loggers/-/loggers-22.39.0.tgz", + "integrity": "sha512-bQfz8lHX4vRL1OOlNin3dpA0K/yt5KplZjSfIiyXNBBxr++ylt6snD133l8iwTYOFAosqT1AciIi2xPMjMtJ0A==", + "dependencies": { + "@babel/runtime": "^7.22.15", + "@babel/runtime-corejs3": "^7.22.15", + "@types/lodash": "^4.14.198", + "@types/triple-beam": "1.3.5", + "express-winston": "4.2.0", + "fast-safe-stringify": "2.1.1", + "lodash": "4.17.21", + "logform": "2.6.0", + "triple-beam": "1.4.1", + "winston": "3.13.0" + } + }, + "node_modules/@commercetools/connect-payments-sdk/node_modules/@commercetools-backend/loggers/node_modules/logform": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", + "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", + "dependencies": { + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/@commercetools/connect-payments-sdk/node_modules/logform": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", @@ -8650,11 +8682,11 @@ } }, "@commercetools/connect-payments-sdk": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@commercetools/connect-payments-sdk/-/connect-payments-sdk-0.16.1.tgz", - "integrity": "sha512-w/6mZCavCE9FROe0eca09tpVFFdJSeYE3QoTka0ph1ivNQ5naYqmxoG+iNVFR3txTf7mZkEKpb3utjNgKqSB6g==", + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/@commercetools/connect-payments-sdk/-/connect-payments-sdk-0.17.2.tgz", + "integrity": "sha512-6PCdbGZoUAtaRxWbxfcCafZNTMD0qLBCzm9H0W4KH045OZ2cm1BbLWmN90B3RzKHaFpe2yjEOplUMtpLMZZ/iQ==", "requires": { - "@commercetools-backend/loggers": "22.38.1", + "@commercetools-backend/loggers": "22.39.0", "@commercetools/platform-sdk": "8.1.0", "@commercetools/sdk-client-v2": "2.5.0", "jsonwebtoken": "9.0.2", @@ -8663,6 +8695,38 @@ "logform": "2.7.0" }, "dependencies": { + "@commercetools-backend/loggers": { + "version": "22.39.0", + "resolved": "https://registry.npmjs.org/@commercetools-backend/loggers/-/loggers-22.39.0.tgz", + "integrity": "sha512-bQfz8lHX4vRL1OOlNin3dpA0K/yt5KplZjSfIiyXNBBxr++ylt6snD133l8iwTYOFAosqT1AciIi2xPMjMtJ0A==", + "requires": { + "@babel/runtime": "^7.22.15", + "@babel/runtime-corejs3": "^7.22.15", + "@types/lodash": "^4.14.198", + "@types/triple-beam": "1.3.5", + "express-winston": "4.2.0", + "fast-safe-stringify": "2.1.1", + "lodash": "4.17.21", + "logform": "2.6.0", + "triple-beam": "1.4.1", + "winston": "3.13.0" + }, + "dependencies": { + "logform": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", + "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", + "requires": { + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + } + } + } + }, "logform": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", diff --git a/processor/package.json b/processor/package.json index be060c6..148e207 100644 --- a/processor/package.json +++ b/processor/package.json @@ -23,7 +23,7 @@ "dependencies": { "@adyen/api-library": "22.1.0", "@commercetools-backend/loggers": "22.38.1", - "@commercetools/connect-payments-sdk": "0.16.1", + "@commercetools/connect-payments-sdk": "0.17.2", "@fastify/autoload": "6.0.3", "@fastify/cors": "10.0.2", "@fastify/formbody": "8.0.2", diff --git a/processor/src/services/adyen-payment.service.ts b/processor/src/services/adyen-payment.service.ts index 49f03c5..ec90c24 100644 --- a/processor/src/services/adyen-payment.service.ts +++ b/processor/src/services/adyen-payment.service.ts @@ -203,7 +203,7 @@ export class AdyenPaymentService extends AbstractPaymentService { id: getCartIdFromContext(), }); - const amountPlanned = await this.ctCartService.getPaymentAmount({ cart: ctCart }); + const amountPlanned = await this.ctCartService.getPlannedPaymentAmount({ cart: ctCart }); const ctPayment = await this.ctPaymentService.createPayment({ amountPlanned, paymentMethodInfo: {