diff --git a/.github/workflows/aqua.yml b/.github/workflows/aqua.yml index 97fbda0..633e7bc 100644 --- a/.github/workflows/aqua.yml +++ b/.github/workflows/aqua.yml @@ -16,7 +16,7 @@ jobs: - name: Run Aqua scanner uses: docker://aquasec/aqua-scanner with: - args: trivy fs --sast --reachability --scanners config,vuln,secret . + args: trivy fs --sast --reachability --scanners misconfig,vuln,secret . # To customize which severities add the following flag: --severity UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL # To enable SAST scanning, add: --sast # To enable reachability scanning, add: --reachability diff --git a/cartridges/int_alma/cartridge/scripts/helpers/almaPaymentHelper.js b/cartridges/int_alma/cartridge/scripts/helpers/almaPaymentHelper.js index 6a9151d..2863fb9 100644 --- a/cartridges/int_alma/cartridge/scripts/helpers/almaPaymentHelper.js +++ b/cartridges/int_alma/cartridge/scripts/helpers/almaPaymentHelper.js @@ -410,20 +410,20 @@ function buildPaymentData(installmentsCount, deferredDays, locale, isManualCaptu paymentData.payment.capture_method = 'manual'; } - if (installmentsCount >= 5) { - var products = currentBasket.getAllProductLineItems(); - var items = []; - - products.toArray() - .forEach(function (productLineItem) { - var product = productLineItem.getProduct(); - items.push(almaHelper.formatItem(product, productLineItem, locale)); - }); - - paymentData.payment.cart = { - items: items - }; - } + + var products = currentBasket.getAllProductLineItems(); + var items = []; + + products.toArray() + .forEach(function (productLineItem) { + var product = productLineItem.getProduct(); + items.push(almaHelper.formatItem(product, productLineItem, locale)); + }); + + paymentData.payment.cart = { + items: items + }; + return paymentData; } diff --git a/test/mocks/helpers/almaPaymentHelpers.js b/test/mocks/helpers/almaPaymentHelpers.js index 24b5956..e920eda 100644 --- a/test/mocks/helpers/almaPaymentHelpers.js +++ b/test/mocks/helpers/almaPaymentHelpers.js @@ -99,6 +99,9 @@ function resolvedPaymentData(installmentsCount, defferedDays, locale, origin, ha }, deferred: '', deferred_description: '', + cart: { + items: [] + }, custom_data: { cms_name: 'SFCC', cms_version: '4.0.0',