diff --git a/.docker/.htaccess1784 b/.docker/.htaccess1784 index 04718fc55..f73e2e24f 100644 --- a/.docker/.htaccess1784 +++ b/.docker/.htaccess1784 @@ -10,75 +10,75 @@ SetEnv HTTP_MOD_REWRITE On RewriteEngine on -#Domain: demoshop1784.eu.ngrok.io -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +#Domain: demoshop1784.ngrok.io +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] -#Domain: demoshop1784.eu.ngrok.io -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +#Domain: demoshop1784.ngrok.io +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^SHOP2$ /SHOP2/ [L,R] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^SHOP2/(.*) /$1 [L] # Images -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^.*$ - [NC,L] -RewriteCond %{HTTP_HOST} ^demoshop1784.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$ RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] diff --git a/.docker/.htaccess8 b/.docker/.htaccess8 index 3796d6836..1b771126d 100755 --- a/.docker/.htaccess8 +++ b/.docker/.htaccess8 @@ -10,77 +10,77 @@ SetEnv HTTP_MOD_REWRITE On RewriteEngine on -#Domain: demoshop8.eu.ngrok.io -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +#Domain: demoshop8.ngrok.io +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L] # Images -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] -#Domain: demoshop8.eu.ngrok.io -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +#Domain: demoshop8.ngrok.io +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^shop2$ /shop2/ [L,R] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^shop2/(.*) /$1 [L] # Images -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^.*$ - [NC,L] -RewriteCond %{HTTP_HOST} ^demoshop8.eu.ngrok.io$ +RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$ RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] diff --git a/.github/workflows/E2E_On_PR.yml b/.github/workflows/E2E_On_PR.yml index 5116e0941..218873e4a 100755 --- a/.github/workflows/E2E_On_PR.yml +++ b/.github/workflows/E2E_On_PR.yml @@ -1,8 +1,8 @@ -name: Cypress E2E Automation +name: Cypress E2E Automation [develop branch] on: pull_request: types: [opened, reopened] - branches: '**' + branches: [develop] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -17,19 +17,18 @@ jobs: include: - prestashop: 'PS1784' make: 'make e2eh1784' - demoshop: 'demoshop1784' + subdomain: 'demoshop1784' port: '8002' yml: 'docker-compose.1784.yml' - url: 'https://demoshop1784.eu.ngrok.io' + url: 'https://demoshop1784.ngrok.io' test_spec: '**/cypress/e2e/ps1784/**' TestRailID: R4954 - ModuleUpgradeTest: 'make upgrading-module-test-1784' - prestashop: 'PS8' make: 'make e2eh8' - demoshop: 'demoshop8' + subdomain: 'demoshop8' port: '8142' yml: 'docker-compose.8.yml' - url: 'https://demoshop8.eu.ngrok.io' + url: 'https://demoshop8.ngrok.io' test_spec: '**/cypress/e2e/ps8/**' TestRailID: R6470 env: @@ -43,7 +42,7 @@ jobs: shell: bash - run: ./ngrok authtoken ${{ secrets.NGROK_TOKEN }} shell: bash - - run: ./ngrok http -region=eu -subdomain=${{ matrix.demoshop }} ${{ matrix.port }} > ngrok.log & + - run: ./ngrok http -region=eu -subdomain=${{ matrix.subdomain }} ${{ matrix.port }} > ngrok.log & shell: bash - name: Install composer run: composer i @@ -58,6 +57,22 @@ jobs: run: | ${{ matrix.make }} + - name: Waiting for Ngrok tunnel + run: | + URL="${{ matrix.url }}" + + while true; do + response=$(curl -s -o /dev/null -w "%{http_code}" "$URL") + if [ "$response" = "302" ]; then + echo "URL is returning 302 HTTP status code, Ngrok tunnel is reached, good to go!" + break # Exit the loop if the response is 302 + else + echo "URL is not ready yet, because Ngrok sessions are all in use at the moment, please wait. Retrying to build the Ngrok tunnel again in 5 seconds..." + sleep 5 # Wait for 5 seconds before retrying + ./ngrok http -region=us -subdomain=${{ matrix.subdomain }} ${{ matrix.port }} > ngrok.log & + fi + done + - name: Running ${{ matrix.prestashop }} Cypress E2E tests run: | export CYPRESS_baseUrl='${{ matrix.url }}' @@ -67,7 +82,7 @@ jobs: export CYPRESS_TESTRAIL_DOMAIN='${{ secrets.TESTRAIL_DOMAIN }}' export CYPRESS_TESTRAIL_USERNAME='${{ secrets.TESTRAIL_USERNAME }}' export CYPRESS_TESTRAIL_PASSWORD='${{ secrets.TESTRAIL_PASSWORD }}' - npm install cypress@12.15.0 + npm install -D cypress npm ci npx cypress run --spec "${{ matrix.test_spec }}" --browser chrome @@ -75,7 +90,7 @@ jobs: if: ${{ always() }} uses: actions/upload-artifact@v2 with: - name: videos_screenshots + name: Cypress_Mollie_videos_screenshots_${{ matrix.prestashop }} retention-days: 2 path: | cypress/videos diff --git a/.github/workflows/upgrading_check.yml b/.github/workflows/upgrading_check.yml index 7dc2e6141..d5f36c6e0 100644 --- a/.github/workflows/upgrading_check.yml +++ b/.github/workflows/upgrading_check.yml @@ -1,8 +1,8 @@ -name: Module upgrade / downgrade testing (last version > v.5.2.1 > master version) +name: Module upgrade / downgrade testing (last version > v.5.2.0 > `develop` version) on: pull_request: types: [opened, reopened] - branches: [master, v*.*.*] + branches: [develop] jobs: Module-upgrading-check: runs-on: ubuntu-latest @@ -12,16 +12,9 @@ jobs: include: - prestashop: 'PS1784' make: 'make e2eh1784' - demoshop: 'demoshop1784' port: '8002' yml: 'docker-compose.1784.yml' ModuleUpgradeTest: 'make upgrading-module-test-1784' - - prestashop: 'PS8' - make: 'make e2eh8' - demoshop: 'demoshop8' - port: '8142' - yml: 'docker-compose.8.yml' - ModuleUpgradeTest: 'make upgrading-module-test-8' steps: - name: Checkout uses: actions/checkout@v3.5.3 diff --git a/Makefile b/Makefile index 3bd83ddb1..638391116 100755 --- a/Makefile +++ b/Makefile @@ -5,65 +5,46 @@ fix-lint: docker-compose run --rm php sh -c "vendor/bin/php-cs-fixer fix --using-cache=no" #PS1784 -e2eh1784: test-e2e-headless-1784 -test-e2e-headless-1784: - make e2e1784p - -e2e1784p: e2e-1784-prepare -e2e-1784-prepare: +e2eh1784: # detaching containers docker-compose -f docker-compose.1784.yml up -d --force-recreate # sees what containers are running docker-compose -f docker-compose.1784.yml ps # waits for mysql to load /bin/bash .docker/wait-for-container.sh mysql-mollie-1784 - # preloads initial data - make bps1784 - /bin/bash .docker/wait-for-container.sh prestashop-mollie-1784 - -bps1784: build-ps-1784 -build-ps-1784: # configuring your prestashop docker exec -i prestashop-mollie-1784 sh -c "rm -rf /var/www/html/install" # configuring base database mysql -h 127.0.0.1 -P 9002 --protocol=tcp -u root -pprestashop prestashop < ${PWD}/tests/seed/database/prestashop_1784_2.sql # installing module - docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie" + docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=3" # uninstalling module - docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie" + docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie --id_shop=3" # installing the module again - docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie" + docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=3" + # enabling the module + docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module enable mollie --id_shop=3" # chmod all folders docker exec -i prestashop-mollie-1784 sh -c "chmod -R 777 /var/www/html" #PS8 -e2eh8: test-e2e-headless-8 -test-e2e-headless-8: - make e2e8p - -e2e8p: e2e-8-prepare -e2e-8-prepare: +e2eh8: # detaching containers docker-compose -f docker-compose.8.yml up -d --force-recreate # sees what containers are running docker-compose -f docker-compose.8.yml ps # waits for mysql to load /bin/bash .docker/wait-for-container.sh mysql-mollie-8 - # preloads initial data - make bps8 - -bps8: build-ps-8 -build-ps-8: # configuring your prestashop docker exec -i prestashop-mollie-8 sh -c "rm -rf /var/www/html/install" # configuring base database mysql -h 127.0.0.1 -P 9459 --protocol=tcp -u root -pprestashop prestashop < ${PWD}/tests/seed/database/prestashop_8.sql # installing module - docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie" + docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=2" # uninstalling module - docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie" + docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie --id_shop=2" # installing the module again - docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie" + docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=2" # enabling the module docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module enable mollie --id_shop=2" # chmod all folders @@ -73,26 +54,18 @@ npm-package-install: cd views/assets && npm i && npm run build run-e2e-tests-locally: - npm install cypress@12.15.0 + npm install -D cypress npm ci npx cypress run - + # checking the module upgrading - installs older module then installs from master branch upgrading-module-test-1784: git fetch - git checkout origin/v5.2.1 . + git checkout v5.2.0 . composer install - # installing 5.2.1 module + # installing 5.2.0 module docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie" + # installing develop branch module git checkout -- . - git checkout master --force + git checkout develop --force docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie" - -upgrading-module-test-8: - git fetch - git checkout origin/v5.2.1 . - composer install - make e2e8p - git checkout -- . - git checkout master --force - docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie" diff --git a/changelog.md b/changelog.md index 8d6670e1f..bd19e9dc0 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,10 @@ # Changelog # +## Changes in release 6.0.2 ## ++ Decoupled Apple Pay direct feature flag into product and cart separate settings. ++ Overall improvements and bug fixes. + ## Changes in release 6.0.1 ## + Fixed payment fee tax problems and improved fee set-up process. + Sync Mollie components and Single click flag to the environment selected. diff --git a/controllers/front/subscriptionWebhook.php b/controllers/front/subscriptionWebhook.php index 9f39420a5..e01c99c98 100644 --- a/controllers/front/subscriptionWebhook.php +++ b/controllers/front/subscriptionWebhook.php @@ -12,6 +12,7 @@ use Mollie\Controller\AbstractMollieController; use Mollie\Errors\Http\HttpStatusCode; +use Mollie\Handler\ErrorHandler\ErrorHandler; use Mollie\Subscription\Handler\RecurringOrderHandler; if (!defined('_PS_VERSION_')) { @@ -57,8 +58,18 @@ protected function executeWebhook() /** @var RecurringOrderHandler $recurringOrderHandler */ $recurringOrderHandler = $this->module->getService(RecurringOrderHandler::class); - $recurringOrderHandler->handle($transactionId); - return 'OK'; + /** @var ErrorHandler $errorHandler */ + $errorHandler = $this->module->getService(ErrorHandler::class); + + try { + $recurringOrderHandler->handle($transactionId); + } catch (Exception $exception) { + $errorHandler->handle($exception, null, false); + + $this->respond('failed', HttpStatusCode::HTTP_BAD_REQUEST); + } + + $this->respond('OK'); } } diff --git a/cypress.config.js b/cypress.config.js index 26ec284cf..a15ae6978 100755 --- a/cypress.config.js +++ b/cypress.config.js @@ -4,7 +4,7 @@ module.exports = defineConfig({ chromeWebSecurity: false, experimentalMemoryManagement: true, experimentalSourceRewriting: true, - numTestsKeptInMemory: 3, + numTestsKeptInMemory: 0, defaultCommandTimeout: 15000, projectId: 'xb89dr', retries: 3, @@ -18,6 +18,7 @@ module.exports = defineConfig({ setupNodeEvents(on, config) { require('./cypress/plugins/index.js')(on, config) require("cypress-fail-fast/plugin")(on, config); + require('cypress-terminal-report/src/installLogsPrinter')(on); return config; }, // setupNodeEvents(on, config) { diff --git a/cypress/e2e/ps1784/01_mollie.ps1784.ModuleConfiguration.specs.js b/cypress/e2e/ps1784/01_mollie.ps1784.ModuleConfiguration.specs.js index 181c52932..973759fcb 100755 --- a/cypress/e2e/ps1784/01_mollie.ps1784.ModuleConfiguration.specs.js +++ b/cypress/e2e/ps1784/01_mollie.ps1784.ModuleConfiguration.specs.js @@ -70,8 +70,6 @@ describe('PS1784 Module initial configuration setup', () => { }) it('C339305: 01 Connecting test API successsfully', () => { cy.visit('/admin1/') - // enabling the module on multistore shop - one time action - cy.EnablingModuleMultistore() cy.OpenModuleDashboard() cy.get('#MOLLIE_ACCOUNT_SWITCH_on').click({force:true}) cy.get('#MOLLIE_API_KEY_TEST').type((Cypress.env('MOLLIE_TEST_API_KEY')),{delay: 0, log: false}) diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index 361812f7a..36cef3f29 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -35,6 +35,8 @@ import 'cypress-iframe'; // or require('cypress-iframe'); +// Cypress improved terminal logs +require('cypress-terminal-report/src/installLogsCollector')(); // Import commands.js using ES2015 syntax: import './commands' diff --git a/docker-compose.1784.yml b/docker-compose.1784.yml index d23345e45..4bfa923c9 100755 --- a/docker-compose.1784.yml +++ b/docker-compose.1784.yml @@ -35,7 +35,7 @@ services: DB_PASSWD: $${DB_PASSWD} DB_NAME: prestashop DB_SERVER: mysql - PS_DOMAIN: demoshop1784.eu.ngrok.io:8002 + PS_DOMAIN: demoshop1784.ngrok.io:8002 PS_FOLDER_INSTALL: install PS_FOLDER_ADMIN: admin1 depends_on: diff --git a/docker-compose.8.yml b/docker-compose.8.yml index 2d8fb22dd..2a06a79bc 100755 --- a/docker-compose.8.yml +++ b/docker-compose.8.yml @@ -35,7 +35,7 @@ services: DB_PASSWD: $${DB_PASSWD} DB_NAME: prestashop DB_SERVER: mysql - PS_DOMAIN: demoshop8.eu.ngrok.io:8142 + PS_DOMAIN: demoshop8.ngrok.io:8142 PS_FOLDER_INSTALL: install PS_FOLDER_ADMIN: admin1 depends_on: diff --git a/docker-compose.e2e.1784.yml b/docker-compose.e2e.1784.yml index 0322e03f2..76715f054 100644 --- a/docker-compose.e2e.1784.yml +++ b/docker-compose.e2e.1784.yml @@ -6,7 +6,7 @@ services: image: "cypress/included:9.5.2" environment: # pass base url to test pointing at the web application - - CYPRESS_baseUrl=https://demoshop1784.eu.ngrok.io + - CYPRESS_baseUrl=https://demoshop1784.ngrok.io - CYPRESS_EVERY_NTH_FRAME=1 entrypoint: cypress run --spec "**/cypress/integration/ps1784/**" command: /bin/sh -c "--config npx browserslist@latest --update-db" diff --git a/mollie.php b/mollie.php index 0262f6965..8e9854f8f 100755 --- a/mollie.php +++ b/mollie.php @@ -15,6 +15,7 @@ use Mollie\Adapter\ProductAttributeAdapter; use Mollie\Adapter\ToolsAdapter; use Mollie\Api\Exceptions\ApiException; +use Mollie\Api\MollieApiClient; use Mollie\Config\Config; use Mollie\Exception\ShipmentCannotBeSentException; use Mollie\Handler\ErrorHandler\ErrorHandler; @@ -39,6 +40,7 @@ use Mollie\Subscription\Verification\HasSubscriptionProductInCart; use Mollie\Utility\PsVersionUtility; use Mollie\Verification\IsPaymentInformationAvailable; +use PrestaShop\PrestaShop\Core\Localization\Locale\Repository; use Symfony\Component\Dotenv\Dotenv; use Symfony\Component\HttpFoundation\Response; @@ -80,7 +82,7 @@ public function __construct() { $this->name = 'mollie'; $this->tab = 'payments_gateways'; - $this->version = '6.0.1'; + $this->version = '6.0.2'; $this->author = 'Mollie B.V.'; $this->need_instance = 1; $this->bootstrap = true; @@ -111,10 +113,10 @@ public function getService(string $serviceName) return $this->containerProvider->getService($serviceName); } - public function getApiClient() + public function getApiClient(int $shopId = null, bool $subscriptionOrder = false): ?MollieApiClient { if (!$this->api) { - $this->setApiKey(); + $this->setApiKey($shopId, $subscriptionOrder); } return $this->api; @@ -328,23 +330,20 @@ public function hookActionFrontControllerSetMedia($params) { /** @var \Mollie\Service\ErrorDisplayService $errorDisplayService */ $errorDisplayService = $this->getService(\Mollie\Service\ErrorDisplayService::class); + /** @var PaymentMethodRepositoryInterface $methodRepository */ $methodRepository = $this->getService(PaymentMethodRepositoryInterface::class); - $isCartController = $this->context->controller instanceof CartControllerCore; - if ($isCartController) { + /** @var ConfigurationAdapter $configuration */ + $configuration = $this->getService(ConfigurationAdapter::class); + + $controller = $this->context->controller; + + if ($controller instanceof CartControllerCore) { $errorDisplayService->showCookieError('mollie_payment_canceled_error'); } - /** @var ?MolPaymentMethod $paymentMethod */ - $paymentMethod = $methodRepository->findOneBy( - [ - 'id_method' => Config::MOLLIE_METHOD_ID_APPLE_PAY, - 'live_environment' => Configuration::get(Config::MOLLIE_ENVIRONMENT), - ] - ); - $isProductController = $this->context->controller instanceof ProductControllerCore; - if ($isProductController) { + if ($controller instanceof ProductControllerCore) { $this->context->controller->addJS("{$this->_path}views/js/front/subscription/product.js"); $this->context->controller->addJqueryPlugin('growl'); @@ -353,32 +352,47 @@ public function hookActionFrontControllerSetMedia($params) 'isVersionGreaterOrEqualTo177' => PsVersionUtility::isPsVersionGreaterOrEqualTo(_PS_VERSION_, '1.7.7.0'), ]); } + + /** @var ?MolPaymentMethod $paymentMethod */ + $paymentMethod = $methodRepository->findOneBy( + [ + 'id_method' => Config::MOLLIE_METHOD_ID_APPLE_PAY, + 'live_environment' => (int) $configuration->get(Config::MOLLIE_ENVIRONMENT), + ] + ); + if (!$paymentMethod || !$paymentMethod->enabled) { return; } - $isApplePayEnabled = Configuration::get(Config::MOLLIE_APPLE_PAY_DIRECT); - if ($isApplePayEnabled) { - $controller = $this->context->controller; - if ($controller instanceof ProductControllerCore || $controller instanceof CartControllerCore) { - Media::addJsDef([ - 'countryCode' => $this->context->country->iso_code, - 'currencyCode' => $this->context->currency->iso_code, - 'totalLabel' => $this->context->shop->name, - 'customerId' => $this->context->customer->id ?? 0, - 'ajaxUrl' => $this->context->link->getModuleLink('mollie', 'applePayDirectAjax'), - 'cartId' => $this->context->cart->id, - 'applePayButtonStyle' => (int) Configuration::get(Config::MOLLIE_APPLE_PAY_DIRECT_STYLE), - ]); - $this->context->controller->addCSS($this->getPathUri() . 'views/css/front/apple_pay_direct.css'); - - if ($controller instanceof ProductControllerCore) { - $this->context->controller->addJS($this->getPathUri() . 'views/js/front/applePayDirect/applePayDirectProduct.js'); - } - if ($controller instanceof CartControllerCore) { - $this->context->controller->addJS($this->getPathUri() . 'views/js/front/applePayDirect/applePayDirectCart.js'); - } - } + $isApplePayDirectProductEnabled = (int) $configuration->get(Config::MOLLIE_APPLE_PAY_DIRECT_PRODUCT); + $isApplePayDirectCartEnabled = (int) $configuration->get(Config::MOLLIE_APPLE_PAY_DIRECT_CART); + + $canDisplayInProductPage = $controller instanceof ProductControllerCore && $isApplePayDirectProductEnabled; + $canDisplayInCartPage = $controller instanceof CartControllerCore && $isApplePayDirectCartEnabled; + + if (!$canDisplayInProductPage && !$canDisplayInCartPage) { + return; + } + + Media::addJsDef([ + 'countryCode' => $this->context->country->iso_code, + 'currencyCode' => $this->context->currency->iso_code, + 'totalLabel' => $this->context->shop->name, + 'customerId' => $this->context->customer->id ?? 0, + 'ajaxUrl' => $this->context->link->getModuleLink('mollie', 'applePayDirectAjax'), + 'cartId' => $this->context->cart->id, + 'applePayButtonStyle' => (int) $configuration->get(Config::MOLLIE_APPLE_PAY_DIRECT_STYLE), + ]); + + $this->context->controller->addCSS($this->getPathUri() . 'views/css/front/apple_pay_direct.css'); + + if ($controller instanceof ProductControllerCore) { + $this->context->controller->addJS($this->getPathUri() . 'views/js/front/applePayDirect/applePayDirectProduct.js'); + } + + if ($controller instanceof CartControllerCore) { + $this->context->controller->addJS($this->getPathUri() . 'views/js/front/applePayDirect/applePayDirectCart.js'); } } @@ -709,13 +723,24 @@ public function hookActionEmailSendBefore($params) 'id_order' => (int) $order->id, ]); + /** + * NOTE: Locale in context is set at init() method but in this case init() doesn't always get executed first. + */ + /** @var Repository $localeRepo */ + $localeRepo = $this->get('prestashop.core.localization.locale.repository'); + + /** + * NOTE: context language is set based on customer/employee context + */ + $locale = $localeRepo->getLocale($this->context->language->getLocale()); + if (!$molOrderPaymentFee) { - $orderFee = $this->context->getCurrentLocale()->formatPrice( + $orderFee = $locale->formatPrice( 0, $orderCurrency->iso_code ); } else { - $orderFee = $this->context->getCurrentLocale()->formatPrice( + $orderFee = $locale->formatPrice( $molOrderPaymentFee->fee_tax_incl, $orderCurrency->iso_code ); @@ -1024,7 +1049,7 @@ public static function resendOrderPaymentLink($orderId) return $orderListActionBuilder->buildOrderPaymentResendButton($orderId); } - public function updateApiKey($shopId = null) + public function updateApiKey(int $shopId = null): void { $this->setApiKey($shopId); } @@ -1076,7 +1101,7 @@ public function hookActionAjaxDieCartControllerDisplayAjaxUpdateBefore(array $pa )); } - private function setApiKey($shopId = null) + private function setApiKey(int $shopId = null, bool $subscriptionOrder = false): void { /** @var \Mollie\Repository\ModuleRepository $moduleRepository */ $moduleRepository = $this->getService(\Mollie\Repository\ModuleRepository::class); @@ -1100,7 +1125,7 @@ private function setApiKey($shopId = null) } try { // TODO handle api key set differently. Throw error and don't let do further actions. - $this->api = $apiKeyService->setApiKey($apiKey, $this->version); + $this->api = $apiKeyService->setApiKey($apiKey, $this->version, $subscriptionOrder); } catch (\Mollie\Api\Exceptions\IncompatiblePlatform $e) { $errorHandler = \Mollie\Handler\ErrorHandler\ErrorHandler::getInstance(); $errorHandler->handle($e, $e->getCode(), false); @@ -1117,7 +1142,7 @@ private function setApiKey($shopId = null) } } - private function isPhpVersionCompliant() + private function isPhpVersionCompliant(): bool { return self::SUPPORTED_PHP_VERSION <= PHP_VERSION_ID; } diff --git a/package-lock.json b/package-lock.json index 28b82889a..16dfa7d24 100755 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,10 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "cypress": "^12.15.0", + "cypress": "^12.17.2", "cypress-fail-fast": "^7.0.0", "cypress-iframe": "^1.0.1", + "cypress-terminal-report": "^5.3.2", "cypress-testrail": "^2.7.1", "human-signals": "^3.0.1" } @@ -27,9 +28,9 @@ } }, "node_modules/@cypress/request": { - "version": "2.88.10", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", - "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", + "version": "2.88.11", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.11.tgz", + "integrity": "sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w==", "dev": true, "dependencies": { "aws-sign2": "~0.7.0", @@ -45,7 +46,7 @@ "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "~6.5.2", + "qs": "~6.10.3", "safe-buffer": "^5.1.2", "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", @@ -261,9 +262,9 @@ } }, "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", "dev": true }, "node_modules/axios": { @@ -389,6 +390,19 @@ "node": ">=6" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -692,13 +706,13 @@ } }, "node_modules/cypress": { - "version": "12.15.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.15.0.tgz", - "integrity": "sha512-FqGbxsH+QgjStuTO9onXMIeF44eOrgVwPvlcvuzLIaePQMkl72YgBvpuHlBGRcrw3Q4SvqKfajN8iV5XWShAiQ==", + "version": "12.17.2", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.2.tgz", + "integrity": "sha512-hxWAaWbqQBzzMuadSGSuQg5PDvIGOovm6xm0hIfpCVcORsCAj/gF2p0EvfnJ4f+jK2PCiDgP6D2eeE9/FK4Mjg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^2.88.11", "@cypress/xvfb": "^1.2.4", "@types/node": "^14.14.31", "@types/sinonjs__fake-timers": "8.1.1", @@ -735,7 +749,7 @@ "pretty-bytes": "^5.6.0", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", + "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", @@ -772,6 +786,36 @@ "@types/cypress": "^1.1.0" } }, + "node_modules/cypress-terminal-report": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/cypress-terminal-report/-/cypress-terminal-report-5.3.2.tgz", + "integrity": "sha512-0Gf/pXjrYpTkf2aR3LAFGoxEM0KulWsMKCu+52YJB6l7GEP2RLAOAr32tcZHZiL2EWnS0vE4ollomMzGvCci0w==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "fs-extra": "^10.1.0", + "safe-json-stringify": "^1.2.0", + "semver": "^7.3.5", + "tv4": "^1.3.0" + }, + "peerDependencies": { + "cypress": ">=10.0.0" + } + }, + "node_modules/cypress-terminal-report/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/cypress-testrail": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/cypress-testrail/-/cypress-testrail-2.7.1.tgz", @@ -1066,6 +1110,27 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -1140,6 +1205,18 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1149,6 +1226,30 @@ "node": ">=8" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/http-signature": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", @@ -1559,6 +1660,15 @@ "node": ">=8" } }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1678,21 +1788,27 @@ } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "version": "6.10.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, "engines": { "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/request-progress": { @@ -1767,6 +1883,12 @@ } ] }, + "node_modules/safe-json-stringify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz", + "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", + "dev": true + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1774,9 +1896,9 @@ "dev": true }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -1809,6 +1931,20 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -1959,6 +2095,15 @@ "node": "*" } }, + "node_modules/tv4": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz", + "integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", @@ -2082,9 +2227,9 @@ "optional": true }, "@cypress/request": { - "version": "2.88.10", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", - "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", + "version": "2.88.11", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.11.tgz", + "integrity": "sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -2100,7 +2245,7 @@ "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "~6.5.2", + "qs": "~6.10.3", "safe-buffer": "^5.1.2", "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", @@ -2264,9 +2409,9 @@ "dev": true }, "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", "dev": true }, "axios": { @@ -2357,6 +2502,16 @@ "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", "dev": true }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2598,12 +2753,12 @@ } }, "cypress": { - "version": "12.15.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.15.0.tgz", - "integrity": "sha512-FqGbxsH+QgjStuTO9onXMIeF44eOrgVwPvlcvuzLIaePQMkl72YgBvpuHlBGRcrw3Q4SvqKfajN8iV5XWShAiQ==", + "version": "12.17.2", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.2.tgz", + "integrity": "sha512-hxWAaWbqQBzzMuadSGSuQg5PDvIGOovm6xm0hIfpCVcORsCAj/gF2p0EvfnJ4f+jK2PCiDgP6D2eeE9/FK4Mjg==", "dev": true, "requires": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^2.88.11", "@cypress/xvfb": "^1.2.4", "@types/node": "^14.14.31", "@types/sinonjs__fake-timers": "8.1.1", @@ -2640,7 +2795,7 @@ "pretty-bytes": "^5.6.0", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", + "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", @@ -2663,6 +2818,32 @@ "dev": true, "requires": {} }, + "cypress-terminal-report": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/cypress-terminal-report/-/cypress-terminal-report-5.3.2.tgz", + "integrity": "sha512-0Gf/pXjrYpTkf2aR3LAFGoxEM0KulWsMKCu+52YJB6l7GEP2RLAOAr32tcZHZiL2EWnS0vE4ollomMzGvCci0w==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "fs-extra": "^10.1.0", + "safe-json-stringify": "^1.2.0", + "semver": "^7.3.5", + "tv4": "^1.3.0" + }, + "dependencies": { + "fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + } + } + }, "cypress-testrail": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/cypress-testrail/-/cypress-testrail-2.7.1.tgz", @@ -2883,6 +3064,24 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, "get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -2939,12 +3138,33 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, "http-signature": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", @@ -3243,6 +3463,12 @@ "path-key": "^3.0.0" } }, + "object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3335,16 +3561,19 @@ } }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true }, "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true + "version": "6.10.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } }, "request-progress": { "version": "3.0.0", @@ -3395,6 +3624,12 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, + "safe-json-stringify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz", + "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", + "dev": true + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -3402,9 +3637,9 @@ "dev": true }, "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -3425,6 +3660,17 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -3540,6 +3786,12 @@ "safe-buffer": "^5.0.1" } }, + "tv4": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz", + "integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==", + "dev": true + }, "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", diff --git a/package.json b/package.json index fc3ecf856..1c5ed70ab 100755 --- a/package.json +++ b/package.json @@ -20,9 +20,10 @@ }, "homepage": "https://github.com/mollie/PrestaShop#readme", "devDependencies": { - "cypress": "^12.15.0", + "cypress": "^12.17.2", "cypress-fail-fast": "^7.0.0", "cypress-iframe": "^1.0.1", + "cypress-terminal-report": "^5.3.2", "cypress-testrail": "^2.7.1", "human-signals": "^3.0.1" } diff --git a/src/Action/CreateOrderPaymentFeeAction.php b/src/Action/CreateOrderPaymentFeeAction.php new file mode 100644 index 000000000..50f1fb3fb --- /dev/null +++ b/src/Action/CreateOrderPaymentFeeAction.php @@ -0,0 +1,30 @@ +id_cart = $data->getCartId(); + $molOrderPaymentFee->id_order = $data->getOrderId(); + $molOrderPaymentFee->fee_tax_incl = $data->getPaymentFeeTaxIncl(); + $molOrderPaymentFee->fee_tax_excl = $data->getPaymentFeeTaxExcl(); + + $molOrderPaymentFee->save(); + } catch (Exception $exception) { + throw CouldNotCreateOrderPaymentFee::failedToInsertOrderPaymentFee($exception); + } + } +} diff --git a/src/Action/UpdateOrderTotalsAction.php b/src/Action/UpdateOrderTotalsAction.php new file mode 100644 index 000000000..f8bf8eb52 --- /dev/null +++ b/src/Action/UpdateOrderTotalsAction.php @@ -0,0 +1,54 @@ +orderRepository = $orderRepository; + } + + /** + * @throws CouldNotUpdateOrderTotals + */ + public function run(UpdateOrderTotalsData $updateOrderTotalsData): void + { + try { + /** @var Order $order */ + $order = $this->orderRepository->findOneBy([ + 'id_order' => $updateOrderTotalsData->getOrderId(), + ]); + + $order->total_paid_tax_excl = NumberUtility::toPrecision( + NumberUtility::plus( + $updateOrderTotalsData->getOriginalCartAmountTaxExcl(), + $updateOrderTotalsData->getPaymentFeeTaxExcl() + ) + ); + + $order->total_paid_tax_incl = NumberUtility::toPrecision( + NumberUtility::plus( + $updateOrderTotalsData->getOriginalCartAmountTaxIncl(), + $updateOrderTotalsData->getPaymentFeeTaxIncl() + ) + ); + + $order->total_paid = $updateOrderTotalsData->getTransactionAmount(); + + $order->update(); + } catch (Exception $exception) { + throw CouldNotUpdateOrderTotals::failedToUpdateOrderTotals($exception); + } + } +} diff --git a/src/Adapter/ToolsAdapter.php b/src/Adapter/ToolsAdapter.php index 535c9d4b5..c091b043a 100644 --- a/src/Adapter/ToolsAdapter.php +++ b/src/Adapter/ToolsAdapter.php @@ -33,6 +33,7 @@ public function substr($str, $start, $length = false): string public function displayPrice($price, $currency): string { + // TODO replace all displayPrice calls with Locale::formatPrice() return Tools::displayPrice($price, $currency); } diff --git a/src/Builder/FormBuilder.php b/src/Builder/FormBuilder.php index 5211a9ee0..6ad92466d 100644 --- a/src/Builder/FormBuilder.php +++ b/src/Builder/FormBuilder.php @@ -432,8 +432,9 @@ protected function getAccountSettingsSection($isApiKeyProvided) 'voucherCategory' => $this->configuration->get(Config::MOLLIE_VOUCHER_CATEGORY), 'klarnaPayments' => Config::KLARNA_PAYMENTS, 'klarnaStatuses' => [Config::MOLLIE_STATUS_KLARNA_AUTHORIZED, Config::MOLLIE_STATUS_KLARNA_SHIPPED], - 'applePayDirect' => (int) $this->configuration->get(Config::MOLLIE_APPLE_PAY_DIRECT), - 'applePayDIrectStyle' => (int) $this->configuration->get(Config::MOLLIE_APPLE_PAY_DIRECT_STYLE), + 'applePayDirectProduct' => (int) $this->configuration->get(Config::MOLLIE_APPLE_PAY_DIRECT_PRODUCT), + 'applePayDirectCart' => (int) $this->configuration->get(Config::MOLLIE_APPLE_PAY_DIRECT_CART), + 'applePayDirectStyle' => (int) $this->configuration->get(Config::MOLLIE_APPLE_PAY_DIRECT_STYLE), 'isBancontactQrCodeEnabled' => (int) $this->configuration->get(Config::MOLLIE_BANCONTACT_QR_CODE_ENABLED), 'isLive' => (int) $this->configuration->get(Config::MOLLIE_ENVIRONMENT), 'bancontactQRCodeDescription' => TagsUtility::ppTags( diff --git a/src/Config/Config.php b/src/Config/Config.php index ef6d5a140..13a7a64e5 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -148,7 +148,8 @@ class Config const MOLLIE_STATUS_KLARNA_SHIPPED = 'MOLLIE_STATUS_KLARNA_SHIPPED'; const MOLLIE_STATUS_CHARGEBACK = 'MOLLIE_STATUS_CHARGEBACK'; const MOLLIE_KLARNA_INVOICE_ON = 'MOLLIE_KLARNA_INVOICE_ON'; - const MOLLIE_APPLE_PAY_DIRECT = 'MOLLIE_APPLE_PAY_DIRECT'; + const MOLLIE_APPLE_PAY_DIRECT_PRODUCT = 'MOLLIE_APPLE_PAY_DIRECT_PRODUCT'; + const MOLLIE_APPLE_PAY_DIRECT_CART = 'MOLLIE_APPLE_PAY_DIRECT_CART'; const MOLLIE_APPLE_PAY_DIRECT_STYLE = 'MOLLIE_APPLE_PAY_DIRECT_STYLE'; const MOLLIE_BANCONTACT_QR_CODE_ENABLED = 'MOLLIE_BANCONTACT_QR_CODE_ENABLED'; diff --git a/src/DTO/CreateOrderPaymentFeeActionData.php b/src/DTO/CreateOrderPaymentFeeActionData.php new file mode 100644 index 000000000..31fe58a43 --- /dev/null +++ b/src/DTO/CreateOrderPaymentFeeActionData.php @@ -0,0 +1,73 @@ +orderId = $orderId; + $this->cartId = $cartId; + $this->paymentFeeTaxIncl = $paymentFeeTaxIncl; + $this->paymentFeeTaxExcl = $paymentFeeTaxExcl; + } + + /** + * @return int + */ + public function getOrderId(): int + { + return $this->orderId; + } + + /** + * @return int + */ + public function getCartId(): int + { + return $this->cartId; + } + + /** + * @return float + */ + public function getPaymentFeeTaxIncl(): float + { + return $this->paymentFeeTaxIncl; + } + + /** + * @return float + */ + public function getPaymentFeeTaxExcl(): float + { + return $this->paymentFeeTaxExcl; + } + + public static function create( + int $orderId, + int $cartId, + float $paymentFeeTaxIncl, + float $paymentFeeTaxExcl + ): CreateOrderPaymentFeeActionData { + return new self( + $orderId, + $cartId, + $paymentFeeTaxIncl, + $paymentFeeTaxExcl + ); + } +} diff --git a/src/DTO/PaymentData.php b/src/DTO/PaymentData.php index 1bd4e9ad9..b1a52b8a3 100644 --- a/src/DTO/PaymentData.php +++ b/src/DTO/PaymentData.php @@ -97,6 +97,11 @@ class PaymentData implements JsonSerializable */ private $sequenceType; + /** + * @var bool + */ + private $subscriptionOrder = false; + public function __construct( Amount $amount, $description, @@ -341,6 +346,22 @@ public function setSequenceType(string $sequenceType): void $this->sequenceType = $sequenceType; } + /** + * @return bool + */ + public function isSubscriptionOrder(): bool + { + return $this->subscriptionOrder; + } + + /** + * @param bool $subscriptionOrder + */ + public function setSubscriptionOrder(bool $subscriptionOrder): void + { + $this->subscriptionOrder = $subscriptionOrder; + } + public function jsonSerialize() { $result = [ diff --git a/src/DTO/UpdateOrderTotalsData.php b/src/DTO/UpdateOrderTotalsData.php new file mode 100644 index 000000000..a0709fb9e --- /dev/null +++ b/src/DTO/UpdateOrderTotalsData.php @@ -0,0 +1,101 @@ +orderId = $orderId; + $this->paymentFeeTaxIncl = $paymentFeeTaxIncl; + $this->paymentFeeTaxExcl = $paymentFeeTaxExcl; + $this->transactionAmount = $transactionAmount; + $this->originalCartAmountTaxIncl = $originalCartAmountTaxIncl; + $this->originalCartAmountTaxExcl = $originalCartAmountTaxExcl; + } + + /** + * @return int + */ + public function getOrderId(): int + { + return $this->orderId; + } + + /** + * @return float + */ + public function getPaymentFeeTaxIncl(): float + { + return $this->paymentFeeTaxIncl; + } + + /** + * @return float + */ + public function getPaymentFeeTaxExcl(): float + { + return $this->paymentFeeTaxExcl; + } + + /** + * @return float + */ + public function getTransactionAmount(): float + { + return $this->transactionAmount; + } + + /** + * @return float + */ + public function getOriginalCartAmountTaxIncl(): float + { + return $this->originalCartAmountTaxIncl; + } + + /** + * @return float + */ + public function getOriginalCartAmountTaxExcl(): float + { + return $this->originalCartAmountTaxExcl; + } + + public static function create( + int $orderId, + float $paymentFeeTaxIncl, + float $paymentFeeTaxExcl, + float $transactionAmount, + float $originalCartAmountTaxIncl, + float $originalCartAmountTaxExcl + ): UpdateOrderTotalsData { + return new self( + $orderId, + $paymentFeeTaxIncl, + $paymentFeeTaxExcl, + $transactionAmount, + $originalCartAmountTaxIncl, + $originalCartAmountTaxExcl + ); + } +} diff --git a/src/Exception/Code/ExceptionCode.php b/src/Exception/Code/ExceptionCode.php index dcdc9c275..cdd7ddb31 100644 --- a/src/Exception/Code/ExceptionCode.php +++ b/src/Exception/Code/ExceptionCode.php @@ -7,6 +7,16 @@ class ExceptionCode // Infrastructure error codes starts from 1000 public const INFRASTRUCTURE_FAILED_TO_INSTALL_ORDER_STATE = 1001; + public const INFRASTRUCTURE_UNKNOWN_ERROR = 1002; public const FAILED_TO_FIND_CUSTOMER_ADDRESS = 2001; + + //Order error codes starts from 3000 + + public const ORDER_FAILED_TO_UPDATE_ORDER_TOTALS = 3001; + public const ORDER_FAILED_TO_INSERT_ORDER_PAYMENT_FEE = 3002; + public const ORDER_FAILED_TO_RETRIEVE_PAYMENT_METHOD = 3003; + public const ORDER_FAILED_TO_RETRIEVE_PAYMENT_FEE = 3004; + public const ORDER_FAILED_TO_CREATE_ORDER_PAYMENT_FEE = 3005; + public const ORDER_FAILED_TO_UPDATE_ORDER_TOTAL_WITH_PAYMENT_FEE = 3006; } diff --git a/src/Exception/CouldNotCreateOrderPaymentFee.php b/src/Exception/CouldNotCreateOrderPaymentFee.php new file mode 100644 index 000000000..dd7919550 --- /dev/null +++ b/src/Exception/CouldNotCreateOrderPaymentFee.php @@ -0,0 +1,18 @@ +orderPaymentFeeService = $orderPaymentFeeService; $this->paymentMethodService = $paymentMethodService; $this->paymentFeeProvider = $paymentFeeProvider; + $this->createOrderPaymentFeeAction = $createOrderPaymentFeeAction; + $this->updateOrderTotalsAction = $updateOrderTotalsAction; + $this->orderRepository = $orderRepository; + $this->cartRepository = $cartRepository; } - public function addOrderPaymentFee(int $orderId, $apiPayment): int + /** + * @param MollieOrderAlias|MolliePaymentAlias $apiPayment + * + * @throws CouldNotHandleOrderPaymentFee + */ + public function addOrderPaymentFee(int $orderId, $apiPayment): void { - $order = new Order($orderId); - $cart = new Cart($order->id_cart); - - $originalAmountWithTax = $cart->getOrderTotal( - true, - Cart::BOTH - ); - - $originalAmountWithoutTax = $cart->getOrderTotal( - false, - Cart::BOTH - ); - - $paymentMethod = $this->paymentMethodService->getPaymentMethod($apiPayment); - - $paymentFeeData = $this->paymentFeeProvider->getPaymentFee($paymentMethod, (float) $originalAmountWithTax); - - $this->orderPaymentFeeService->createOrderPaymentFee($orderId, (int) $order->id_cart, $paymentFeeData); - - $order = new Order($orderId); - - $order->total_paid_tax_excl = (float) (new Number((string) $originalAmountWithoutTax))->plus((new Number((string) $paymentFeeData->getPaymentFeeTaxExcl())))->toPrecision(2); - $order->total_paid_tax_incl = (float) (new Number((string) $originalAmountWithTax))->plus((new Number((string) $paymentFeeData->getPaymentFeeTaxIncl())))->toPrecision(2); - $order->total_paid = (float) $apiPayment->amount->value; - $order->total_paid_real = (float) $apiPayment->amount->value; + /** @var Order $order */ + $order = $this->orderRepository->findOneBy([ + 'id_order' => $orderId, + ]); + + /** @var Cart $cart */ + $cart = $this->cartRepository->findOneBy([ + 'id_cart' => $order->id_cart, + ]); + + try { + $originalAmountWithTax = (float) $cart->getOrderTotal( + true, + Cart::BOTH + ); + + $originalAmountWithoutTax = (float) $cart->getOrderTotal( + false, + Cart::BOTH + ); + } catch (Exception $exception) { + throw CouldNotHandleOrderPaymentFee::unknownError($exception); + } - $order->update(); + try { + $paymentMethod = $this->paymentMethodService->getPaymentMethod($apiPayment); + } catch (OrderCreationException $exception) { + throw CouldNotHandleOrderPaymentFee::failedToRetrievePaymentMethod($exception); + } - return $orderId; - } + try { + $paymentFeeData = $this->paymentFeeProvider->getPaymentFee($paymentMethod, (float) $originalAmountWithTax); + } catch (FailedToProvidePaymentFeeException $exception) { + throw CouldNotHandleOrderPaymentFee::failedToRetrievePaymentFee($exception); + } - private function isOrderBackOrder($orderId) - { - $order = new Order($orderId); - $orderDetails = $order->getOrderDetailList(); - /** @var OrderDetail $detail */ - foreach ($orderDetails as $detail) { - $orderDetail = new OrderDetail($detail['id_order_detail']); - if ( - Configuration::get('PS_STOCK_MANAGEMENT') && - ($orderDetail->getStockState() || $orderDetail->product_quantity_in_stock < 0) - ) { - return true; - } + try { + $this->createOrderPaymentFeeAction->run(CreateOrderPaymentFeeActionData::create( + $orderId, + (int) $order->id_cart, + $paymentFeeData->getPaymentFeeTaxIncl(), + $paymentFeeData->getPaymentFeeTaxExcl() + )); + } catch (CouldNotCreateOrderPaymentFee $exception) { + throw CouldNotHandleOrderPaymentFee::failedToCreateOrderPaymentFee($exception); } - return false; + try { + $this->updateOrderTotalsAction->run(UpdateOrderTotalsData::create( + $orderId, + $paymentFeeData->getPaymentFeeTaxIncl(), + $paymentFeeData->getPaymentFeeTaxExcl(), + // TODO abstraction for apiPayment + (float) $apiPayment->amount->value, + $originalAmountWithTax, + $originalAmountWithoutTax + )); + } catch (CouldNotUpdateOrderTotals $exception) { + throw CouldNotHandleOrderPaymentFee::failedToUpdateOrderTotalWithPaymentFee($exception); + } } } diff --git a/src/Repository/CartRepository.php b/src/Repository/CartRepository.php new file mode 100644 index 000000000..bdc1db6af --- /dev/null +++ b/src/Repository/CartRepository.php @@ -0,0 +1,13 @@ +select('`id_mol_country`'); $sql->from('mol_country'); $sql->where('`id_method` = "' . (int) $methodId . '" AND ( id_country = ' . (int) $countryId . ' OR all_countries = 1)'); - return Db::getInstance()->getValue($sql); + $result = Db::getInstance()->getValue($sql); + + return !empty($result); } - public function checkIfCountryIsExcluded($methodId, $countryId) + public function checkIfCountryIsExcluded($methodId, $countryId): bool { $sql = new DbQuery(); $sql->select('`id_mol_country`'); diff --git a/src/Service/ApiKeyService.php b/src/Service/ApiKeyService.php index 0424765c0..487ace524 100644 --- a/src/Service/ApiKeyService.php +++ b/src/Service/ApiKeyService.php @@ -21,36 +21,41 @@ class ApiKeyService { /** - * @param string $apiKey - * @param string $moduleVersion - * - * @return MollieApiClient|null - * * @throws ApiException */ - public function setApiKey(string $apiKey, string $moduleVersion): ?MollieApiClient + public function setApiKey(string $apiKey, string $moduleVersion, bool $subscriptionOrder = false): ?MollieApiClient { $api = new MollieApiClient(new CurlPSMollieHttpAdapter()); + $context = Context::getContext(); + if ($apiKey) { try { $api->setApiKey($apiKey); } catch (ApiException $e) { return null; } - } elseif (!empty($context->employee) - && Tools::getValue('Mollie_Api_Key') - ) { + } elseif (!empty($context->employee) && Tools::getValue('Mollie_Api_Key')) { $api->setApiKey(Tools::getValue('Mollie_Api_Key')); } + if (defined('_TB_VERSION_')) { $api->addVersionString('ThirtyBees/' . _TB_VERSION_); $api->addVersionString("MollieThirtyBees/{$moduleVersion}"); - } else { - $api->addVersionString('PrestaShop/' . _PS_VERSION_); - $api->addVersionString("MolliePrestaShop/{$moduleVersion}"); + + return $api; } + $api->addVersionString('PrestaShop/' . _PS_VERSION_); + + if ($subscriptionOrder) { + $api->addVersionString("MollieSubscriptionPrestaShop/{$moduleVersion}"); + + return $api; + } + + $api->addVersionString("MolliePrestaShop/{$moduleVersion}"); + return $api; } } diff --git a/src/Service/MollieOrderCreationService.php b/src/Service/MollieOrderCreationService.php index 9a9492724..7c6a9a711 100644 --- a/src/Service/MollieOrderCreationService.php +++ b/src/Service/MollieOrderCreationService.php @@ -45,24 +45,21 @@ public function __construct(OrderExceptionHandler $exceptionHandler, Mollie $mod } /** - * @param PaymentData|OrderData $paymentData - * @param MolPaymentMethod $paymentMethodObj + * @param PaymentData|OrderData $data * * @return false|MollieOrderAlias|MolliePaymentAlias - * - * @throws PrestaShopException */ - public function createMollieOrder($paymentData, $paymentMethodObj) + public function createMollieOrder($data, MolPaymentMethod $paymentMethodObj) { try { - $apiPayment = $this->createPayment($paymentData->jsonSerialize(), $paymentMethodObj->method); + $apiPayment = $this->createPayment($data, $paymentMethodObj->method); } catch (Exception $e) { - if ($paymentData instanceof OrderData) { - $paymentData->setDeliveryPhoneNumber(null); - $paymentData->setBillingPhoneNumber(null); + if ($data instanceof OrderData) { + $data->setDeliveryPhoneNumber(null); + $data->setBillingPhoneNumber(null); } try { - $apiPayment = $this->createPayment($paymentData->jsonSerialize(), $paymentMethodObj->method); + $apiPayment = $this->createPayment($data, $paymentMethodObj->method); } catch (OrderCreationException $e) { $errorHandler = ErrorHandler::getInstance(); $errorHandler->handle($e, $e->getCode(), true); @@ -77,17 +74,16 @@ public function createMollieOrder($paymentData, $paymentMethodObj) } /** - * @param PaymentData|OrderData $paymentData - * @param MolPaymentMethod $paymentMethodObj + * @param PaymentData|OrderData $data * * @return false|MollieOrderAlias|MolliePaymentAlias * * @throws PrestaShopException */ - public function createMollieApplePayDirectOrder($paymentData, $paymentMethodObj) + public function createMollieApplePayDirectOrder($data, MolPaymentMethod $paymentMethodObj) { try { - $apiPayment = $this->createPayment($paymentData->jsonSerialize(), $paymentMethodObj->method); + $apiPayment = $this->createPayment($data, $paymentMethodObj->method); } catch (OrderCreationException $e) { $errorHandler = ErrorHandler::getInstance(); $errorHandler->handle($e, $e->getCode(), true); @@ -157,22 +153,29 @@ public function addTransactionMandate(string $transactionId, string $mandateId) } /** - * @param array $data - * @param string $selectedApi + * @param PaymentData|OrderData $data * * @return MollieOrderAlias|MolliePaymentAlias * * @throws OrderCreationException */ - private function createPayment($data, $selectedApi) + private function createPayment($data, string $selectedApi) { + $subscriptionOrder = false; + + if ($data instanceof PaymentData) { + $subscriptionOrder = $data->isSubscriptionOrder(); + } + + $serializedData = $data->jsonSerialize(); + try { if (Config::MOLLIE_ORDERS_API === $selectedApi) { /** @var MollieOrderAlias $payment */ - $payment = $this->module->getApiClient()->orders->create($data, ['embed' => 'payments']); + $payment = $this->module->getApiClient(null, $subscriptionOrder)->orders->create($serializedData, ['embed' => 'payments']); } else { /** @var MolliePaymentAlias $payment */ - $payment = $this->module->getApiClient()->payments->create($data); + $payment = $this->module->getApiClient(null, $subscriptionOrder)->payments->create($serializedData); } return $payment; diff --git a/src/Service/MollieOrderInfoService.php b/src/Service/MollieOrderInfoService.php index c2c3d7ebb..168196e07 100644 --- a/src/Service/MollieOrderInfoService.php +++ b/src/Service/MollieOrderInfoService.php @@ -79,7 +79,7 @@ public function displayMollieOrderInfo($input) $transactionId = isset($input['transactionId']) ? $input['transactionId'] : $input['order']['id']; $transaction = $this->paymentMethodRepository->getPaymentBy('transaction_id', $transactionId); $order = new Order($transaction['order_id']); - $this->module->updateApiKey($order->id_shop); + $this->module->updateApiKey((int) $order->id_shop); if (!$this->module->getApiClient()) { return ['success' => false]; } diff --git a/src/Service/MolliePaymentMailService.php b/src/Service/MolliePaymentMailService.php index 5423912da..30a28977a 100644 --- a/src/Service/MolliePaymentMailService.php +++ b/src/Service/MolliePaymentMailService.php @@ -71,7 +71,7 @@ public function sendSecondChanceMail($orderId) $customer = new Customer($order->id_customer); - $this->module->updateApiKey($order->id_shop); + $this->module->updateApiKey((int) $order->id_shop); /** @var MollieApiClient $api */ $api = $this->module->getApiClient(); diff --git a/src/Service/OrderPaymentFeeService.php b/src/Service/OrderPaymentFeeService.php index e518c4e05..1eaec0045 100644 --- a/src/Service/OrderPaymentFeeService.php +++ b/src/Service/OrderPaymentFeeService.php @@ -17,9 +17,7 @@ use Mollie\DTO\PaymentFeeData; use Mollie\Provider\PaymentFeeProviderInterface; use Mollie\Repository\PaymentMethodRepositoryInterface; -use MolOrderPaymentFee; use MolPaymentMethod; -use PrestaShopException; use Shop; class OrderPaymentFeeService @@ -45,26 +43,6 @@ public function __construct( $this->paymentFeeProvider = $paymentFeeProvider; } - public function createOrderPaymentFee(int $orderId, int $cartId, PaymentFeeData $paymentFeeData): void - { - $molOrderPaymentFee = new MolOrderPaymentFee(); - - $molOrderPaymentFee->id_cart = $cartId; - $molOrderPaymentFee->id_order = $orderId; - $molOrderPaymentFee->fee_tax_incl = $paymentFeeData->getPaymentFeeTaxIncl(); - $molOrderPaymentFee->fee_tax_excl = $paymentFeeData->getPaymentFeeTaxExcl(); - - try { - $molOrderPaymentFee->add(); - } catch (\Exception $e) { - $errorHandler = \Mollie\Handler\ErrorHandler\ErrorHandler::getInstance(); - $errorHandler->handle($e, $e->getCode(), false); - - // TODO use custom exceptions - throw new PrestaShopException('Can\'t save Order fee'); - } - } - public function getPaymentFee(float $totalAmount, string $method): PaymentFeeData { // TODO order and payment fee in same service? Separate logic as this is probably used in cart context diff --git a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation.php b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation.php index d0cdcd30c..cb4763d87 100644 --- a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation.php +++ b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation.php @@ -61,7 +61,7 @@ public function __construct(array $paymentRestrictionValidators) * * @return bool */ - public function isPaymentMethodValid(MolPaymentMethod $paymentMethod) + public function isPaymentMethodValid(MolPaymentMethod $paymentMethod): bool { $success = false; diff --git a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/AmountPaymentMethodRestrictionValidator.php b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/AmountPaymentMethodRestrictionValidator.php index fb5ae183a..3e886fe57 100644 --- a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/AmountPaymentMethodRestrictionValidator.php +++ b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/AmountPaymentMethodRestrictionValidator.php @@ -55,7 +55,7 @@ public function __construct( /** * {@inheritDoc} */ - public function isValid(MolPaymentMethod $paymentMethod) + public function isValid(MolPaymentMethod $paymentMethod): bool { $orderTotal = $this->context->getCart()->getOrderTotal(); @@ -77,7 +77,7 @@ public function isValid(MolPaymentMethod $paymentMethod) /** * {@inheritDoc} */ - public function supports(MolPaymentMethod $paymentMethod) + public function supports(MolPaymentMethod $paymentMethod): bool { return true; } diff --git a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/ApplePayPaymentMethodRestrictionValidator.php b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/ApplePayPaymentMethodRestrictionValidator.php index ee210a1a9..e98743f4c 100644 --- a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/ApplePayPaymentMethodRestrictionValidator.php +++ b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/ApplePayPaymentMethodRestrictionValidator.php @@ -37,34 +37,25 @@ namespace Mollie\Service\PaymentMethod\PaymentMethodRestrictionValidation; use Mollie\Adapter\ConfigurationAdapter; -use Mollie\Adapter\LegacyContext; use Mollie\Config\Config; use MolPaymentMethod; class ApplePayPaymentMethodRestrictionValidator implements PaymentMethodRestrictionValidatorInterface { - /** - * @var LegacyContext - */ - private $context; - /** * @var ConfigurationAdapter */ private $configurationAdapter; - public function __construct( - LegacyContext $context, - ConfigurationAdapter $configurationAdapter - ) { - $this->context = $context; + public function __construct(ConfigurationAdapter $configurationAdapter) + { $this->configurationAdapter = $configurationAdapter; } /** * {@inheritDoc} */ - public function isValid(MolPaymentMethod $paymentMethod) + public function isValid(MolPaymentMethod $paymentMethod): bool { if (!$this->isSslEnabledEverywhere()) { return false; @@ -80,15 +71,15 @@ public function isValid(MolPaymentMethod $paymentMethod) /** * {@inheritDoc} */ - public function supports(MolPaymentMethod $paymentMethod) + public function supports(MolPaymentMethod $paymentMethod): bool { - return $paymentMethod->getPaymentMethodName() == Config::MOLLIE_METHOD_ID_APPLE_PAY; + return $paymentMethod->getPaymentMethodName() === Config::MOLLIE_METHOD_ID_APPLE_PAY; } /** * @return bool */ - private function isSslEnabledEverywhere() + private function isSslEnabledEverywhere(): bool { return (bool) $this->configurationAdapter->get('PS_SSL_ENABLED_EVERYWHERE'); } @@ -96,7 +87,7 @@ private function isSslEnabledEverywhere() /** * @return bool */ - private function isPaymentMethodInCookie() + private function isPaymentMethodInCookie(): bool { if (!isset($_COOKIE['isApplePayMethod'])) { return false; diff --git a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/BasePaymentMethodRestrictionValidator.php b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/BasePaymentMethodRestrictionValidator.php index 8dafb669f..ff7895b12 100644 --- a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/BasePaymentMethodRestrictionValidator.php +++ b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/BasePaymentMethodRestrictionValidator.php @@ -44,7 +44,7 @@ class BasePaymentMethodRestrictionValidator implements PaymentMethodRestrictionV /** * {@inheritDoc} */ - public function isValid(MolPaymentMethod $paymentMethod) + public function isValid(MolPaymentMethod $paymentMethod): bool { if (!$this->isPaymentMethodEnabled($paymentMethod)) { return false; @@ -56,17 +56,12 @@ public function isValid(MolPaymentMethod $paymentMethod) /** * {@inheritDoc} */ - public function supports(MolPaymentMethod $paymentMethod) + public function supports(MolPaymentMethod $paymentMethod): bool { return true; } - /** - * @param MolPaymentMethod $paymentMethod - * - * @return bool - */ - private function isPaymentMethodEnabled($paymentMethod) + private function isPaymentMethodEnabled(MolPaymentMethod $paymentMethod): bool { return (bool) $paymentMethod->enabled; } diff --git a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/EnvironmentVersionSpecificPaymentMethodRestrictionValidator.php b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/EnvironmentVersionSpecificPaymentMethodRestrictionValidator.php index 0d9d14f21..744f4117c 100644 --- a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/EnvironmentVersionSpecificPaymentMethodRestrictionValidator.php +++ b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/EnvironmentVersionSpecificPaymentMethodRestrictionValidator.php @@ -37,7 +37,6 @@ namespace Mollie\Service\PaymentMethod\PaymentMethodRestrictionValidation; use Mollie\Adapter\LegacyContext; -use Mollie\Provider\EnvironmentVersionProviderInterface; use Mollie\Repository\MethodCountryRepository; use MolPaymentMethod; @@ -49,11 +48,6 @@ class EnvironmentVersionSpecificPaymentMethodRestrictionValidator implements Pay */ private $context; - /** - * @var EnvironmentVersionProviderInterface - */ - private $prestashopVersionProvider; - /** * @var MethodCountryRepository */ @@ -61,23 +55,19 @@ class EnvironmentVersionSpecificPaymentMethodRestrictionValidator implements Pay public function __construct( LegacyContext $context, - EnvironmentVersionProviderInterface $prestashopVersionProvider, MethodCountryRepository $methodCountryRepository ) { $this->context = $context; - $this->prestashopVersionProvider = $prestashopVersionProvider; $this->methodCountryRepository = $methodCountryRepository; } /** * {@inheritDoc} */ - public function isValid(MolPaymentMethod $paymentMethod) + public function isValid(MolPaymentMethod $paymentMethod): bool { - if (version_compare($this->prestashopVersionProvider->getPrestashopVersion(), '1.6.0.9', '>')) { - if (!$this->isCountryAvailable($paymentMethod)) { - return false; - } + if (!$this->isCountryAvailable($paymentMethod)) { + return false; } return true; @@ -86,12 +76,12 @@ public function isValid(MolPaymentMethod $paymentMethod) /** * {@inheritDoc} */ - public function supports(MolPaymentMethod $paymentMethod) + public function supports(MolPaymentMethod $paymentMethod): bool { return true; } - private function isCountryAvailable(MolPaymentMethod $paymentMethod) + private function isCountryAvailable(MolPaymentMethod $paymentMethod): bool { if ($paymentMethod->is_countries_applicable) { return $this->methodCountryRepository->checkIfMethodIsAvailableInCountry( diff --git a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/PaymentMethodRestrictionValidatorInterface.php b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/PaymentMethodRestrictionValidatorInterface.php index 102a6aa3d..e07558ce5 100644 --- a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/PaymentMethodRestrictionValidatorInterface.php +++ b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/PaymentMethodRestrictionValidatorInterface.php @@ -47,7 +47,7 @@ interface PaymentMethodRestrictionValidatorInterface * * @return bool */ - public function isValid(MolPaymentMethod $paymentMethod); + public function isValid(MolPaymentMethod $paymentMethod): bool; /** * Returns if payment restriction validator is supported by payment name @@ -56,5 +56,5 @@ public function isValid(MolPaymentMethod $paymentMethod); * * @return bool */ - public function supports(MolPaymentMethod $paymentMethod); + public function supports(MolPaymentMethod $paymentMethod): bool; } diff --git a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/VoucherPaymentMethodRestrictionValidator.php b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/VoucherPaymentMethodRestrictionValidator.php index d7adb4413..a1696c386 100644 --- a/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/VoucherPaymentMethodRestrictionValidator.php +++ b/src/Service/PaymentMethod/PaymentMethodRestrictionValidation/VoucherPaymentMethodRestrictionValidator.php @@ -63,7 +63,7 @@ public function __construct(LegacyContext $context, VoucherValidator $voucherVal * TODO extract voucher validator internals into this class + tests. * {@inheritDoc} */ - public function isValid(MolPaymentMethod $paymentMethod) + public function isValid(MolPaymentMethod $paymentMethod): bool { if (!$this->voucherValidator->validate($this->context->getCart()->getProducts())) { return false; @@ -75,8 +75,8 @@ public function isValid(MolPaymentMethod $paymentMethod) /** * {@inheritDoc} */ - public function supports(MolPaymentMethod $paymentMethod) + public function supports(MolPaymentMethod $paymentMethod): bool { - return $paymentMethod->getPaymentMethodName() == Config::MOLLIE_VOUCHER_METHOD_ID; + return $paymentMethod->getPaymentMethodName() === Config::MOLLIE_VOUCHER_METHOD_ID; } } diff --git a/src/Service/PaymentMethodService.php b/src/Service/PaymentMethodService.php index 576d07e6f..2ae9d10e4 100644 --- a/src/Service/PaymentMethodService.php +++ b/src/Service/PaymentMethodService.php @@ -353,6 +353,8 @@ public function getPaymentData( } if ($this->subscriptionOrder->validate(new Cart($cartId))) { + $paymentData->setSubscriptionOrder(true); + $molCustomer = $this->getCustomerInfo($cart->id_customer, true, false); // TODO handle this - throw exception or add log message. diff --git a/src/Service/SettingsSaveService.php b/src/Service/SettingsSaveService.php index 2482bc790..f3f75cdac 100644 --- a/src/Service/SettingsSaveService.php +++ b/src/Service/SettingsSaveService.php @@ -213,12 +213,17 @@ public function saveSettings(&$errors = []) Config::MOLLIE_SHOW_CUSTOM_LOGO, $useCustomLogo ); - $isApplePayDirectEnabled = (bool) Tools::getValue('MOLLIE_APPLE_PAY_DIRECT_ENABLED'); - if ($isApplePayDirectEnabled) { + + $isApplePayDirectProductEnabled = (int) Tools::getValue('MOLLIE_APPLE_PAY_DIRECT_PRODUCT_ENABLED'); + $isApplePayDirectCartEnabled = (int) Tools::getValue('MOLLIE_APPLE_PAY_DIRECT_CART_ENABLED'); + + if ($isApplePayDirectProductEnabled || $isApplePayDirectCartEnabled) { try { $this->applePayDirectCertificateHandler->handle(); } catch (ApplePayDirectCertificateCreation $e) { - $isApplePayDirectEnabled = false; + $isApplePayDirectProductEnabled = false; + $isApplePayDirectCartEnabled = false; + $errors[] = $e->getMessage(); $errors[] = TagsUtility::ppTags( $this->module->l('Grant permissions for the folder or visit [1]ApplePay[/1] to see how it can be added manually', self::FILE_NAME), @@ -226,6 +231,7 @@ public function saveSettings(&$errors = []) ); } } + $molliePaymentscreenLocale = Tools::getValue(Config::MOLLIE_PAYMENTSCREEN_LOCALE); $mollieOrderConfirmationSand = Tools::getValue(Config::MOLLIE_SEND_ORDER_CONFIRMATION); $mollieIFrameEnabled = Tools::getValue(Config::MOLLIE_IFRAME[$environment ? 'production' : 'sandbox']); @@ -234,13 +240,15 @@ public function saveSettings(&$errors = []) $showResentPayment = Tools::getValue(Config::MOLLIE_SHOW_RESEND_PAYMENT_LINK); $mollieIssuers = Tools::getValue(Config::MOLLIE_ISSUERS[$environment ? 'production' : 'sandbox']); $mollieCss = Tools::getValue(Config::MOLLIE_CSS); + if (!isset($mollieCss)) { $mollieCss = ''; } + $mollieLogger = Tools::getValue(Config::MOLLIE_DEBUG_LOG); $mollieApi = Tools::getValue(Config::MOLLIE_API); - $mollieMethodCountriesEnabled = (bool) Tools::getValue(Config::MOLLIE_METHOD_COUNTRIES); - $mollieMethodCountriesDisplayEnabled = (bool) Tools::getValue(Config::MOLLIE_METHOD_COUNTRIES_DISPLAY); + $mollieMethodCountriesEnabled = (int) Tools::getValue(Config::MOLLIE_METHOD_COUNTRIES); + $mollieMethodCountriesDisplayEnabled = (int) Tools::getValue(Config::MOLLIE_METHOD_COUNTRIES_DISPLAY); $mollieErrors = Tools::getValue(Config::MOLLIE_DISPLAY_ERRORS); $voucherCategory = Tools::getValue(Config::MOLLIE_VOUCHER_CATEGORY); $applePayDirectStyle = Tools::getValue(Config::MOLLIE_APPLE_PAY_DIRECT_STYLE); @@ -279,7 +287,9 @@ public function saveSettings(&$errors = []) if ($isBancontactQrCodeEnabled !== false) { $this->configurationAdapter->updateValue(Config::MOLLIE_BANCONTACT_QR_CODE_ENABLED, $isBancontactQrCodeEnabled); } - $this->configurationAdapter->updateValue(Config::MOLLIE_APPLE_PAY_DIRECT, $isApplePayDirectEnabled); + + $this->configurationAdapter->updateValue(Config::MOLLIE_APPLE_PAY_DIRECT_PRODUCT, $isApplePayDirectProductEnabled); + $this->configurationAdapter->updateValue(Config::MOLLIE_APPLE_PAY_DIRECT_CART, $isApplePayDirectCartEnabled); $this->configurationAdapter->updateValue(Config::MOLLIE_APPLE_PAY_DIRECT_STYLE, $applePayDirectStyle); $this->configurationAdapter->updateValue(Config::MOLLIE_API_KEY, $mollieApiKey); $this->configurationAdapter->updateValue(Config::MOLLIE_API_KEY_TEST, $mollieApiKeyTest); @@ -291,8 +301,8 @@ public function saveSettings(&$errors = []) $this->configurationAdapter->updateValue(Config::MOLLIE_IMAGES, $mollieImages); $this->configurationAdapter->updateValue(Config::MOLLIE_SHOW_RESEND_PAYMENT_LINK, $showResentPayment); $this->configurationAdapter->updateValue(Config::MOLLIE_ISSUERS, $mollieIssuers); - $this->configurationAdapter->updateValue(Config::MOLLIE_METHOD_COUNTRIES, (bool) $mollieMethodCountriesEnabled); - $this->configurationAdapter->updateValue(Config::MOLLIE_METHOD_COUNTRIES_DISPLAY, (bool) $mollieMethodCountriesDisplayEnabled); + $this->configurationAdapter->updateValue(Config::MOLLIE_METHOD_COUNTRIES, (int) $mollieMethodCountriesEnabled); + $this->configurationAdapter->updateValue(Config::MOLLIE_METHOD_COUNTRIES_DISPLAY, (int) $mollieMethodCountriesDisplayEnabled); $this->configurationAdapter->updateValue(Config::MOLLIE_CSS, $mollieCss); $this->configurationAdapter->updateValue(Config::MOLLIE_DISPLAY_ERRORS, (int) $mollieErrors); $this->configurationAdapter->updateValue(Config::MOLLIE_DEBUG_LOG, (int) $mollieLogger); @@ -302,7 +312,7 @@ public function saveSettings(&$errors = []) Config::MOLLIE_AUTO_SHIP_STATUSES, json_encode($this->getStatusesValue(Config::MOLLIE_AUTO_SHIP_STATUSES)) ); - $this->configurationAdapter->updateValue(Config::MOLLIE_AUTO_SHIP_MAIN, (bool) $mollieShipMain); + $this->configurationAdapter->updateValue(Config::MOLLIE_AUTO_SHIP_MAIN, (int) $mollieShipMain); $this->configurationAdapter->updateValue( Config::MOLLIE_TRACKING_URLS, json_encode(@json_decode(Tools::getValue(Config::MOLLIE_TRACKING_URLS))) diff --git a/src/Service/TransactionService.php b/src/Service/TransactionService.php index 7f3b56e66..7ad744dd4 100644 --- a/src/Service/TransactionService.php +++ b/src/Service/TransactionService.php @@ -201,9 +201,10 @@ public function processTransaction($apiPayment) $this->updatePaymentDescription($apiPayment, $orderId); } elseif (strpos($apiPayment->description, OrderNumberUtility::ORDER_NUMBER_PREFIX) === 0) { $this->handlePaymentDescription($apiPayment); - } elseif ($apiPayment->amountRefunded->value > 0) { + } elseif ($orderId) { $this->orderStatusService->setOrderStatus($orderId, $apiPayment->status); } + $orderId = Order::getOrderByCartId((int) $apiPayment->metadata->cart_id); } break; diff --git a/src/ServiceProvider/BaseServiceProvider.php b/src/ServiceProvider/BaseServiceProvider.php index 555387557..1a9fbc39e 100644 --- a/src/ServiceProvider/BaseServiceProvider.php +++ b/src/ServiceProvider/BaseServiceProvider.php @@ -43,6 +43,8 @@ use Mollie\Provider\UpdateMessageProviderInterface; use Mollie\Repository\AddressRepository; use Mollie\Repository\AddressRepositoryInterface; +use Mollie\Repository\CartRepository; +use Mollie\Repository\CartRepositoryInterface; use Mollie\Repository\CartRuleRepository; use Mollie\Repository\CartRuleRepositoryInterface; use Mollie\Repository\CurrencyRepository; @@ -68,6 +70,7 @@ use Mollie\Service\Content\SmartyTemplateParser; use Mollie\Service\Content\TemplateParserInterface; use Mollie\Service\PaymentMethod\PaymentMethodRestrictionValidation; +use Mollie\Service\PaymentMethod\PaymentMethodRestrictionValidation\AmountPaymentMethodRestrictionValidator; use Mollie\Service\PaymentMethod\PaymentMethodRestrictionValidation\ApplePayPaymentMethodRestrictionValidator; use Mollie\Service\PaymentMethod\PaymentMethodRestrictionValidation\BasePaymentMethodRestrictionValidator; use Mollie\Service\PaymentMethod\PaymentMethodRestrictionValidation\EnvironmentVersionSpecificPaymentMethodRestrictionValidator; @@ -155,6 +158,7 @@ public function register(Container $container) $this->addService($container, TaxRulesGroupRepositoryInterface::class, $container->get(TaxRulesGroupRepository::class)); $this->addService($container, TaxRuleRepositoryInterface::class, $container->get(TaxRuleRepository::class)); $this->addService($container, TaxRepositoryInterface::class, $container->get(TaxRepository::class)); + $this->addService($container, CartRepositoryInterface::class, $container->get(CartRepository::class)); $this->addService($container, OrderTotalProviderInterface::class, $container->get(OrderTotalProvider::class)); $this->addService($container, PaymentFeeProviderInterface::class, $container->get(PaymentFeeProvider::class)); @@ -187,6 +191,7 @@ public function register(Container $container) $container->get(VoucherPaymentMethodRestrictionValidator::class), $container->get(EnvironmentVersionSpecificPaymentMethodRestrictionValidator::class), $container->get(ApplePayPaymentMethodRestrictionValidator::class), + $container->get(AmountPaymentMethodRestrictionValidator::class), ]); $this->addService($container, CustomLogoProviderInterface::class, $container->get(CreditCardLogoProvider::class)); diff --git a/subscription/Exception/CouldNotHandleRecurringOrder.php b/subscription/Exception/CouldNotHandleRecurringOrder.php new file mode 100644 index 000000000..197ed5163 --- /dev/null +++ b/subscription/Exception/CouldNotHandleRecurringOrder.php @@ -0,0 +1,26 @@ +setAssociatedColumn('status') ) - ->add((new Filter('unit_price', TextType::class)) + ->add((new Filter('unit_price', MoneyType::class)) ->setTypeOptions([ 'required' => false, 'attr' => [ diff --git a/subscription/Grid/SubscriptionGridQueryBuilder.php b/subscription/Grid/SubscriptionGridQueryBuilder.php index c5a63dc4f..61a4db912 100644 --- a/subscription/Grid/SubscriptionGridQueryBuilder.php +++ b/subscription/Grid/SubscriptionGridQueryBuilder.php @@ -47,7 +47,7 @@ public function getSearchQueryBuilder(SearchCriteriaInterface $searchCriteria): $qb = $this->getQueryBuilder($searchCriteria->getFilters()) ->select('recurring_order.*') ->addSelect($this->getNameField() . ' as fullname') - ->addSelect('recurring_orders_product.quantity, recurring_orders_product.unit_price') + ->addSelect('ROUND(orders.total_paid, 2) as unit_price') ->addSelect('currency.iso_code') ; @@ -106,7 +106,7 @@ private function applyFilters(array $filters, QueryBuilder $qb): void 'fullname' => $this->getNameField(), 'description' => 'recurring_order.description', 'status' => 'recurring_order.status', - 'unit_price' => 'recurring_orders_product.unit_price', + 'unit_price' => 'orders.total_paid', 'iso_code' => 'currency.iso_code', ]; diff --git a/subscription/Handler/RecurringOrderHandler.php b/subscription/Handler/RecurringOrderHandler.php index 84218c164..757dad853 100644 --- a/subscription/Handler/RecurringOrderHandler.php +++ b/subscription/Handler/RecurringOrderHandler.php @@ -6,25 +6,35 @@ use Cart; use Mollie; +use Mollie\Action\CreateOrderPaymentFeeAction; +use Mollie\Action\UpdateOrderTotalsAction; +use Mollie\Adapter\ConfigurationAdapter; use Mollie\Adapter\Shop; use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\Subscription as MollieSubscription; use Mollie\Api\Types\PaymentStatus; use Mollie\Api\Types\SubscriptionStatus; use Mollie\Config\Config; +use Mollie\DTO\CreateOrderPaymentFeeActionData; +use Mollie\DTO\UpdateOrderTotalsData; use Mollie\Errors\Http\HttpStatusCode; +use Mollie\Exception\CouldNotCreateOrderPaymentFee; +use Mollie\Exception\CouldNotUpdateOrderTotals; +use Mollie\Exception\OrderCreationException; use Mollie\Exception\TransactionException; +use Mollie\Repository\MolOrderPaymentFeeRepositoryInterface; use Mollie\Repository\PaymentMethodRepositoryInterface; use Mollie\Service\MailService; use Mollie\Service\MollieOrderCreationService; use Mollie\Service\OrderStatusService; use Mollie\Service\PaymentMethodService; -use Mollie\Service\TransactionService; use Mollie\Subscription\Api\SubscriptionApi; +use Mollie\Subscription\Exception\CouldNotHandleRecurringOrder; use Mollie\Subscription\Factory\GetSubscriptionDataFactory; use Mollie\Subscription\Repository\RecurringOrderRepositoryInterface; use Mollie\Subscription\Utility\ClockInterface; use Mollie\Utility\SecureKeyUtility; +use MolOrderPaymentFee; use MolRecurringOrder; use MolRecurringOrdersProduct; use Order; @@ -54,8 +64,14 @@ class RecurringOrderHandler private $shop; /** @var MailService */ private $mailService; - /** @var TransactionService */ - private $transactionService; + /** @var MolOrderPaymentFeeRepositoryInterface */ + private $molOrderPaymentFeeRepository; + /** @var UpdateOrderTotalsAction */ + private $updateOrderTotalsAction; + /** @var CreateOrderPaymentFeeAction */ + private $createOrderPaymentFeeAction; + /** @var ConfigurationAdapter */ + private $configuration; public function __construct( SubscriptionApi $subscriptionApi, @@ -68,7 +84,11 @@ public function __construct( PaymentMethodService $paymentMethodService, ClockInterface $clock, Shop $shop, - MailService $mailService + MailService $mailService, + MolOrderPaymentFeeRepositoryInterface $molOrderPaymentFeeRepository, + UpdateOrderTotalsAction $updateOrderTotalsAction, + CreateOrderPaymentFeeAction $createOrderPaymentFeeAction, + ConfigurationAdapter $configuration ) { $this->subscriptionApi = $subscriptionApi; $this->subscriptionDataFactory = $subscriptionDataFactory; @@ -81,6 +101,10 @@ public function __construct( $this->clock = $clock; $this->shop = $shop; $this->mailService = $mailService; + $this->molOrderPaymentFeeRepository = $molOrderPaymentFeeRepository; + $this->updateOrderTotalsAction = $updateOrderTotalsAction; + $this->createOrderPaymentFeeAction = $createOrderPaymentFeeAction; + $this->configuration = $configuration; } public function handle(string $transactionId): string @@ -102,6 +126,7 @@ public function handle(string $transactionId): string $existingTransaction = $this->paymentMethodRepository->getPaymentBy('transaction_id', $transaction->id); + // TODO separate these actions into separate service. Test them as well. switch (true) { case $existingTransaction: $this->updateOrderStatus($transaction, (int) $existingTransaction['order_id']); @@ -119,13 +144,20 @@ public function handle(string $transactionId): string return 'OK'; } - private function createSubscription(Payment $transaction, MolRecurringOrder $recurringOrder, MollieSubscription $subscription) + /** + * @throws CouldNotHandleRecurringOrder + * @throws OrderCreationException + * @throws \PrestaShopDatabaseException + * @throws \PrestaShopException + */ + private function createSubscription(Payment $transaction, MolRecurringOrder $recurringOrder, MollieSubscription $subscription): void { $cart = new Cart($recurringOrder->id_cart); + /** @var array{success: bool, cart: Cart}|bool $newCart */ $newCart = $cart->duplicate(); - if (!$newCart['success']) { + if (!$newCart || !$newCart['success']) { return; } @@ -151,7 +183,7 @@ private function createSubscription(Payment $transaction, MolRecurringOrder $rec $this->mollie->validateOrder( (int) $newCart->id, - Config::getStatuses()[$transaction->status], + (int) $this->configuration->get(Config::MOLLIE_STATUS_AWAITING), (float) $subscription->amount->value, sprintf('subscription/%s', $methodName), null, @@ -161,15 +193,48 @@ private function createSubscription(Payment $transaction, MolRecurringOrder $rec $newCart->secure_key ); - $orderId = Order::getIdByCartId((int) $newCart->id); + $orderId = (int) Order::getIdByCartId((int) $newCart->id); $order = new Order($orderId); $specificPrice->delete(); $this->mollieOrderCreationService->createMolliePayment($transaction, (int) $newCart->id, $order->reference, (int) $orderId, PaymentStatus::STATUS_PAID); + + /** @var MolOrderPaymentFee|null $molOrderPaymentFee */ + $molOrderPaymentFee = $this->molOrderPaymentFeeRepository->findOneBy([ + 'id_order' => $recurringOrder->id_order, + ]); + + if ($molOrderPaymentFee) { + try { + $this->createOrderPaymentFeeAction->run(CreateOrderPaymentFeeActionData::create( + $orderId, + (int) $newCart->id, + (float) $molOrderPaymentFee->fee_tax_incl, + (float) $molOrderPaymentFee->fee_tax_excl + )); + } catch (CouldNotCreateOrderPaymentFee $exception) { + throw CouldNotHandleRecurringOrder::failedToCreateOrderPaymentFee($exception); + } + + try { + $this->updateOrderTotalsAction->run(UpdateOrderTotalsData::create( + $orderId, + (float) $molOrderPaymentFee->fee_tax_incl, + (float) $molOrderPaymentFee->fee_tax_excl, + (float) $transaction->amount->value, + (float) $cart->getOrderTotal(true, Cart::BOTH), + (float) $cart->getOrderTotal(false, Cart::BOTH) + )); + } catch (CouldNotUpdateOrderTotals $exception) { + throw CouldNotHandleRecurringOrder::failedToUpdateOrderTotalWithPaymentFee($exception); + } + } + + $this->orderStatusService->setOrderStatus($orderId, (int) Config::getStatuses()[$transaction->status]); } - private function updateOrderStatus(Payment $transaction, int $orderId) + private function updateOrderStatus(Payment $transaction, int $orderId): void { $this->orderStatusService->setOrderStatus($orderId, $transaction->status); $this->paymentMethodRepository->savePaymentStatus($transaction->id, $transaction->status, $orderId, $transaction->method); diff --git a/subscription/Handler/SubscriptionCreationHandler.php b/subscription/Handler/SubscriptionCreationHandler.php index 58e7ac27f..f0b90816d 100644 --- a/subscription/Handler/SubscriptionCreationHandler.php +++ b/subscription/Handler/SubscriptionCreationHandler.php @@ -52,7 +52,7 @@ private function createRecurringOrdersProduct(array $product): MolRecurringOrder $recurringOrdersProduct->id_product = $product['id_product']; $recurringOrdersProduct->id_product_attribute = $product['product_attribute_id']; $recurringOrdersProduct->quantity = $product['product_quantity']; - $recurringOrdersProduct->unit_price = $product['product_price']; + $recurringOrdersProduct->unit_price = $product['price']; $recurringOrdersProduct->add(); return $recurringOrdersProduct; diff --git a/subscription/Presenter/RecurringOrdersPresenter.php b/subscription/Presenter/RecurringOrdersPresenter.php index 8ec9906a3..3557f0f36 100644 --- a/subscription/Presenter/RecurringOrdersPresenter.php +++ b/subscription/Presenter/RecurringOrdersPresenter.php @@ -5,13 +5,16 @@ namespace Mollie\Subscription\Logger; use Currency; +use Mollie\Adapter\Context; use Mollie\Adapter\Language; use Mollie\Adapter\Link; use Mollie\Adapter\ToolsAdapter; +use Mollie\Repository\OrderRepositoryInterface; use Mollie\Subscription\Repository\RecurringOrderRepositoryInterface; use Mollie\Subscription\Repository\RecurringOrdersProductRepositoryInterface; +use Mollie\Utility\NumberUtility; use MolRecurringOrder; -use PrestaShop\Decimal\Number; +use Order; use Product; class RecurringOrdersPresenter @@ -26,19 +29,27 @@ class RecurringOrdersPresenter private $language; /** @var ToolsAdapter */ private $tools; + /** @var OrderRepositoryInterface */ + private $orderRepository; + /** @var Context */ + private $context; public function __construct( RecurringOrderRepositoryInterface $recurringOrderRepository, RecurringOrdersProductRepositoryInterface $recurringOrdersProductRepository, Link $link, Language $language, - ToolsAdapter $tools + ToolsAdapter $tools, + OrderRepositoryInterface $orderRepository, + Context $context ) { $this->recurringOrderRepository = $recurringOrderRepository; $this->link = $link; $this->recurringOrdersProductRepository = $recurringOrdersProductRepository; $this->language = $language; $this->tools = $tools; + $this->orderRepository = $orderRepository; + $this->context = $context; } public function present(string $molCustomerId): array @@ -53,15 +64,22 @@ public function present(string $molCustomerId): array $recurringOrdersPresentData = []; /** @var MolRecurringOrder $recurringOrder */ foreach ($recurringOrders as $recurringOrder) { - $recurringProduct = $this->recurringOrdersProductRepository->findOneBy(['id_mol_recurring_orders_product' => $recurringOrder->id]); + /** @var Order $order */ + $order = $this->orderRepository->findOneBy([ + 'id_order' => $recurringOrder->id_order, + ]); + + $recurringProduct = $this->recurringOrdersProductRepository->findOneBy([ + 'id_mol_recurring_orders_product' => $recurringOrder->id, + ]); + $product = new Product($recurringProduct->id_product, false, $this->language->getDefaultLanguageId()); - $totalPrice = (new Number((string) $recurringProduct->unit_price))->times(new Number((string) $recurringProduct->quantity)); $recurringOrderData = []; $recurringOrderData['recurring_order'] = $recurringOrder; $recurringOrderData['details_url'] = $this->link->getModuleLink('mollie', 'recurringOrderDetail', ['id_mol_recurring_order' => $recurringOrder->id]); - $recurringOrderData['product'] = $product; - $recurringOrderData['total_price'] = $this->tools->displayPrice($totalPrice->toPrecision(2), new Currency($recurringOrder->id_currency)); + $recurringOrderData['product_name'] = is_array($product->name) ? $product->name[$this->context->getLanguageId()] : $product->name; + $recurringOrderData['total_price'] = $this->tools->displayPrice(NumberUtility::toPrecision((float) $order->total_paid, 2), new Currency($recurringOrder->id_currency)); $recurringOrderData['currency'] = new \Currency($recurringOrder->id_currency); $recurringOrdersPresentData[] = $recurringOrderData; } diff --git a/tests/Integration/src/Action/CreateOrderPaymentFeeActionTest.php b/tests/Integration/src/Action/CreateOrderPaymentFeeActionTest.php new file mode 100644 index 000000000..79890feaa --- /dev/null +++ b/tests/Integration/src/Action/CreateOrderPaymentFeeActionTest.php @@ -0,0 +1,41 @@ +getService(CreateOrderPaymentFeeAction::class); + + $this->assertDatabaseHasNot(\MolOrderPaymentFee::class, + [ + 'id_cart' => 1, + 'id_order' => 1, + 'fee_tax_incl' => 12.1, + 'fee_tax_excl' => 10, + ] + ); + + $createOrderPaymentFeeAction->run(CreateOrderPaymentFeeActionData::create( + 1, + 1, + 12.1, + 10 + )); + + $this->assertDatabaseHas(\MolOrderPaymentFee::class, + [ + 'id_cart' => 1, + 'id_order' => 1, + 'fee_tax_incl' => 12.1, + 'fee_tax_excl' => 10, + ] + ); + } +} diff --git a/tests/Integration/src/Action/UpdateOrderTotalsActionTest.php b/tests/Integration/src/Action/UpdateOrderTotalsActionTest.php new file mode 100644 index 000000000..254d3caf3 --- /dev/null +++ b/tests/Integration/src/Action/UpdateOrderTotalsActionTest.php @@ -0,0 +1,43 @@ +getService(UpdateOrderTotalsAction::class); + + $this->assertDatabaseHasNot(\Order::class, + [ + 'id_order' => 1, + 'total_paid_tax_excl' => 18.26, + 'total_paid_tax_incl' => 22.1, + 'total_paid' => 22.1, + ] + ); + + $updateOrderTotalsAction->run(UpdateOrderTotalsData::create( + 1, + 12.1, + 10, + 22.1, + 10, + 8.264462 + )); + + $this->assertDatabaseHas(\Order::class, + [ + 'id_order' => 1, + 'total_paid_tax_excl' => 18.26, + 'total_paid_tax_incl' => 22.1, + 'total_paid' => 22.1, + ] + ); + } +} diff --git a/tests/Unit/Handler/Order/OrderPaymentFeeHandlerTest.php b/tests/Unit/Handler/Order/OrderPaymentFeeHandlerTest.php new file mode 100644 index 000000000..e33f33d5b --- /dev/null +++ b/tests/Unit/Handler/Order/OrderPaymentFeeHandlerTest.php @@ -0,0 +1,285 @@ +paymentMethodService = $this->createMock(PaymentMethodService::class); + $this->paymentFeeProvider = $this->createMock(PaymentFeeProviderInterface::class); + $this->createOrderPaymentFeeAction = $this->createMock(CreateOrderPaymentFeeAction::class); + $this->updateOrderTotalsAction = $this->createMock(UpdateOrderTotalsAction::class); + $this->orderRepository = $this->createMock(OrderRepositoryInterface::class); + $this->cartRepository = $this->createMock(CartRepositoryInterface::class); + } + + public function testItSuccessfullyHandlesOrderPaymentFee(): void + { + $order = $this->createMock(Order::class); + $order->id_cart = 1; + + $this->orderRepository->expects($this->once())->method('findOneBy')->willReturn($order); + + $cart = $this->createMock(Cart::class); + $cart->expects($this->exactly(2))->method('getOrderTotal')->willReturn(12.1); + + $this->cartRepository->expects($this->once())->method('findOneBy')->willReturn($cart); + + $molPaymentMethod = $this->createMock(MolPaymentMethod::class); + + $this->paymentMethodService->expects($this->once())->method('getPaymentMethod')->willReturn($molPaymentMethod); + + $paymentFeeData = $this->createMock(PaymentFeeData::class); + $paymentFeeData->expects($this->exactly(2))->method('getPaymentFeeTaxIncl')->willReturn(12.1); + $paymentFeeData->expects($this->exactly(2))->method('getPaymentFeeTaxExcl')->willReturn(10); + + $this->paymentFeeProvider->expects($this->once())->method('getPaymentFee')->willReturn($paymentFeeData); + + $this->createOrderPaymentFeeAction->expects($this->once())->method('run'); + + $this->updateOrderTotalsAction->expects($this->once())->method('run'); + + $orderPaymentFeeHandler = new OrderPaymentFeeHandler( + $this->paymentMethodService, + $this->paymentFeeProvider, + $this->createOrderPaymentFeeAction, + $this->updateOrderTotalsAction, + $this->orderRepository, + $this->cartRepository + ); + + /** @var Payment $apiPayment */ + $apiPayment = $this->createMock(Payment::class); + + $apiPayment->amount = (object) [ + 'value' => 12.1, + ]; + + $orderPaymentFeeHandler->addOrderPaymentFee(1, $apiPayment); + } + + public function testItUnsuccessfullyHandlesOrderPaymentFeeUnknownError(): void + { + $order = $this->createMock(Order::class); + $order->id_cart = 1; + + $this->orderRepository->expects($this->once())->method('findOneBy')->willReturn($order); + + $cart = $this->createMock(Cart::class); + $cart->expects($this->exactly(1))->method('getOrderTotal')->willThrowException(new Exception()); + + $this->cartRepository->expects($this->once())->method('findOneBy')->willReturn($cart); + + $orderPaymentFeeHandler = new OrderPaymentFeeHandler( + $this->paymentMethodService, + $this->paymentFeeProvider, + $this->createOrderPaymentFeeAction, + $this->updateOrderTotalsAction, + $this->orderRepository, + $this->cartRepository + ); + + /** @var Payment $apiPayment */ + $apiPayment = $this->createMock(Payment::class); + + $this->expectException(CouldNotHandleOrderPaymentFee::class); + $this->expectExceptionCode(ExceptionCode::INFRASTRUCTURE_UNKNOWN_ERROR); + + $orderPaymentFeeHandler->addOrderPaymentFee(1, $apiPayment); + } + + public function testItUnsuccessfullyHandlesOrderPaymentFeeFailedToRetrievePaymentMethod(): void + { + $order = $this->createMock(Order::class); + $order->id_cart = 1; + + $this->orderRepository->expects($this->once())->method('findOneBy')->willReturn($order); + + $cart = $this->createMock(Cart::class); + $cart->expects($this->exactly(2))->method('getOrderTotal')->willReturn(12.1); + + $this->cartRepository->expects($this->once())->method('findOneBy')->willReturn($cart); + + $this->paymentMethodService->expects($this->once())->method('getPaymentMethod')->willThrowException(new OrderCreationException()); + + $orderPaymentFeeHandler = new OrderPaymentFeeHandler( + $this->paymentMethodService, + $this->paymentFeeProvider, + $this->createOrderPaymentFeeAction, + $this->updateOrderTotalsAction, + $this->orderRepository, + $this->cartRepository + ); + + /** @var Payment $apiPayment */ + $apiPayment = $this->createMock(Payment::class); + + $this->expectException(CouldNotHandleOrderPaymentFee::class); + $this->expectExceptionCode(ExceptionCode::ORDER_FAILED_TO_RETRIEVE_PAYMENT_METHOD); + + $orderPaymentFeeHandler->addOrderPaymentFee(1, $apiPayment); + } + + public function testItUnsuccessfullyHandlesOrderPaymentFeeFailedToRetrievePaymentFee(): void + { + $order = $this->createMock(Order::class); + $order->id_cart = 1; + + $this->orderRepository->expects($this->once())->method('findOneBy')->willReturn($order); + + $cart = $this->createMock(Cart::class); + $cart->expects($this->exactly(2))->method('getOrderTotal')->willReturn(12.1); + + $this->cartRepository->expects($this->once())->method('findOneBy')->willReturn($cart); + + $molPaymentMethod = $this->createMock(MolPaymentMethod::class); + + $this->paymentMethodService->expects($this->once())->method('getPaymentMethod')->willReturn($molPaymentMethod); + + $this->paymentFeeProvider->expects($this->once())->method('getPaymentFee')->willThrowException(new FailedToProvidePaymentFeeException()); + + $orderPaymentFeeHandler = new OrderPaymentFeeHandler( + $this->paymentMethodService, + $this->paymentFeeProvider, + $this->createOrderPaymentFeeAction, + $this->updateOrderTotalsAction, + $this->orderRepository, + $this->cartRepository + ); + + /** @var Payment $apiPayment */ + $apiPayment = $this->createMock(Payment::class); + + $this->expectException(CouldNotHandleOrderPaymentFee::class); + $this->expectExceptionCode(ExceptionCode::ORDER_FAILED_TO_RETRIEVE_PAYMENT_FEE); + + $orderPaymentFeeHandler->addOrderPaymentFee(1, $apiPayment); + } + + public function testItUnsuccessfullyHandlesOrderPaymentFeeFailedToCreateOrderPaymentFee(): void + { + $order = $this->createMock(Order::class); + $order->id_cart = 1; + + $this->orderRepository->expects($this->once())->method('findOneBy')->willReturn($order); + + $cart = $this->createMock(Cart::class); + $cart->expects($this->exactly(2))->method('getOrderTotal')->willReturn(12.1); + + $this->cartRepository->expects($this->once())->method('findOneBy')->willReturn($cart); + + $molPaymentMethod = $this->createMock(MolPaymentMethod::class); + + $this->paymentMethodService->expects($this->once())->method('getPaymentMethod')->willReturn($molPaymentMethod); + + $paymentFeeData = $this->createMock(PaymentFeeData::class); + $paymentFeeData->expects($this->exactly(1))->method('getPaymentFeeTaxIncl')->willReturn(12.1); + $paymentFeeData->expects($this->exactly(1))->method('getPaymentFeeTaxExcl')->willReturn(10); + + $this->paymentFeeProvider->expects($this->once())->method('getPaymentFee')->willReturn($paymentFeeData); + + $this->createOrderPaymentFeeAction->expects($this->once())->method('run')->willThrowException(new CouldNotCreateOrderPaymentFee()); + + $orderPaymentFeeHandler = new OrderPaymentFeeHandler( + $this->paymentMethodService, + $this->paymentFeeProvider, + $this->createOrderPaymentFeeAction, + $this->updateOrderTotalsAction, + $this->orderRepository, + $this->cartRepository + ); + + /** @var Payment $apiPayment */ + $apiPayment = $this->createMock(Payment::class); + + $this->expectException(CouldNotHandleOrderPaymentFee::class); + $this->expectExceptionCode(ExceptionCode::ORDER_FAILED_TO_CREATE_ORDER_PAYMENT_FEE); + + $orderPaymentFeeHandler->addOrderPaymentFee(1, $apiPayment); + } + + public function testItUnsuccessfullyHandlesOrderPaymentFeeFailedToUpdateOrderTotalWithPaymentFee(): void + { + $order = $this->createMock(Order::class); + $order->id_cart = 1; + + $this->orderRepository->expects($this->once())->method('findOneBy')->willReturn($order); + + $cart = $this->createMock(Cart::class); + $cart->expects($this->exactly(2))->method('getOrderTotal')->willReturn(12.1); + + $this->cartRepository->expects($this->once())->method('findOneBy')->willReturn($cart); + + $molPaymentMethod = $this->createMock(MolPaymentMethod::class); + + $this->paymentMethodService->expects($this->once())->method('getPaymentMethod')->willReturn($molPaymentMethod); + + $paymentFeeData = $this->createMock(PaymentFeeData::class); + $paymentFeeData->expects($this->exactly(2))->method('getPaymentFeeTaxIncl')->willReturn(12.1); + $paymentFeeData->expects($this->exactly(2))->method('getPaymentFeeTaxExcl')->willReturn(10); + + $this->paymentFeeProvider->expects($this->once())->method('getPaymentFee')->willReturn($paymentFeeData); + + $this->createOrderPaymentFeeAction->expects($this->once())->method('run'); + + $this->updateOrderTotalsAction->expects($this->once())->method('run')->willThrowException(new CouldNotUpdateOrderTotals()); + + $orderPaymentFeeHandler = new OrderPaymentFeeHandler( + $this->paymentMethodService, + $this->paymentFeeProvider, + $this->createOrderPaymentFeeAction, + $this->updateOrderTotalsAction, + $this->orderRepository, + $this->cartRepository + ); + + /** @var Payment $apiPayment */ + $apiPayment = $this->createMock(Payment::class); + + $apiPayment->amount = (object) [ + 'value' => 12.1, + ]; + + $this->expectException(CouldNotHandleOrderPaymentFee::class); + $this->expectExceptionCode(ExceptionCode::ORDER_FAILED_TO_UPDATE_ORDER_TOTAL_WITH_PAYMENT_FEE); + + $orderPaymentFeeHandler->addOrderPaymentFee(1, $apiPayment); + } +} diff --git a/tests/Unit/Service/PaymentMethod/PaymentMethodRestrictionValidation/ApplePayPaymentRestrictionValidationTest.php b/tests/Unit/Service/PaymentMethod/PaymentMethodRestrictionValidation/ApplePayPaymentRestrictionValidationTest.php index 7958a0bd0..346b8dbd9 100644 --- a/tests/Unit/Service/PaymentMethod/PaymentMethodRestrictionValidation/ApplePayPaymentRestrictionValidationTest.php +++ b/tests/Unit/Service/PaymentMethod/PaymentMethodRestrictionValidation/ApplePayPaymentRestrictionValidationTest.php @@ -1,6 +1,5 @@ getMockBuilder(LegacyContext::class) - ->disableOriginalConstructor() - ->getMock(); + $applePayValidation = new ApplePayPaymentMethodRestrictionValidator( - $contextMock, $configurationAdapter ); $isValid = $applePayValidation->isValid( $this->mockPaymentMethod(Config::MOLLIE_METHOD_ID_APPLE_PAY, true) ); + $this->assertEquals($expectedResult, $isValid); } @@ -60,11 +57,11 @@ public function getApplePayPaymentRestrictionValidationDataProvider() public function testIsSupported($paymentName, $expectedResult) { $applePayValidation = new ApplePayPaymentMethodRestrictionValidator( - $this->mockContext('AT', 'AUD'), $this->mockConfigurationAdapter([ 'PS_SSL_ENABLED_EVERYWHERE' => true, ]) ); + $this->assertEquals($expectedResult, $applePayValidation->supports($paymentName)); } diff --git a/tests/phpstan/phpstan_base.neon b/tests/phpstan/phpstan_base.neon index b631d69ca..bde2361d4 100644 --- a/tests/phpstan/phpstan_base.neon +++ b/tests/phpstan/phpstan_base.neon @@ -41,5 +41,6 @@ parameters: - '#Call to method [a-zA-Z0-9_]+\(\) on an unknown class AttributeCore.#' - '#Parameter \#1 \$value of method ControllerCore\:\:ajaxRender\(\) expects null, string\|false given.#' - '#Call to function is_subclass_of\(\) with.*will always evaluate to false.#' + - '#Call to function is_array\(\) with.*will always evaluate to false.#' level: 5 diff --git a/tests/seed/database/prestashop_1784_2.sql b/tests/seed/database/prestashop_1784_2.sql index 27faccc62..214c35d15 100755 --- a/tests/seed/database/prestashop_1784_2.sql +++ b/tests/seed/database/prestashop_1784_2.sql @@ -3939,8 +3939,8 @@ INSERT INTO `ps_configuration` (`id_configuration`, `id_shop_group`, `id_shop`, (231, NULL, NULL, 'HOMESLIDER_PAUSE', '7700', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (232, NULL, NULL, 'HOMESLIDER_LOOP', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (233, NULL, NULL, 'PS_BASE_DISTANCE_UNIT', 'm', '0000-00-00 00:00:00', '2022-03-23 08:34:58'), -(234, NULL, NULL, 'PS_SHOP_DOMAIN', 'demoshop1784.eu.ngrok.io', '0000-00-00 00:00:00', '2022-03-18 13:44:55'), -(235, NULL, NULL, 'PS_SHOP_DOMAIN_SSL', 'demoshop1784.eu.ngrok.io', '0000-00-00 00:00:00', '2022-03-18 13:44:55'), +(234, NULL, NULL, 'PS_SHOP_DOMAIN', 'demoshop1784.ngrok.io', '0000-00-00 00:00:00', '2022-03-18 13:44:55'), +(235, NULL, NULL, 'PS_SHOP_DOMAIN_SSL', 'demoshop1784.ngrok.io', '0000-00-00 00:00:00', '2022-03-18 13:44:55'), (236, NULL, NULL, 'PS_SHOP_NAME', 'PS1784', '0000-00-00 00:00:00', '2022-03-18 13:44:55'), (237, NULL, NULL, 'PS_SHOP_EMAIL', 'demo@demo.com', '0000-00-00 00:00:00', '2022-03-18 13:44:56'), (238, NULL, NULL, 'PS_MAIL_METHOD', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), @@ -4607,36 +4607,36 @@ CREATE TABLE `ps_connections_source` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `ps_connections_source` (`id_connections_source`, `id_connections`, `http_referer`, `request_uri`, `keywords`, `date_add`) VALUES -(1, 5, 'https://demoshop1784.eu.ngrok.io/admin1/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'demoshop1784.eu.ngrok.io/shop2/gb/', '', '2022-03-22 08:36:25'), -(2, 8, 'https://demoshop1784.eu.ngrok.io/admin1/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-22 10:16:01'), -(3, 43, 'https://demoshop1784.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=tZ574aBpKsfXGfPK_ADZztbV5fsBScNAsu1EB4V5Org', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-22 12:45:44'), -(4, 43, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/en/module/mollie/return?cart_id=32&utm_nooverride=1&rand=1647953895&key=c73350cb18a0408243e4723d1918224e&customerId=3&order_number=mol_326239c7e7921c51647953895', '', '2022-03-22 12:58:27'), -(5, 63, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/', '', '2022-03-23 07:39:50'), -(6, 65, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/', '', '2022-03-23 07:41:05'), -(7, 67, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/', '', '2022-03-23 07:41:55'), -(8, 69, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/', '', '2022-03-23 07:53:47'), -(9, 74, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-23 08:00:30'), -(10, 84, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/', '', '2022-03-23 08:10:05'), -(11, 87, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-23 08:11:11'), -(12, 89, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-23 08:14:28'), -(13, 43, 'https://demoshop1784.eu.ngrok.io/shop2/gb/', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-23 08:25:24'), -(14, 105, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-23 08:38:30'), -(15, 117, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/', '', '2022-03-23 15:52:55'), -(16, 119, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/', '', '2022-03-23 15:53:53'), -(17, 121, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/', '', '2022-03-23 15:54:46'), -(18, 123, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/', '', '2022-03-23 15:55:35'), -(19, 125, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-23 15:56:35'), -(20, 131, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/', '', '2022-03-23 15:58:26'), -(21, 133, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-23 15:59:24'), -(22, 135, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-23 16:00:20'), -(23, 97, 'https://demoshop1784.eu.ngrok.io/shop2/gb/', 'demoshop1784.eu.ngrok.io/SHOP2/gb/', '', '2022-03-23 16:11:23'), -(24, 145, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/en/', '', '2022-03-23 16:15:12'), -(25, 164, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/module/mollie/return?cart_id=100&utm_nooverride=1&rand=1680689211&key=f2ae1ef7d3756806840ed6182dca7133&customerId=3&order_number=mol_100642d483bd9e8c1680689211', '', '2023-04-05 11:07:01'), -(26, 164, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/module/mollie/return?cart_id=101&utm_nooverride=1&rand=1680689270&key=73662c516c54101515251463bd18783e&customerId=3&order_number=mol_101642d4876253f91680689270', '', '2023-04-05 11:07:58'), -(27, 164, 'https://demoshop1784.eu.ngrok.io/', 'demoshop1784.eu.ngrok.io/SHOP2/de/module/mollie/return?cart_id=102&utm_nooverride=1&rand=1680689316&key=8b78539acc38d6297467adad697b2e31&customerId=3&order_number=mol_102642d48a4ac4791680689316', '', '2023-04-05 11:08:44'), -(28, 164, 'https://demoshop1784.eu.ngrok.io/__/', 'demoshop1784.eu.ngrok.io/SHOP2/de/bestellbestatigung?id_cart=102&id_module=80&id_order=30&key=c87361b275fdc73622d49fd9819156e4', '', '2023-04-05 11:08:46'), -(29, 164, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/module/mollie/return?cart_id=103&utm_nooverride=1&rand=1680689362&key=19064c071554f3667f69547cd940945f&customerId=3&order_number=mol_103642d48d2707311680689362', '', '2023-04-05 11:09:27'), -(30, 164, 'https://www.mollie.com/', 'demoshop1784.eu.ngrok.io/SHOP2/de/module/mollie/return?cart_id=104&utm_nooverride=1&rand=1680689401&key=2626e82aa1ad127346b09a695618b678&customerId=3&order_number=mol_104642d48f9494bf1680689401', '', '2023-04-05 11:10:06'); +(1, 5, 'https://demoshop1784.ngrok.io/admin1/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'demoshop1784.ngrok.io/shop2/gb/', '', '2022-03-22 08:36:25'), +(2, 8, 'https://demoshop1784.ngrok.io/admin1/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-22 10:16:01'), +(3, 43, 'https://demoshop1784.ngrok.io/admin1/index.php/improve/payment/preferences?_token=tZ574aBpKsfXGfPK_ADZztbV5fsBScNAsu1EB4V5Org', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-22 12:45:44'), +(4, 43, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/en/module/mollie/return?cart_id=32&utm_nooverride=1&rand=1647953895&key=c73350cb18a0408243e4723d1918224e&customerId=3&order_number=mol_326239c7e7921c51647953895', '', '2022-03-22 12:58:27'), +(5, 63, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/', '', '2022-03-23 07:39:50'), +(6, 65, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/', '', '2022-03-23 07:41:05'), +(7, 67, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/', '', '2022-03-23 07:41:55'), +(8, 69, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/', '', '2022-03-23 07:53:47'), +(9, 74, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-23 08:00:30'), +(10, 84, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/', '', '2022-03-23 08:10:05'), +(11, 87, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-23 08:11:11'), +(12, 89, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-23 08:14:28'), +(13, 43, 'https://demoshop1784.ngrok.io/shop2/gb/', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-23 08:25:24'), +(14, 105, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-23 08:38:30'), +(15, 117, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/', '', '2022-03-23 15:52:55'), +(16, 119, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/', '', '2022-03-23 15:53:53'), +(17, 121, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/', '', '2022-03-23 15:54:46'), +(18, 123, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/', '', '2022-03-23 15:55:35'), +(19, 125, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-23 15:56:35'), +(20, 131, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/', '', '2022-03-23 15:58:26'), +(21, 133, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-23 15:59:24'), +(22, 135, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-23 16:00:20'), +(23, 97, 'https://demoshop1784.ngrok.io/shop2/gb/', 'demoshop1784.ngrok.io/SHOP2/gb/', '', '2022-03-23 16:11:23'), +(24, 145, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/en/', '', '2022-03-23 16:15:12'), +(25, 164, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/module/mollie/return?cart_id=100&utm_nooverride=1&rand=1680689211&key=f2ae1ef7d3756806840ed6182dca7133&customerId=3&order_number=mol_100642d483bd9e8c1680689211', '', '2023-04-05 11:07:01'), +(26, 164, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/module/mollie/return?cart_id=101&utm_nooverride=1&rand=1680689270&key=73662c516c54101515251463bd18783e&customerId=3&order_number=mol_101642d4876253f91680689270', '', '2023-04-05 11:07:58'), +(27, 164, 'https://demoshop1784.ngrok.io/', 'demoshop1784.ngrok.io/SHOP2/de/module/mollie/return?cart_id=102&utm_nooverride=1&rand=1680689316&key=8b78539acc38d6297467adad697b2e31&customerId=3&order_number=mol_102642d48a4ac4791680689316', '', '2023-04-05 11:08:44'), +(28, 164, 'https://demoshop1784.ngrok.io/__/', 'demoshop1784.ngrok.io/SHOP2/de/bestellbestatigung?id_cart=102&id_module=80&id_order=30&key=c87361b275fdc73622d49fd9819156e4', '', '2023-04-05 11:08:46'), +(29, 164, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/module/mollie/return?cart_id=103&utm_nooverride=1&rand=1680689362&key=19064c071554f3667f69547cd940945f&customerId=3&order_number=mol_103642d48d2707311680689362', '', '2023-04-05 11:09:27'), +(30, 164, 'https://www.mollie.com/', 'demoshop1784.ngrok.io/SHOP2/de/module/mollie/return?cart_id=104&utm_nooverride=1&rand=1680689401&key=2626e82aa1ad127346b09a695618b678&customerId=3&order_number=mol_104642d48f9494bf1680689401', '', '2023-04-05 11:10:06'); DROP TABLE IF EXISTS `ps_contact`; CREATE TABLE `ps_contact` ( @@ -23924,8 +23924,8 @@ CREATE TABLE `ps_shop_url` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `ps_shop_url` (`id_shop_url`, `id_shop`, `domain`, `domain_ssl`, `physical_uri`, `virtual_uri`, `main`, `active`) VALUES -(1, 1, 'demoshop1784.eu.ngrok.io', 'demoshop1784.eu.ngrok.io', '/', '', 1, 1), -(3, 3, 'demoshop1784.eu.ngrok.io', 'demoshop1784.eu.ngrok.io', '/', 'SHOP2/', 1, 1); +(1, 1, 'demoshop1784.ngrok.io', 'demoshop1784.ngrok.io', '/', '', 1, 1), +(3, 3, 'demoshop1784.ngrok.io', 'demoshop1784.ngrok.io', '/', 'SHOP2/', 1, 1); DROP TABLE IF EXISTS `ps_smarty_cache`; CREATE TABLE `ps_smarty_cache` ( diff --git a/tests/seed/database/prestashop_8.sql b/tests/seed/database/prestashop_8.sql index d716434e0..41f86b2be 100644 --- a/tests/seed/database/prestashop_8.sql +++ b/tests/seed/database/prestashop_8.sql @@ -3278,8 +3278,8 @@ INSERT INTO `ps_configuration` (`id_configuration`, `id_shop_group`, `id_shop`, (231, NULL, NULL, 'HOMESLIDER_PAUSE', '7700', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (232, NULL, NULL, 'HOMESLIDER_LOOP', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (233, NULL, NULL, 'PS_BASE_DISTANCE_UNIT', 'm', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), -(234, NULL, NULL, 'PS_SHOP_DOMAIN', 'demoshop8.eu.ngrok.io', '0000-00-00 00:00:00', '2023-05-02 12:16:57'), -(235, NULL, NULL, 'PS_SHOP_DOMAIN_SSL', 'demoshop8.eu.ngrok.io', '0000-00-00 00:00:00', '2023-05-02 12:16:57'), +(234, NULL, NULL, 'PS_SHOP_DOMAIN', 'demoshop8.ngrok.io', '0000-00-00 00:00:00', '2023-05-02 12:16:57'), +(235, NULL, NULL, 'PS_SHOP_DOMAIN_SSL', 'demoshop8.ngrok.io', '0000-00-00 00:00:00', '2023-05-02 12:16:57'), (236, NULL, NULL, 'PS_SHOP_NAME', 'PrestaShop', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (237, NULL, NULL, 'PS_SHOP_EMAIL', 'demo@prestashop.com', '0000-00-00 00:00:00', '2023-05-02 12:16:59'), (238, NULL, NULL, 'PS_MAIL_METHOD', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), @@ -3758,56 +3758,56 @@ CREATE TABLE `ps_connections_source` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `ps_connections_source` (`id_connections_source`, `id_connections`, `http_referer`, `request_uri`, `keywords`, `date_add`) VALUES -(1, 2, '', 'demoshop8.eu.ngrok.io/', '', '2023-05-02 12:19:12'), -(2, 3, '', 'demoshop8.eu.ngrok.io/', '', '2023-05-08 16:44:27'), -(3, 3, '', 'demoshop8.eu.ngrok.io/robots.txt', '', '2023-05-08 16:44:33'), -(4, 3, '', 'demoshop8.eu.ngrok.io/robots.txt', '', '2023-05-08 16:44:33'), -(5, 4, '', 'demoshop8.eu.ngrok.io/shop2/en/', '', '2023-05-08 17:09:17'), -(6, 5, '', 'demoshop8.eu.ngrok.io/shop2/en/', '', '2023-05-09 08:24:34'), -(7, 6, 'https://demoshop8.eu.ngrok.io/SHOP2/index.php?controller=my-account', 'demoshop8.eu.ngrok.io/shop2/en/login?back=my-account', '', '2023-05-15 09:53:49'), -(8, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/index.php?controller=my-account', 'demoshop8.eu.ngrok.io/shop2/en/login?back=my-account', '', '2023-05-15 09:55:48'), -(9, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 09:56:37'), -(10, 11, 'https://www.mollie.com/', 'demoshop8.eu.ngrok.io/shop2/de/module/mollie/return?cart_id=7&utm_nooverride=1&rand=1684137420&key=d3706ec244ca9eab42f1fc44b328f4ae&customerId=3&order_number=mol_76461e5cc3a5e51684137420', '', '2023-05-15 09:57:11'), -(11, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 09:58:00'), -(12, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 09:58:21'), -(13, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 09:58:42'), -(14, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 09:59:07'), -(15, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:00:43'), -(16, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:00:50'), -(17, 11, 'https://www.mollie.com/', 'demoshop8.eu.ngrok.io/shop2/de/module/mollie/return?cart_id=13&utm_nooverride=1&rand=1684137664&key=8900fd298500393a9e33f64884749e5d&customerId=3&order_number=mol_136461e6c020e831684137664', '', '2023-05-15 10:01:13'), -(18, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:02:04'), -(19, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:02:16'), -(20, 11, 'https://demoshop8.eu.ngrok.io/', 'demoshop8.eu.ngrok.io/shop2/de/module/mollie/return?cart_id=15&utm_nooverride=1&rand=1684137749&key=8cb2296283120dba6295254e168228b8&customerId=3&order_number=mol_156461e71509c031684137749', '', '2023-05-15 10:02:40'), -(21, 11, 'https://demoshop8.eu.ngrok.io/__/', 'demoshop8.eu.ngrok.io/shop2/de/bestellbestatigung?id_cart=15&id_module=68&id_order=9&key=0c46e3398a8f3f024dc6569fc56ed4eb', '', '2023-05-15 10:02:43'), -(22, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:03:08'), -(23, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:03:29'), -(24, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:03:51'), -(25, 11, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:04:13'), -(26, 19, '', 'demoshop8.eu.ngrok.io/shop2/de/warenkorb?action=show', '', '2023-05-15 10:09:16'), -(27, 19, '', 'demoshop8.eu.ngrok.io/shop2/de/warenkorb?action=show', '', '2023-05-15 10:09:23'), -(28, 19, '', 'demoshop8.eu.ngrok.io/shop2/de/warenkorb?action=show', '', '2023-05-15 10:09:27'), -(29, 19, '', 'demoshop8.eu.ngrok.io/shop2/de/warenkorb?action=show', '', '2023-05-15 10:09:33'), -(30, 19, '', 'demoshop8.eu.ngrok.io/shop2/de/warenkorb?action=show', '', '2023-05-15 10:09:34'), -(31, 19, '', 'demoshop8.eu.ngrok.io/shop2/de/', '', '2023-05-15 10:10:26'), -(32, 19, 'https://www.mollie.com/', 'demoshop8.eu.ngrok.io/shop2/de/module/mollie/return?cart_id=20&utm_nooverride=1&rand=1684138327&key=2e74e2ae079c17082613558eb9b9c2db&customerId=3&order_number=mol_206461e95746ba71684138327', '', '2023-05-15 10:12:18'), -(33, 20, '', 'demoshop8.eu.ngrok.io/robots.txt', '', '2023-05-15 10:12:52'), -(34, 21, '', 'demoshop8.eu.ngrok.io/en/', '', '2023-05-15 10:12:52'), -(35, 22, 'https://demoshop8.eu.ngrok.io/SHOP2/index.php?controller=my-account', 'demoshop8.eu.ngrok.io/shop2/en/login?back=my-account', '', '2023-05-15 10:22:02'), -(36, 27, 'https://demoshop8.eu.ngrok.io/SHOP2/index.php?controller=my-account', 'demoshop8.eu.ngrok.io/shop2/en/login?back=my-account', '', '2023-05-15 10:23:45'), -(37, 27, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:25:02'), -(38, 27, 'https://demoshop8.eu.ngrok.io/', 'demoshop8.eu.ngrok.io/shop2/de/module/mollie/return?cart_id=21&utm_nooverride=1&rand=1684139123&key=00a8bde746f83e8885f48645578f9544&customerId=3&order_number=mol_216461ec7306c9e1684139123', '', '2023-05-15 10:25:37'), -(39, 27, 'https://demoshop8.eu.ngrok.io/__/', 'demoshop8.eu.ngrok.io/shop2/de/bestellbestatigung?id_cart=21&id_module=68&id_order=11&key=0c46e3398a8f3f024dc6569fc56ed4eb', '', '2023-05-15 10:25:42'), -(40, 27, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:26:08'), -(41, 27, 'https://www.mollie.com/', 'demoshop8.eu.ngrok.io/shop2/de/module/mollie/return?cart_id=22&utm_nooverride=1&rand=1684139182&key=239f329ef0c0962a66f3f6b57761a643&customerId=3&order_number=mol_226461ecae77ce11684139182', '', '2023-05-15 10:26:34'), -(42, 27, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:26:56'), -(43, 27, 'https://www.mollie.com/', 'demoshop8.eu.ngrok.io/shop2/de/module/mollie/return?cart_id=23&utm_nooverride=1&rand=1684139231&key=1dbd385fe7198fdfad40185f704d510a&customerId=3&order_number=mol_236461ecdf1959f1684139231', '', '2023-05-15 10:27:19'), -(44, 27, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:27:42'), -(45, 27, 'https://www.mollie.com/', 'demoshop8.eu.ngrok.io/shop2/de/module/mollie/return?cart_id=24&utm_nooverride=1&rand=1684139277&key=47e45fd72178d52d813c84d73e229dbd&customerId=3&order_number=mol_246461ed0d1102a1684139277', '', '2023-05-15 10:28:09'), -(46, 27, 'https://demoshop8.eu.ngrok.io/SHOP2/en/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/en/order-history', '', '2023-05-15 10:28:46'), -(47, 27, 'https://www.mollie.com/', 'demoshop8.eu.ngrok.io/shop2/en/module/mollie/return?cart_id=25&utm_nooverride=1&rand=1684139342&key=46c2c075c7e4377e2013d07caf01445d&customerId=3&order_number=mol_256461ed4eb56401684139342', '', '2023-05-15 10:29:16'), -(48, 27, 'https://demoshop8.eu.ngrok.io/SHOP2/en/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/en/order-history', '', '2023-05-15 10:29:20'), -(49, 27, 'https://demoshop8.eu.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.eu.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:30:10'), -(50, 44, '', 'demoshop8.eu.ngrok.io/shop2/en/', '', '2023-05-15 10:31:31'); +(1, 2, '', 'demoshop8.ngrok.io/', '', '2023-05-02 12:19:12'), +(2, 3, '', 'demoshop8.ngrok.io/', '', '2023-05-08 16:44:27'), +(3, 3, '', 'demoshop8.ngrok.io/robots.txt', '', '2023-05-08 16:44:33'), +(4, 3, '', 'demoshop8.ngrok.io/robots.txt', '', '2023-05-08 16:44:33'), +(5, 4, '', 'demoshop8.ngrok.io/shop2/en/', '', '2023-05-08 17:09:17'), +(6, 5, '', 'demoshop8.ngrok.io/shop2/en/', '', '2023-05-09 08:24:34'), +(7, 6, 'https://demoshop8.ngrok.io/SHOP2/index.php?controller=my-account', 'demoshop8.ngrok.io/shop2/en/login?back=my-account', '', '2023-05-15 09:53:49'), +(8, 11, 'https://demoshop8.ngrok.io/SHOP2/index.php?controller=my-account', 'demoshop8.ngrok.io/shop2/en/login?back=my-account', '', '2023-05-15 09:55:48'), +(9, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 09:56:37'), +(10, 11, 'https://www.mollie.com/', 'demoshop8.ngrok.io/shop2/de/module/mollie/return?cart_id=7&utm_nooverride=1&rand=1684137420&key=d3706ec244ca9eab42f1fc44b328f4ae&customerId=3&order_number=mol_76461e5cc3a5e51684137420', '', '2023-05-15 09:57:11'), +(11, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 09:58:00'), +(12, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 09:58:21'), +(13, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 09:58:42'), +(14, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 09:59:07'), +(15, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:00:43'), +(16, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:00:50'), +(17, 11, 'https://www.mollie.com/', 'demoshop8.ngrok.io/shop2/de/module/mollie/return?cart_id=13&utm_nooverride=1&rand=1684137664&key=8900fd298500393a9e33f64884749e5d&customerId=3&order_number=mol_136461e6c020e831684137664', '', '2023-05-15 10:01:13'), +(18, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:02:04'), +(19, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:02:16'), +(20, 11, 'https://demoshop8.ngrok.io/', 'demoshop8.ngrok.io/shop2/de/module/mollie/return?cart_id=15&utm_nooverride=1&rand=1684137749&key=8cb2296283120dba6295254e168228b8&customerId=3&order_number=mol_156461e71509c031684137749', '', '2023-05-15 10:02:40'), +(21, 11, 'https://demoshop8.ngrok.io/__/', 'demoshop8.ngrok.io/shop2/de/bestellbestatigung?id_cart=15&id_module=68&id_order=9&key=0c46e3398a8f3f024dc6569fc56ed4eb', '', '2023-05-15 10:02:43'), +(22, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:03:08'), +(23, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:03:29'), +(24, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:03:51'), +(25, 11, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:04:13'), +(26, 19, '', 'demoshop8.ngrok.io/shop2/de/warenkorb?action=show', '', '2023-05-15 10:09:16'), +(27, 19, '', 'demoshop8.ngrok.io/shop2/de/warenkorb?action=show', '', '2023-05-15 10:09:23'), +(28, 19, '', 'demoshop8.ngrok.io/shop2/de/warenkorb?action=show', '', '2023-05-15 10:09:27'), +(29, 19, '', 'demoshop8.ngrok.io/shop2/de/warenkorb?action=show', '', '2023-05-15 10:09:33'), +(30, 19, '', 'demoshop8.ngrok.io/shop2/de/warenkorb?action=show', '', '2023-05-15 10:09:34'), +(31, 19, '', 'demoshop8.ngrok.io/shop2/de/', '', '2023-05-15 10:10:26'), +(32, 19, 'https://www.mollie.com/', 'demoshop8.ngrok.io/shop2/de/module/mollie/return?cart_id=20&utm_nooverride=1&rand=1684138327&key=2e74e2ae079c17082613558eb9b9c2db&customerId=3&order_number=mol_206461e95746ba71684138327', '', '2023-05-15 10:12:18'), +(33, 20, '', 'demoshop8.ngrok.io/robots.txt', '', '2023-05-15 10:12:52'), +(34, 21, '', 'demoshop8.ngrok.io/en/', '', '2023-05-15 10:12:52'), +(35, 22, 'https://demoshop8.ngrok.io/SHOP2/index.php?controller=my-account', 'demoshop8.ngrok.io/shop2/en/login?back=my-account', '', '2023-05-15 10:22:02'), +(36, 27, 'https://demoshop8.ngrok.io/SHOP2/index.php?controller=my-account', 'demoshop8.ngrok.io/shop2/en/login?back=my-account', '', '2023-05-15 10:23:45'), +(37, 27, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:25:02'), +(38, 27, 'https://demoshop8.ngrok.io/', 'demoshop8.ngrok.io/shop2/de/module/mollie/return?cart_id=21&utm_nooverride=1&rand=1684139123&key=00a8bde746f83e8885f48645578f9544&customerId=3&order_number=mol_216461ec7306c9e1684139123', '', '2023-05-15 10:25:37'), +(39, 27, 'https://demoshop8.ngrok.io/__/', 'demoshop8.ngrok.io/shop2/de/bestellbestatigung?id_cart=21&id_module=68&id_order=11&key=0c46e3398a8f3f024dc6569fc56ed4eb', '', '2023-05-15 10:25:42'), +(40, 27, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:26:08'), +(41, 27, 'https://www.mollie.com/', 'demoshop8.ngrok.io/shop2/de/module/mollie/return?cart_id=22&utm_nooverride=1&rand=1684139182&key=239f329ef0c0962a66f3f6b57761a643&customerId=3&order_number=mol_226461ecae77ce11684139182', '', '2023-05-15 10:26:34'), +(42, 27, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:26:56'), +(43, 27, 'https://www.mollie.com/', 'demoshop8.ngrok.io/shop2/de/module/mollie/return?cart_id=23&utm_nooverride=1&rand=1684139231&key=1dbd385fe7198fdfad40185f704d510a&customerId=3&order_number=mol_236461ecdf1959f1684139231', '', '2023-05-15 10:27:19'), +(44, 27, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:27:42'), +(45, 27, 'https://www.mollie.com/', 'demoshop8.ngrok.io/shop2/de/module/mollie/return?cart_id=24&utm_nooverride=1&rand=1684139277&key=47e45fd72178d52d813c84d73e229dbd&customerId=3&order_number=mol_246461ed0d1102a1684139277', '', '2023-05-15 10:28:09'), +(46, 27, 'https://demoshop8.ngrok.io/SHOP2/en/index.php?controller=history', 'demoshop8.ngrok.io/shop2/en/order-history', '', '2023-05-15 10:28:46'), +(47, 27, 'https://www.mollie.com/', 'demoshop8.ngrok.io/shop2/en/module/mollie/return?cart_id=25&utm_nooverride=1&rand=1684139342&key=46c2c075c7e4377e2013d07caf01445d&customerId=3&order_number=mol_256461ed4eb56401684139342', '', '2023-05-15 10:29:16'), +(48, 27, 'https://demoshop8.ngrok.io/SHOP2/en/index.php?controller=history', 'demoshop8.ngrok.io/shop2/en/order-history', '', '2023-05-15 10:29:20'), +(49, 27, 'https://demoshop8.ngrok.io/SHOP2/de/index.php?controller=history', 'demoshop8.ngrok.io/shop2/de/bestellungsverlauf', '', '2023-05-15 10:30:10'), +(50, 44, '', 'demoshop8.ngrok.io/shop2/en/', '', '2023-05-15 10:31:31'); DROP TABLE IF EXISTS `ps_contact`; CREATE TABLE `ps_contact` ( @@ -13415,55 +13415,55 @@ CREATE TABLE `ps_pagenotfound` ( INSERT INTO `ps_pagenotfound` (`id_pagenotfound`, `id_shop`, `id_shop_group`, `request_uri`, `http_referer`, `date_add`) VALUES (1, 1, 1, '/robots.txt', '', '2023-05-08 14:44:32'), (2, 1, 1, '/robots.txt', '', '2023-05-08 14:44:33'), -(3, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/customers/?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:48:20'), -(4, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/modules/manage?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:57:32'), -(5, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/modules/manage?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:58:03'), -(6, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/international/localization/?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:58:18'), -(7, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/international/localization/?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:58:45'), -(8, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/configure/shop/preferences/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:59:01'), -(9, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/configure/shop/preferences/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:59:11'), -(10, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/payment_methods?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:31:52'), -(11, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:31:55'), -(12, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:32:24'), -(13, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/payment_methods?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:33:49'), -(14, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:34:09'), -(15, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:34:17'), -(16, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-09 06:25:39'), -(17, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-09 06:25:44'), -(18, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-09 06:25:53'), -(19, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-09 06:26:04'), -(20, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=FBFec2BM6y2n7FM8SUlUEcj4uuGSbAnZNlluYTShj_E', '2023-05-15 07:54:22'), -(21, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=FBFec2BM6y2n7FM8SUlUEcj4uuGSbAnZNlluYTShj_E', '2023-05-15 07:54:31'), -(22, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/modules/admin-subscription?_token=FBFec2BM6y2n7FM8SUlUEcj4uuGSbAnZNlluYTShj_E', '2023-05-15 07:54:54'), -(23, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/modules/admin-subscription-faq?_token=FBFec2BM6y2n7FM8SUlUEcj4uuGSbAnZNlluYTShj_E', '2023-05-15 07:55:04'), -(24, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/?_token=XNo2X-Z6uF5_Y4eQvBKTTxo6gbJA0PESflgIwMVLiW4', '2023-05-15 08:01:20'), -(25, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/8/view?_token=XNo2X-Z6uF5_Y4eQvBKTTxo6gbJA0PESflgIwMVLiW4', '2023-05-15 08:01:27'), -(26, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/?_token=XNo2X-Z6uF5_Y4eQvBKTTxo6gbJA0PESflgIwMVLiW4', '2023-05-15 08:02:46'), -(27, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/9/view?_token=XNo2X-Z6uF5_Y4eQvBKTTxo6gbJA0PESflgIwMVLiW4', '2023-05-15 08:02:51'), +(3, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/customers/?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:48:20'), +(4, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/modules/manage?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:57:32'), +(5, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/modules/manage?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:58:03'), +(6, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/international/localization/?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:58:18'), +(7, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/international/localization/?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:58:45'), +(8, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/configure/shop/preferences/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:59:01'), +(9, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/configure/shop/preferences/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 14:59:11'), +(10, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/payment_methods?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:31:52'), +(11, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:31:55'), +(12, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:32:24'), +(13, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/payment_methods?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:33:49'), +(14, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:34:09'), +(15, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-08 16:34:17'), +(16, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-09 06:25:39'), +(17, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-09 06:25:44'), +(18, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-09 06:25:53'), +(19, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=8kvKNoRR8zrWFaljFxM8vyqMXp5uLVayut0W-xnrpUE', '2023-05-09 06:26:04'), +(20, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=FBFec2BM6y2n7FM8SUlUEcj4uuGSbAnZNlluYTShj_E', '2023-05-15 07:54:22'), +(21, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=FBFec2BM6y2n7FM8SUlUEcj4uuGSbAnZNlluYTShj_E', '2023-05-15 07:54:31'), +(22, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/modules/admin-subscription?_token=FBFec2BM6y2n7FM8SUlUEcj4uuGSbAnZNlluYTShj_E', '2023-05-15 07:54:54'), +(23, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/modules/admin-subscription-faq?_token=FBFec2BM6y2n7FM8SUlUEcj4uuGSbAnZNlluYTShj_E', '2023-05-15 07:55:04'), +(24, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/?_token=XNo2X-Z6uF5_Y4eQvBKTTxo6gbJA0PESflgIwMVLiW4', '2023-05-15 08:01:20'), +(25, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/8/view?_token=XNo2X-Z6uF5_Y4eQvBKTTxo6gbJA0PESflgIwMVLiW4', '2023-05-15 08:01:27'), +(26, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/?_token=XNo2X-Z6uF5_Y4eQvBKTTxo6gbJA0PESflgIwMVLiW4', '2023-05-15 08:02:46'), +(27, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/9/view?_token=XNo2X-Z6uF5_Y4eQvBKTTxo6gbJA0PESflgIwMVLiW4', '2023-05-15 08:02:51'), (28, 1, 1, '/robots.txt', '', '2023-05-15 08:12:52'), -(29, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/modules/manage?_token=1TeDOpdXf_3KK90TVh8l08EoOZb5eaLtz9669VA5A24', '2023-05-15 08:13:43'), -(30, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/modules/manage?_token=1TeDOpdXf_3KK90TVh8l08EoOZb5eaLtz9669VA5A24', '2023-05-15 08:14:11'), -(31, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/modules/manage?_token=1TeDOpdXf_3KK90TVh8l08EoOZb5eaLtz9669VA5A24', '2023-05-15 08:15:10'), -(32, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=6gHRv85NANOVG2T8NKHZNX01t10aYM7d1pCK_aEI_Hs', '2023-05-15 08:22:38'), -(33, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/payment/preferences?_token=6gHRv85NANOVG2T8NKHZNX01t10aYM7d1pCK_aEI_Hs', '2023-05-15 08:22:47'), -(34, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/modules/admin-subscription?_token=6gHRv85NANOVG2T8NKHZNX01t10aYM7d1pCK_aEI_Hs', '2023-05-15 08:23:12'), -(35, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/modules/admin-subscription-faq?_token=6gHRv85NANOVG2T8NKHZNX01t10aYM7d1pCK_aEI_Hs', '2023-05-15 08:23:21'), -(36, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:25:47'), -(37, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/11/view?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:25:55'), -(38, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:26:41'), -(39, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/12/view?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:26:44'), -(40, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:27:28'), -(41, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/13/view?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:27:28'), -(42, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:28:14'), -(43, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/14/view?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:28:18'), -(44, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:29:55'), -(45, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/sell/orders/15/view?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:29:55'), -(46, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/international/localization/?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:30:46'), -(47, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/international/localization/?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:31:13'), -(48, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/international/languages/?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:31:23'), -(49, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/international/localization/?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:31:27'), -(50, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/modules/manage?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:42:18'), -(51, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.eu.ngrok.io/admin1/index.php/improve/modules/manage?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:42:45'); +(29, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/modules/manage?_token=1TeDOpdXf_3KK90TVh8l08EoOZb5eaLtz9669VA5A24', '2023-05-15 08:13:43'), +(30, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/modules/manage?_token=1TeDOpdXf_3KK90TVh8l08EoOZb5eaLtz9669VA5A24', '2023-05-15 08:14:11'), +(31, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/modules/manage?_token=1TeDOpdXf_3KK90TVh8l08EoOZb5eaLtz9669VA5A24', '2023-05-15 08:15:10'), +(32, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=6gHRv85NANOVG2T8NKHZNX01t10aYM7d1pCK_aEI_Hs', '2023-05-15 08:22:38'), +(33, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/payment/preferences?_token=6gHRv85NANOVG2T8NKHZNX01t10aYM7d1pCK_aEI_Hs', '2023-05-15 08:22:47'), +(34, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/modules/admin-subscription?_token=6gHRv85NANOVG2T8NKHZNX01t10aYM7d1pCK_aEI_Hs', '2023-05-15 08:23:12'), +(35, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/modules/admin-subscription-faq?_token=6gHRv85NANOVG2T8NKHZNX01t10aYM7d1pCK_aEI_Hs', '2023-05-15 08:23:21'), +(36, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:25:47'), +(37, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/11/view?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:25:55'), +(38, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:26:41'), +(39, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/12/view?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:26:44'), +(40, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:27:28'), +(41, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/13/view?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:27:28'), +(42, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:28:14'), +(43, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/14/view?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:28:18'), +(44, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:29:55'), +(45, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/sell/orders/15/view?_token=-4T8sUy-G4i3wSUcSK7doHUndY8Ge_0CvF5pzd8dNB8', '2023-05-15 08:29:55'), +(46, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/international/localization/?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:30:46'), +(47, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/international/localization/?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:31:13'), +(48, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/international/languages/?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:31:23'), +(49, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/international/localization/?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:31:27'), +(50, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/modules/manage?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:42:18'), +(51, 1, 1, '/admin1/themes/new-theme/public/index.php?controller=AdminDashboard&token=c7e722677d24cced4f4c4dcc1d2ae476', 'https://demoshop8.ngrok.io/admin1/index.php/improve/modules/manage?_token=nTu0Lk4gwombN6hbt35X3HfjP7LW5F5xTqrGD7bnChk', '2023-05-15 08:42:45'); DROP TABLE IF EXISTS `ps_page_type`; CREATE TABLE `ps_page_type` ( @@ -17470,8 +17470,8 @@ CREATE TABLE `ps_shop_url` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `ps_shop_url` (`id_shop_url`, `id_shop`, `domain`, `domain_ssl`, `physical_uri`, `virtual_uri`, `main`, `active`) VALUES -(1, 1, 'demoshop8.eu.ngrok.io', 'demoshop8.eu.ngrok.io', '/', '', 1, 1), -(2, 2, 'demoshop8.eu.ngrok.io', 'demoshop8.eu.ngrok.io', '/', 'shop2/', 1, 1); +(1, 1, 'demoshop8.ngrok.io', 'demoshop8.ngrok.io', '/', '', 1, 1), +(2, 2, 'demoshop8.ngrok.io', 'demoshop8.ngrok.io', '/', 'shop2/', 1, 1); DROP TABLE IF EXISTS `ps_smarty_cache`; CREATE TABLE `ps_smarty_cache` ( diff --git a/upgrade/Upgrade-6.0.2.php b/upgrade/Upgrade-6.0.2.php new file mode 100644 index 000000000..0aa070247 --- /dev/null +++ b/upgrade/Upgrade-6.0.2.php @@ -0,0 +1,31 @@ + + * @copyright Mollie B.V. + * @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md + * + * @see https://github.com/mollie/PrestaShop + */ + +use Mollie\Adapter\ConfigurationAdapter; +use Mollie\Config\Config; + +if (!defined('_PS_VERSION_')) { + exit; +} + +function upgrade_module_6_0_2(Mollie $module): bool +{ + /** @var ConfigurationAdapter $configuration */ + $configuration = $module->getService(ConfigurationAdapter::class); + + $configuration->updateValue(Config::MOLLIE_APPLE_PAY_DIRECT_PRODUCT, (int) $configuration->get('MOLLIE_APPLE_PAY_DIRECT')); + $configuration->updateValue(Config::MOLLIE_APPLE_PAY_DIRECT_CART, (int) $configuration->get('MOLLIE_APPLE_PAY_DIRECT')); + + $configuration->delete('MOLLIE_APPLE_PAY_DIRECT'); + + return true; +} diff --git a/views/js/admin/settings.js b/views/js/admin/settings.js index 90c72a789..0bec51d69 100644 --- a/views/js/admin/settings.js +++ b/views/js/admin/settings.js @@ -76,13 +76,19 @@ $(document).ready(function () { function handleApplePayButtonStylesToggle() { - var $applePayButtonStyles = $('#js-mollie-applepay-button-styles'); - var $applePayDirectEnableSelector = $('select[name^="MOLLIE_APPLE_PAY_DIRECT_ENABLED"]'); + let $applePayButtonStyles = $('#js-mollie-applepay-button-styles'); + let $applePayDirectProductEnableSelector = $('select[name^="MOLLIE_APPLE_PAY_DIRECT_PRODUCT_ENABLED"]'); + let $applePayDirectCartEnableSelector = $('select[name^="MOLLIE_APPLE_PAY_DIRECT_CART_ENABLED"]'); - toggleElement($applePayButtonStyles, $applePayDirectEnableSelector.val() === '1') - $($applePayDirectEnableSelector).on('change', function () { - var isEnabled = $(this).val() === '1'; - toggleElement($applePayButtonStyles, isEnabled) + toggleElement( + $applePayButtonStyles, + $applePayDirectProductEnableSelector.val() === '1' || $applePayDirectCartEnableSelector.val() === '1' + ) + + $applePayDirectProductEnableSelector.add($applePayDirectCartEnableSelector).on('change', function() { + let isEnabled = $applePayDirectProductEnableSelector.val() === '1' || $applePayDirectCartEnableSelector.val() === '1'; + + toggleElement($applePayButtonStyles, isEnabled) }) } diff --git a/views/templates/admin/_configure/helpers/form/form.tpl b/views/templates/admin/_configure/helpers/form/form.tpl index b0e310d16..bb74c2d85 100644 --- a/views/templates/admin/_configure/helpers/form/form.tpl +++ b/views/templates/admin/_configure/helpers/form/form.tpl @@ -106,12 +106,23 @@ {if $paymentMethod.id === 'applepay'}
- + + + +
+
+
+ +
+
@@ -126,7 +137,7 @@ style="width: 100%;" alt="Black">
@@ -134,7 +145,7 @@ style="width: 100%;" alt="White with Outline">
@@ -142,7 +153,7 @@ style="width: 100%;" alt="White">
diff --git a/views/templates/front/subscription/customerSubscriptionsData.tpl b/views/templates/front/subscription/customerSubscriptionsData.tpl index 7025f70ad..661785dc9 100644 --- a/views/templates/front/subscription/customerSubscriptionsData.tpl +++ b/views/templates/front/subscription/customerSubscriptionsData.tpl @@ -45,7 +45,7 @@ {$recurringOrder.recurring_order->id} {$recurringOrder.recurring_order->status} {$recurringOrder.recurring_order->payment_method} - {$recurringOrder.product->name} + {$recurringOrder.product_name} {$recurringOrder.total_price} {$recurringOrder.recurring_order->date_add}