Skip to content

Commit d7b4b9f

Browse files
committed
PLUG-104: Add instructions for testing webhooks locally and update docker config
1 parent 495d63c commit d7b4b9f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,13 @@ You can login as an admin user at http://localhost:1234/admin using the followin
6464

6565
| Username | Password |
6666
| -------- | -------- |
67-
| exampleuser | examplepassword123 |
67+
| exampleuser | examplepassword123 |
68+
69+
# Testing webhooks
70+
Webhook signature includes the path so make sure the webhook URL is configured in your Console and the path is set to rest/V1/webhook/transfer.
71+
The domain does not matter, as we will be using `truelayer-cli` to forward webhooks.
72+
73+
Run the following to forward webhooks to your local instance:
74+
```
75+
docker run --network="host" truelayer/truelayer-cli route-webhooks --to-addr http://localhost:1234/rest/V1/webhook/transfer --client-secret <client_secret> --client-id <client_id>
76+
```

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3.9"
22

33
services:
44
web:
5-
image: michielgerritsen/magento-project-community-edition:php81-fpm-magento2.4.4
5+
image: michielgerritsen/magento-project-community-edition:php81-fpm-magento2.4.6
66
ports:
77
- 1234:80
88
- 3307:3306
@@ -12,6 +12,6 @@ services:
1212
- DOCKER_BUILDKIT=1
1313
- COMPOSE_DOCKER_CLI_BUILD=1
1414
- DOCKER_DEFAULT_PLATFORM=linux/amd64
15-
- CUSTOM_ENTRYPOINT_COMMAND=php bin/magento module:disable Magento_TwoFactorAuth && composer require truelayer/magento2 --no-plugins --with-all-dependencies && php bin/magento module:enable TrueLayer_Connect && php bin/magento setup:upgrade && php bin/magento setup:di:compile
15+
- CUSTOM_ENTRYPOINT_COMMAND=php bin/magento module:disable {Magento_AdminAdobeImsTwoFactorAuth,Magento_TwoFactorAuth} && composer require truelayer/magento2 --no-plugins --with-all-dependencies && php bin/magento module:enable TrueLayer_Connect && php bin/magento setup:upgrade && php bin/magento setup:di:compile && php bin/magento config:set admin/security/password_lifetime 0 && php bin/magento config:set admin/security/password_is_forced 0 && php bin/magento cache:clean
1616
volumes:
1717
- ./:/data/extensions/tl-magento2

0 commit comments

Comments
 (0)