diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5639a53..23057a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ include: variables: SAST_EXCLUDED_ANALYZERS: 'eslint,semgrep' - DOCKWARE_VERSION: '6.4.19.0' + DOCKWARE_VERSION: '6.4.20.2' GIT_DEPTH: 10 RELEASE_NAME: ${DOCKER_STACK}-${DOCKER_SERVICE}-${CI_COMMIT_REF_SLUG} @@ -102,6 +102,7 @@ build-test: --cache=true --context "dir://${CI_PROJECT_DIR}" --dockerfile "./bin/docker/images/shopware/Dockerfile" + --build-arg DOCKWARE_VERSION=$DOCKWARE_VERSION --destination "$REGISTRY_CI/test-jobs-${DOCKER_STACK}-${DOCKER_SERVICE}_web:${CI_COMMIT_REF_SLUG}" except: variables: @@ -330,6 +331,7 @@ build: --cache=true --context "dir://${CI_PROJECT_DIR}" --dockerfile "./bin/docker/images/shopware/Dockerfile" + --build-arg DOCKWARE_VERSION=$DOCKWARE_VERSION --destination "${REGISTRY_CD}/${DOCKER_STACK}-${DOCKER_SERVICE}-web:${CI_COMMIT_REF_SLUG}" tags: - small diff --git a/CHANGELOG.md b/CHANGELOG.md index a5cfed2..7b56c54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ # CHANGELOG +## Version 1.1.0 + +- **Add** : Add cancel button option to hosted page +- **Add** : Update Giropay Logo +- **Fixed** : Add `iDeal` bank choice when submitting checkout + ## Version 1.0.3 -- **Fix** : EC-3315 - Fixed Database definition +- **Fix** : Fixed Database definition ## Version 1.0.2 diff --git a/bin/docker/kubernetes/helm/templates/shopware-deployment.yaml b/bin/docker/kubernetes/helm/templates/shopware-deployment.yaml index e4e76c9..f0c520e 100644 --- a/bin/docker/kubernetes/helm/templates/shopware-deployment.yaml +++ b/bin/docker/kubernetes/helm/templates/shopware-deployment.yaml @@ -81,9 +81,6 @@ spec: name: shopware-{{ .Release.Name }} resources: requests: - memory: "4G" - cpu: "1000m" - limits: memory: "5G" cpu: "1200m" envFrom: @@ -92,10 +89,3 @@ spec: ports: - containerPort: 80 name: shopware - nodeSelector: - node_type: default - tolerations: - - key: cd_service - operator: Equal - value: only - effect: NoExecute diff --git a/composer.json b/composer.json index 2aebf09..5e8d139 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "hipay/hipay-enterprise-shopware-6", "description": "HiPay enterprise plugin for Shopware 6", "license": "Apache-2.0", - "version": "1.0.3", + "version": "1.1.0", "authors": [ { "email": "support.tpp@hipay.com", @@ -49,7 +49,7 @@ } }, "require": { - "hipay/hipay-fullservice-sdk-php": "^2.11", + "hipay/hipay-fullservice-sdk-php": "^2.14.0", "giggsey/libphonenumber-for-php": "^8.13" }, "require-dev": { diff --git a/src/PaymentMethod/AbstractPaymentMethod.php b/src/PaymentMethod/AbstractPaymentMethod.php index c2ca92c..2195b0c 100644 --- a/src/PaymentMethod/AbstractPaymentMethod.php +++ b/src/PaymentMethod/AbstractPaymentMethod.php @@ -307,6 +307,8 @@ private function generateRequestHostedPage( $orderRequest = $this->hydrateGenericOrderRequest(new HostedPaymentPageRequest(), $transaction, $locale); $orderRequest->payment_product_list = static::getProductCode(); + $orderRequest->display_cancel_button = $this->config->isCancelButtonDisplayed(); + return $this->hydrateHostedPage($orderRequest, $transaction); } diff --git a/src/Resources/app/storefront/dist/storefront/js/hi-pay-payment-plugin.js b/src/Resources/app/storefront/dist/storefront/js/hi-pay-payment-plugin.js index e175ccf..7745889 100644 --- a/src/Resources/app/storefront/dist/storefront/js/hi-pay-payment-plugin.js +++ b/src/Resources/app/storefront/dist/storefront/js/hi-pay-payment-plugin.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([["hi-pay-payment-plugin"],{z0Y9:function(e,t,n){"use strict";n.r(t);var r=n("FGIj");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this._configHostedFields.fields[e].selector,o=document.querySelector("#"+r);t?o.classList.add(this.options.errorClass):o.classList.remove(this.options.errorClass);var i=document.querySelector("#"+this.options.errorPrefix+"-"+r);i&&(i.innerHTML=n)}},{key:"getPaymentName",value:function(){throw new Error('Method "getPaymentName" must be implemented')}},{key:"getConfigHostedFields",value:function(){throw new Error('Method "getConfigHostedFields" must be implemented')}}])&&a(n.prototype,r),o&&a(n,o),t}(r.a);function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this._configHostedFields.fields[e].selector,o=document.querySelector("#"+r);t?o.classList.add(this.options.errorClass):o.classList.remove(this.options.errorClass);var i=document.querySelector("#"+this.options.errorPrefix+"-"+r);i&&(i.innerHTML=n)}},{key:"getPaymentName",value:function(){throw new Error('Method "getPaymentName" must be implemented')}},{key:"getConfigHostedFields",value:function(){throw new Error('Method "getConfigHostedFields" must be implemented')}}])&&u(n.prototype,r),o&&u(n,o),t}(r.a);function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n=0;n { + this._cardInstance.on('change', response => { valid = response.valid; if (valid) { - this._cardInstance.getPaymentData().then((result) => { + this._cardInstance.getPaymentData().then(result => { inputResponse.setAttribute('value', JSON.stringify(result)); }); } else { @@ -65,19 +67,29 @@ export default class HipayHostedFieldsPlugin extends Plugin { }); // handle errors on form validation - inputResponse.addEventListener('invalid', (e) => { + inputResponse.addEventListener('invalid', e => { if (!valid) { this._cardInstance.getPaymentData().then( () => {}, - (result) => { + result => { inputResponse.setAttribute('value', ''); - result.forEach((element) => + result.forEach(element => this._errorHandler(element.field, true, element.error) ); } ); } }); + + this._form.addEventListener('submit', e => { + e.preventDefault(); + const target = e.currentTarget; + + this._cardInstance.getPaymentData().then(result => { + inputResponse.setAttribute('value', JSON.stringify(result)); + target.submit(); + }); + }); }); } @@ -99,9 +111,11 @@ export default class HipayHostedFieldsPlugin extends Plugin { node.classList.remove(this.options.errorClass); } - const errorNode = document.querySelector('#' + this.options.errorPrefix + '-' + targetId); - if(errorNode) { - errorNode.innerHTML= errorMessage; + const errorNode = document.querySelector( + '#' + this.options.errorPrefix + '-' + targetId + ); + if (errorNode) { + errorNode.innerHTML = errorMessage; } } diff --git a/src/Resources/config/config.xml b/src/Resources/config/config.xml index 9bcaf0e..a77f4cb 100644 --- a/src/Resources/config/config.xml +++ b/src/Resources/config/config.xml @@ -266,6 +266,12 @@ + + cancelButton + + + +