Skip to content

Commit

Permalink
MOL-245: PPE (#705)
Browse files Browse the repository at this point in the history
* MOL-245: Add PayPal Express

* NTR: Squashed commit of the following:

commit 95aa056
Author: Vitalij Mik <[email protected]>
Date:   Wed Jan 24 10:02:14 2024 +0100

    NTR: test newer shopware version (#696)

    Co-authored-by: Vitalij Mik <[email protected]>

commit aab2afc
Author: Vitalij Mik <[email protected]>
Date:   Wed Jan 24 10:01:22 2024 +0100

    NTR: change sw version release (#697)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 2cee88b
Author: Vitalij Mik <[email protected]>
Date:   Fri Jan 19 13:15:08 2024 +0100

    NTR: prepare hotfix 4.4.1 (#694)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 549addb
Author: Vitalij Mik <[email protected]>
Date:   Thu Jan 18 13:47:44 2024 +0100

    NTR: change min sw release version (#693)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 01f09cf
Author: Vitalij Mik <[email protected]>
Date:   Thu Jan 18 13:37:00 2024 +0100

    NTR: Fix release version for production composer.json (#692)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 4c75daf
Author: Vitalij Mik <[email protected]>
Date:   Thu Jan 18 12:40:44 2024 +0100

    NTR: new plugin version (#691)

    * NTR: new plugin version

    * NTR: Composer update

    * NTR: update composer

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit 08f42c5
Author: Vitalij Mik <[email protected]>
Date:   Thu Jan 18 10:46:31 2024 +0100

    NTR: revert shopware version (#690)

    Co-authored-by: Vitalij Mik <[email protected]>

commit a341cf1
Author: Vitalij Mik <[email protected]>
Date:   Thu Jan 18 09:12:28 2024 +0100

    NTR: update shopware version (#689)

    Co-authored-by: Vitalij Mik <[email protected]>

commit fd8746e
Author: Vitalij Mik <[email protected]>
Date:   Wed Jan 17 16:13:37 2024 +0100

    NTR: Fix saved credit card payment (#688)

    Co-authored-by: Vitalij Mik <[email protected]>

commit de772ee
Author: Vitalij Mik <[email protected]>
Date:   Wed Jan 17 08:52:26 2024 +0100

    NTR: Update shopware version to 6.5.7.4 (#687)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 5d763dd
Author: Vitalij Mik <[email protected]>
Date:   Tue Jan 16 15:24:22 2024 +0100

    MOL-1196: add shipping method for tracking url (#686)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 1900474
Author: Vitalij Mik <[email protected]>
Date:   Tue Jan 16 11:21:25 2024 +0100

    MOL-1196: fix automatic shipping and add error logs (#685)

    * MOL-1196: fix automatic shipping and add error logs

    * MOL-1196: remove comment

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit 32b0be3
Author: Vitalij Mik <[email protected]>
Date:   Mon Jan 15 13:46:33 2024 +0100

    MOL-1280: Fix retry route and add cypress tests (#683)

    * MOL-1280: Fix retry route and add cypress tests

    * MOL-1280: Update cypress ID

    * MOL-1280: cleanup cypress test

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit 9de44f9
Author: Vitalij Mik <[email protected]>
Date:   Mon Jan 15 08:59:14 2024 +0100

    NTR: PISHPS-204: store bank data in order custom fields (#664)

    Co-authored-by: Vitalij Mik <[email protected]>

commit cbcc33c
Author: Vitalij Mik <[email protected]>
Date:   Fri Jan 12 13:54:42 2024 +0100

    MOL-1280: Fix subscription metadata after retry (#682)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 48281db
Author: Vitalij Mik <[email protected]>
Date:   Thu Jan 11 15:21:13 2024 +0100

    MOL-1255: Fix cypress tests (#681)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 04c71da
Author: Vitalij Mik <[email protected]>
Date:   Thu Jan 11 09:50:58 2024 +0100

    MOL-1287: Fix custom fields for payment methods (#680)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 1491af3
Author: Vitalij Mik <[email protected]>
Date:   Wed Jan 10 10:35:50 2024 +0100

    MOL-1287: do not overwrite exisisting technical name (#678)

    * MOL-1287: do not overwrite exisisting technical name

    * MOL-1287: technical name in 6.5.7

    * MOL-1287: cs and stan fix

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit 37d176b
Author: Vitalij Mik <[email protected]>
Date:   Tue Jan 9 11:49:11 2024 +0100

    MOL-1294: force label to be empty string on null (#677)

    * MOL-1294: force label to be empty string on null

    * MOL-1294: update test

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit f411812
Author: Christian <[email protected]>
Date:   Fri Jan 5 10:13:43 2024 +0100

    MOL-1287: add technical name to payment methods (#675)

commit 250a3d3
Author: Christian <[email protected]>
Date:   Fri Dec 22 12:34:53 2023 +0100

    MOL-1206: create plugin config for log file retention days (#674)

commit 5511d15
Author: Christian <[email protected]>
Date:   Thu Dec 21 17:46:06 2023 +0100

    MOL-1225: add batch shipments to administration (#665)

commit 2bc7a18
Author: Vitalij Mik <[email protected]>
Date:   Wed Dec 20 12:13:35 2023 +0100

    MOL-1285: use stock manager config (#669)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 8b464a8
Author: Christian <[email protected]>
Date:   Wed Dec 20 11:34:20 2023 +0100

    NTR: add one click payments to headless config (#672)

commit c7622fa
Author: Christian <[email protected]>
Date:   Wed Dec 20 11:30:08 2023 +0100

    NTR: add missing oneClick payments to swagger docs (#671)

commit bb26750
Author: Christian Dangl <[email protected]>
Date:   Thu Dec 14 17:17:15 2023 +0100

    NTR: allow shopware-cli downgrades

commit 0a614b2
Author: Christian Dangl <[email protected]>
Date:   Thu Dec 14 17:08:20 2023 +0100

    NTR: fix problem in automated shopware-cli installer

commit 3906e26
Author: Vitalij Mik <[email protected]>
Date:   Thu Dec 14 16:35:44 2023 +0100

    NTR: Set fixed version of shopware cli (#668)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 22a6e8a
Author: Vitalij Mik <[email protected]>
Date:   Thu Dec 14 09:35:57 2023 +0100

    NTR: Fix make run (#666)

    * NTR: Fix make run

    * NTR: Fix build

    * NTR: update

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit ab42644
Author: Christian <[email protected]>
Date:   Mon Dec 4 15:48:29 2023 +0100

    MOL-1260: use technical state machine name for log entry on reopen (#663)

commit f52ae30
Author: Vitalij Mik <[email protected]>
Date:   Mon Dec 4 15:48:06 2023 +0100

    MOL-1196: Tracking (#607)

    * MOL-1196: Tracking

    * MOL-1196: fix pipeline

    * MOL-1196: extract to factory

    * MOL-1196: check tracking code lenght

    * MOL-1196: update comment

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit c08c340
Author: Christian Dangl <[email protected]>
Date:   Fri Dec 1 10:50:31 2023 +0100

    NTR: fix typo in plugin config

commit cc97b68
Author: Christian Dangl <[email protected]>
Date:   Fri Dec 1 09:45:49 2023 +0100

    NTR: add Shopware 6.5.7.3 to pipeline

commit 54836bb
Author: Christian <[email protected]>
Date:   Wed Nov 29 09:38:20 2023 +0100

    MOL-1276: add store api config route for frontend components (#660)

commit faa72b6
Author: Christian <[email protected]>
Date:   Wed Nov 29 09:38:00 2023 +0100

    MOL-1277: fix wrong syntax in OrderLifeTimeLimitDetectorService.js (#661)

commit a420fa7
Author: Christian <[email protected]>
Date:   Wed Nov 29 09:37:47 2023 +0100

    MOL-1278: fix ideal issuer reset leads to wrong url (#662)

* MOL-245: refactor code

* MOL-245: reuse addresses

* MOL-245: refactor buttons

* MOL-245: PPE

* MOL-245: refactor custom fields keys

* MOL-245: refactor custom fields

* MOL-245: refactor

* MOL-245: use quantity + fix 2nd attempt payment

* MOL-245: fix csrf

* MOL-245: fix customfields for first customer

* MOL-245: fix config

* MOL-245: add cypress ui tests

* MOL-245: setup a timer

* MOL-245: added release tag

* NTR: Squashed commit of the following:

commit 4b0471e
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 23 13:36:38 2024 +0200

    NTR: fix tests

commit 23341f7
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 23 11:49:29 2024 +0200

    NTR: drop shopware 6.4.0.0

commit 05d4ce6
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 23 09:18:33 2024 +0200

    NTR: fix exception

commit a8427fe
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 23 09:04:14 2024 +0200

    NTR: update waiting timer

commit 1c32404
Author: Vitalij Mik <[email protected]>
Date:   Mon Apr 22 15:28:39 2024 +0200

    NTR: fix #733

commit e4c8022
Author: Vitalij Mik <[email protected]>
Date:   Mon Apr 22 15:12:33 2024 +0200

    NTR: fix subscription symbol

commit 24dda2b
Author: Vitalij Mik <[email protected]>
Date:   Mon Apr 22 14:44:30 2024 +0200

    NTR: fix shipment cypress

commit 4295f71
Author: Vitalij Mik <[email protected]>
Date:   Mon Apr 22 14:25:40 2024 +0200

    NTR: fix shipment in 6.4

commit 24c33d0
Author: Vitalij Mik <[email protected]>
Date:   Mon Apr 22 14:10:11 2024 +0200

    NTR: fix stan

commit e1359f6
Author: Vitalij Mik <[email protected]>
Date:   Mon Apr 22 13:54:29 2024 +0200

    NTR: fix checkout for 6.4

commit e0d6e80
Author: Vitalij Mik <[email protected]>
Date:   Mon Apr 22 11:37:18 2024 +0200

    NTR: fix refund cypress tests

commit a641bdd
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 16 16:06:27 2024 +0200

    NTR: revert dependencies

commit c891cd9
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 16 15:34:59 2024 +0200

    NTR: change dependencies

commit 23c3cb8
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 16 14:50:43 2024 +0200

    NTR: update composer depdencies

commit 675d137
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 16 13:54:15 2024 +0200

    NTR: updates for 6.6 (#721)

    * NTR: set routing to xml

    * NTR: update routes

    * NTR: delete 6.5 specific controller

    * NTR: cleanup

    * NTR: fallback einbauen

    * NTR: fix routing for 6.5

    * NTR: revert fixtures

    * NTR: fix routes scopes

    * NTR: fix routescope

    * NTR: phpstan fix

    * NTR: fix some tests for 6.6

    * NTR: fix twig and exceptions

    * NTR: fix stan

    * NTR: fix smart contact form

    * NTR: fix phpstan errors

    * NTR: fix smart contact form

    * NTR: revert cart service

    * NTR: Csfix

    * NTR: add 6.6 to pipline

    * NTR: fix cart service

    * NTR: csfixer

    * NTR: fix add product

    * NTR: fix controller

    * NTR: admin updates

    * NTR: Update linter

    * NTR: fix refund manager

    * NTR: delete route annotations

    * NTR: add 6.6 to pipeline

    * NTR: fix subscription

    * NTR: csfix

    * NTR: fix mgration for sw 6.4

    * NTR: update new sw version in pipeline checks

    * NTR: test apple pay buttons

    * NTR: bumb sw version

    * NTR: update php version

    * NTR: fix preview

    * NTR: eslint fix

    * NTR: eslint

    * NTR: eslint

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit 4b1986b
Author: Thilo <[email protected]>
Date:   Tue Apr 16 13:02:41 2024 +0200

    Mol 1299/refund tax at net orders (#734)

    * MOL-1299: Refund Tax at Net Orders

    * MOL-1299: Correct VAT Promotion Calculation

    ---------

    Co-authored-by: Thilo Lindner <[email protected]>

commit c29bf21
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 16 10:14:32 2024 +0200

    NTR: revert

commit 2e8c35a
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 16 10:06:53 2024 +0200

    NTR: update php version

commit 8fc3a2b
Author: Vitalij Mik <[email protected]>
Date:   Tue Apr 16 08:58:55 2024 +0200

    NTR: test new sw version

commit ff38ec9
Author: Vitalij Mik <[email protected]>
Date:   Tue Mar 26 09:22:27 2024 +0100

    NTR: set shopware version constraint

commit 5966422
Author: Vitalij Mik <[email protected]>
Date:   Mon Mar 25 16:08:44 2024 +0100

    NTR: Revert storeapi key

commit 10d2ded
Author: Vitalij Mik <[email protected]>
Date:   Mon Mar 25 11:34:27 2024 +0100

    NTR: prepare 4..6.0 release (#732)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 584f234
Author: Vitalij Mik <[email protected]>
Date:   Fri Mar 22 13:56:28 2024 +0100

    PISHPS-243: create guest account over route (#730)

    * NTR: PISHPS-243: create guest account over route

    * NTR: CSfixer

    * NTR: fix 6.4.20.2

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit c2fdc22
Author: Vitalij Mik <[email protected]>
Date:   Fri Mar 22 09:05:19 2024 +0100

    PISHPS-263: allow set apple pay as default payment method (#728)

    * NTR: PISHPS-263: allow set apple pay as default payment method

    * NTR: delete cypress tests for account

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit edbe0dd
Author: Vitalij Mik <[email protected]>
Date:   Thu Mar 21 13:17:48 2024 +0100

    NTR: PISHPS-264: use SW logic for shipping methods in Apple Pay (#731)

    Co-authored-by: Vitalij Mik <[email protected]>

commit c13df34
Author: Vitalij Mik <[email protected]>
Date:   Thu Mar 21 13:17:13 2024 +0100

    NTR: PISHPS-247: Klarna One payment (#727)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 1734730
Author: Vitalij Mik <[email protected]>
Date:   Wed Mar 20 08:24:42 2024 +0100

    NTR: fix payment in order edit (#729)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 1903129
Author: Vitalij Mik <[email protected]>
Date:   Tue Mar 19 08:33:14 2024 +0100

    NTR: add the default system language (#726)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 77be51e
Author: Vitalij Mik <[email protected]>
Date:   Tue Mar 19 08:32:52 2024 +0100

    NTR: PISHPS-256: rebranding ideal (#725)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 70fe37e
Author: Vitalij Mik <[email protected]>
Date:   Mon Mar 18 15:17:08 2024 +0100

    NTR: update mollie lbirary (#723)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 7a18c81
Author: Vitalij Mik <[email protected]>
Date:   Thu Mar 7 15:25:11 2024 +0100

    NTR: test SW 6.5.8.7 (#720)

    Co-authored-by: Vitalij Mik <[email protected]>

commit cfb4830
Author: Vitalij Mik <[email protected]>
Date:   Thu Feb 29 14:44:18 2024 +0100

    NTR: Fix #704 (#718)

    * NTR: Fix #704

    * NTR: check subscription with custom routes

    * NTR: fix translation problem

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit 89dd84e
Author: Aleksej Wert <[email protected]>
Date:   Thu Feb 29 14:32:17 2024 +0100

    NTR: show mollie payment js if needed (#712)

    * NTR: show mollie payment js if needed

    * NTR: added comments

    * NTR: Fixes

commit b2eff45
Author: Vitalij Mik <[email protected]>
Date:   Wed Feb 28 07:59:35 2024 +0100

    NTR: search for active payment methods only (#717)

    Co-authored-by: Vitalij Mik <[email protected]>

commit a13da65
Author: Florian Bender <[email protected]>
Date:   Tue Feb 27 13:43:33 2024 +0100

    NTR: Check for `OrderAware` interface (#716)

commit f06f96d
Author: Vitalij Mik <[email protected]>
Date:   Wed Feb 21 11:04:21 2024 +0100

    NTR: new sw version (#713)

    Co-authored-by: Vitalij Mik <[email protected]>

commit e584842
Author: Vitalij Mik <[email protected]>
Date:   Mon Feb 19 10:56:56 2024 +0100

    NTR: new release 4.5.0 (#710)

    Co-authored-by: Vitalij Mik <[email protected]>

commit bf0055d
Author: Vitalij Mik <[email protected]>
Date:   Fri Feb 16 13:39:31 2024 +0100

    NTR: add testreail id to blik (#709)

    Co-authored-by: Vitalij Mik <[email protected]>

commit 20538c4
Author: Vitalij Mik <[email protected]>
Date:   Fri Feb 16 12:34:41 2024 +0100

    MOL-1297: Fix payment method cache in production (#706)

    * MOL-1297: Fix payment method cache in production

    * MOL-1297: refactor

    * MOL-1297: codestyle fix

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit 4ecd79d
Author: Vitalij Mik <[email protected]>
Date:   Fri Feb 16 12:34:28 2024 +0100

    NTR: PISHPS-242: do not call save twice (#708)

    * NTR: PISHPS-242: do not call save twice

    * NTR: PISHPS-242: fix refund manager in 6.5

    ---------

    Co-authored-by: Vitalij Mik <[email protected]>

commit 6189790
Author: Uwe Thiess <[email protected]>
Date:   Fri Feb 16 11:28:55 2024 +0100

    Update register.html.twig (#700)

    Insert hidden field to let shopware know we want to create an account.

commit 1c582fa
Author: Vitalij Mik <[email protected]>
Date:   Thu Feb 15 13:13:50 2024 +0100

    NTR: test new shopware version (#707)

    Co-authored-by: Vitalij Mik <[email protected]>

* NTR: update PPE

* NTR: fix guest account

* NTR: update composer

* NTR: fix ppe tests

* NTR: update

* NTR: Merge master into PPE

* NTR: Cs fix

* NTR: fix subscriber

* NTR: do not check paypal redirect, api key is not set in pipeline

* NTR: fixed config

* NTR: update mollie api to 2.73

* NTR: CS Fix

* NTR: Fix cypress

* NTR: switch to method Details

* NTR: add onfig over env

* NTR: fix tests

* NTR: fix tests

* NTR: added more logs in PPE

* NTR: fix settings

* NTR: use express buttons as class selector

* NTR: remove old klarna from tests

* NTR: Cs fix

* NTR: display privacy note checkbox

* NTR: refactored JS

* NTR: accepted data protection serverside check

* NTR: update backup cart

* NTR: Fix ppe cypress tests

* NTR: refactor apple pay

---------

Co-authored-by: Christian Dangl <[email protected]>
Co-authored-by: Vitalij Mik <[email protected]>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent 5394993 commit 616c80a
Show file tree
Hide file tree
Showing 132 changed files with 3,718 additions and 737 deletions.
1 change: 1 addition & 0 deletions .github/actions/run-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ runs:
docker exec shop bash -c 'sed -i "s/APP_ENV=dev/APP_ENV=prod/g" /var/www/html/.env' || true;
# we have to enable cypress mode in our shop, this helps us to create subscriptions without webhooks
docker exec shop bash -c "echo "MOLLIE_CYPRESS_MODE=1" >> /var/www/html/.env" || true;
docker exec shop bash -c "echo "MOLLIE_PAYPAL_EXPRESS_BETA=1" >> /var/www/html/.env" || true;
# --------------------------------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_pipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ jobs:
MOLLIE_APIKEY_TEST: ${{ secrets.MOLLIE_APIKEY_TEST }}
# -------------------------------------------
RUN_CYPRESS: true
TESTRAIL: true
TESTRAIL: false
TESTRAIL_DOMAIN: ${{ secrets.TESTRAIL_DOMAIN }}
TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
2 changes: 1 addition & 1 deletion .github/workflows/nightly_pipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ jobs:
MOLLIE_APIKEY_TEST: ${{ secrets.MOLLIE_APIKEY_TEST }}
# -------------------------------------------
RUN_CYPRESS: true
TESTRAIL: true
TESTRAIL: false
TESTRAIL_DOMAIN: ${{ secrets.TESTRAIL_DOMAIN }}
TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
TESTRAIL_PASSWORD: ${{ secrets.TESTRAIL_PASSWORD }}
71 changes: 44 additions & 27 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ NODE_VERSION:=$(shell node -v)


help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@printf "\033[33mInstallation:%-30s\033[0m %s\n"
@grep -E '^[a-zA-Z_-]+:.*?##1 .*$$' $(firstword $(MAKEFILE_LIST)) | awk 'BEGIN {FS = ":.*?##1 "}; {printf "\033[33m - %-30s\033[0m %s\n", $$1, $$2}'
@echo "---------------------------------------------------------------------------------------------------------"
@printf "\033[36mDevelopment:%-30s\033[0m %s\n"
@grep -E '^[a-zA-Z_-]+:.*?##2 .*$$' $(firstword $(MAKEFILE_LIST)) | awk 'BEGIN {FS = ":.*?##2 "}; {printf "\033[36m - %-30s\033[0m %s\n", $$1, $$2}'
@echo "---------------------------------------------------------------------------------------------------------"
@printf "\033[35mDevOps:%-30s\033[0m %s\n"
@grep -E '^[a-zA-Z_-]+:.*?##3 .*$$' $(firstword $(MAKEFILE_LIST)) | awk 'BEGIN {FS = ":.*?##3 "}; {printf "\033[35m - %-30s\033[0m %s\n", $$1, $$2}'

# ------------------------------------------------------------------------------------------------------------

prod: ## Installs all production dependencies
prod: ##1 Installs all production dependencies
# do not switch to production composer PROD, otherwise it would
# also install shopware in here -> we just need it for the release composer.json file
# so just switch to our dev dependency variant
Expand All @@ -27,7 +34,7 @@ prod: ## Installs all production dependencies
cd src/Resources/app/administration && npm install --omit=dev
cd src/Resources/app/storefront && npm install --omit=dev

dev: ## Installs all dev dependencies
dev: ##1 Installs all dev dependencies
php switch-composer.php dev
@composer validate
# we have to run update in dev mode, because dev dependencies are not compatible with newer php version. should be updated when support for 6.4 is dropped
Expand All @@ -36,10 +43,10 @@ dev: ## Installs all dev dependencies
cd src/Resources/app/storefront && npm install
curl -1sLf 'https://dl.cloudsmith.io/public/friendsofshopware/stable/setup.deb.sh' | sudo -E bash && sudo apt install -y --allow-downgrades shopware-cli=0.3.18

install: ## [deprecated] Installs all production dependencies. Please use "make prod" now.
install: ##1 [deprecated] Installs all production dependencies. Please use "make prod" now.
@make prod -B

clean: ## Cleans all dependencies and files
clean: ##1 Cleans all dependencies and files
rm -rf vendor/*
# ------------------------------------------------------
rm -rf .reports | true
Expand All @@ -52,7 +59,7 @@ clean: ## Cleans all dependencies and files
rm -rf ./src/Resources/public/administration
rm -rf ./src/Resources/public/mollie-payments.js

build: ## Installs the plugin, and builds the artifacts using the Shopware build commands.
build: ##3 Installs the plugin, and builds the artifacts using the Shopware build commands.
# -----------------------------------------------------
# CUSTOM WEBPACK
php switch-composer.php dev
Expand All @@ -68,83 +75,93 @@ build: ## Installs the plugin, and builds the artifacts using the Shopware build
cd ../../.. && php bin/console --no-debug assets:install
cd ../../.. && php bin/console --no-debug cache:clear

fixtures: ## Installs all available testing fixtures of the Mollie plugin
fixtures: ##3 Installs all available testing fixtures of the Mollie plugin
cd ../../.. && php bin/console --no-debug cache:clear
cd ../../.. && php bin/console --no-debug fixture:load:group mollie

# ------------------------------------------------------------------------------------------------------------

phpcheck: ## Starts the PHP syntax checks
phpcheck: ##2 Starts the PHP syntax checks
@find . -name '*.php' -not -path "./vendor/*" -not -path "./tests/*" | xargs -n 1 -P4 php -l

phpmin: ## Starts the PHP compatibility checks
phpmin: ##2 Starts the PHP compatibility checks
@php vendor/bin/phpcs -p --standard=PHPCompatibility --extensions=php --runtime-set testVersion 7.4 ./src

csfix: ## Starts the PHP CS Fixer
csfix: ##2 Starts the PHP CS Fixer
@PHP_CS_FIXER_IGNORE_ENV=1 php vendor/bin/php-cs-fixer fix --config=./.php_cs.php --dry-run

stan: ## Starts the PHPStan Analyser
stan: ##2 Starts the PHPStan Analyser
@php vendor/bin/phpstan analyse -c ./.phpstan.neon

phpunit: ## Starts all PHPUnit Tests
phpunit: ##2 Starts all PHPUnit Tests
@XDEBUG_MODE=coverage php vendor/bin/phpunit --configuration=phpunit.xml --coverage-html ./.reports/phpunit/coverage

infection: ## Starts all Infection/Mutation tests
infection: ##2 Starts all Infection/Mutation tests
@XDEBUG_MODE=coverage php vendor/bin/infection --configuration=./.infection.json --log-verbosity=all --debug

insights: ## Starts the PHPInsights Analyser
insights: ##2 Starts the PHPInsights Analyser
@php vendor/bin/phpinsights analyse --no-interaction

jest: ## Starts all Jest tests
jest: ##2 Starts all Jest tests
cd ./src/Resources/app/administration && ./node_modules/.bin/jest --config=.jest.config.js --coverage
cd ./src/Resources/app/storefront && ./node_modules/.bin/jest --config=.jest.config.js --coverage

stryker: ## Starts the Stryker Jest Mutation Tests
stryker: ##2 Starts the Stryker Jest Mutation Tests
cd ./src/Resources/app/administration && ./node_modules/.bin/stryker run .stryker.conf.json
@# Storefront has no tests at the moment
@# cd ./src/Resources/app/storefront && ./node_modules/.bin/stryker run .stryker.conf.json

eslint: ## Starts the ESLinter
eslint: ##2 Starts the ESLinter
ifndef mode
cd ./src/Resources/app/administration && ./node_modules/.bin/eslint --config ./.eslintrc.json ./src
cd ./src/Resources/app/storefront && ./node_modules/.bin/eslint --config ./.eslintrc.json ./src
endif
ifeq ($(mode), no-dry-run)
cd ./src/Resources/app/administration && ./node_modules/.bin/eslint --config ./.eslintrc.json ./src --fix
cd ./src/Resources/app/storefront && ./node_modules/.bin/eslint --config ./.eslintrc.json ./src --fix
endif




stylelint: ## Starts the Stylelinter

stylelint: ##2 Starts the Stylelinter
cd ./src/Resources/app/administration && ./node_modules/.bin/stylelint --allow-empty-input ./src/**/*.scss
cd ./src/Resources/app/storefront && ./node_modules/.bin/stylelint --allow-empty-input ./src/**/*.scss

configcheck: ## Tests and verifies the plugin configuration file
configcheck: ##2 Tests and verifies the plugin configuration file
cd ./tests/Custom && php verify-plugin-config.php

# ------------------------------------------------------------------------------------------------------------

snippetcheck: ## Tests and verifies all plugin snippets
snippetcheck: ##2 Tests and verifies all plugin snippets
php vendor/bin/phpunuhi validate --configuration=./.phpunuhi.xml --report-format=junit --report-output=./.phpunuhi/junit.xml

snippetexport: ## Exports all snippets
snippetexport: ##2 Exports all snippets
php vendor/bin/phpunuhi export --configuration=./.phpunuhi.xml --dir=./.phpunuhi

snippetimport: ## Imports the provided snippet set [set=xyz file=xz.csv]
snippetimport: ##2 Imports the provided snippet set [set=xyz file=xz.csv]
php vendor/bin/phpunuhi import --configuration=./.phpunuhi.xml --set=$(set) --file=$(file) --intent=1

# ------------------------------------------------------------------------------------------------------------

pr: ## Prepares everything for a Pull Request
pr: ##2 Prepares everything for a Pull Request
@PHP_CS_FIXER_IGNORE_ENV=1 php vendor/bin/php-cs-fixer fix --config=./.php_cs.php
@make phpcheck -B
@make phpmin -B
@make stan -B
@make phpunit -B
@make infection -B
@make jest -B
@make stryker -B
@make eslint -B
@make eslint mode=no-dry-run -B
@make stylelint -B
@make configcheck -B
@make snippetcheck -B
@make stryker -B
@make infection -B

# -------------------------------------------------------------------------------------------------

release: ## Builds a PROD version and creates a ZIP file in plugins/.build.
release: ##3 Builds a PROD version and creates a ZIP file in plugins/.build.
ifneq (,$(findstring v12,$(NODE_VERSION)))
$(warning Attention, reqruires Node v14 or higher to build a release!)
@exit 1
Expand Down
31 changes: 14 additions & 17 deletions src/Components/ApplePayDirect/ApplePayDirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Kiener\MolliePayments\Service\OrderService;
use Kiener\MolliePayments\Service\SettingsService;
use Kiener\MolliePayments\Service\ShopService;
use Kiener\MolliePayments\Struct\Address\AddressStruct;
use Mollie\Api\Exceptions\ApiException;
use Shopware\Core\Checkout\Cart\Cart;
use Shopware\Core\Checkout\Cart\LineItem\LineItemCollection;
Expand Down Expand Up @@ -251,7 +252,7 @@ public function addProduct(string $productId, int $quantity, SalesChannelContext
{
# if we already have a backup cart, then do NOT backup again.
# because this could backup our temp. apple pay cart
if (!$this->cartBackupService->isBackupExisting($context)) {
if (! $this->cartBackupService->isBackupExisting($context)) {
$this->cartBackupService->backupCart($context);
}

Expand Down Expand Up @@ -348,7 +349,7 @@ public function restoreCart(SalesChannelContext $context): void
* @throws \Exception
* @return SalesChannelContext
*/
public function prepareCustomer(string $firstname, string $lastname, string $email, string $street, string $zipcode, string $city, string $countryCode, string $phone, string $paymentToken, int $acceptedDataProtection, SalesChannelContext $context): SalesChannelContext
public function prepareCustomer(string $firstname, string $lastname, string $email, string $street, string $zipcode, string $city, string $countryCode, string $phone, string $paymentToken, ?int $acceptedDataProtection, SalesChannelContext $context): SalesChannelContext
{
if (empty($paymentToken)) {
throw new \Exception('PaymentToken not found!');
Expand All @@ -359,28 +360,24 @@ public function prepareCustomer(string $firstname, string $lastname, string $ema

# if we are not logged in,
# then we have to create a new guest customer for our express order
if (!$this->customerService->isCustomerLoggedIn($context)) {
$customer = $this->customerService->createApplePayDirectCustomerIfNotExists(
$firstname,
$lastname,
$email,
$phone,
$street,
$zipcode,
$city,
$countryCode,
$acceptedDataProtection,
$context
if (! $this->customerService->isCustomerLoggedIn($context)) {
$address = new AddressStruct($firstname, $lastname, $email, $street, '', $zipcode, $city, $countryCode, $phone);

$customer = $this->customerService->createGuestAccount(
$address,
$applePayID,
$context,
$acceptedDataProtection
);

if (!$customer instanceof CustomerEntity) {
if (! $customer instanceof CustomerEntity) {
throw new \Exception('Error when creating customer!');
}

# now start the login of our customer.
# Our SalesChannelContext will be correctly updated after our
# forward to the finish-payment page.
$this->customerService->customerLogin($customer, $context);
$this->customerService->loginCustomer($customer, $context);
}

# also (always) update our payment method to use Apple Pay for our cart
Expand Down Expand Up @@ -455,7 +452,7 @@ public function createPayment(OrderEntity $order, string $shopwareReturnUrl, str
$transactions = $order->getTransactions();
$transaction = $transactions->last();

if (!$transaction instanceof OrderTransactionEntity) {
if (! $transaction instanceof OrderTransactionEntity) {
throw new \Exception('Created Apple Pay Direct order has not OrderTransaction!');
}

Expand Down
Loading

0 comments on commit 616c80a

Please sign in to comment.