Skip to content

Commit

Permalink
Merge pull request #14 from TrueLayer/feature/PLUG-104
Browse files Browse the repository at this point in the history
PLUG-104: Add instructions for testing webhooks locally and update do…
  • Loading branch information
lighe authored May 2, 2024
2 parents 495d63c + d7b4b9f commit 5bd77fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,13 @@ You can login as an admin user at http://localhost:1234/admin using the followin

| Username | Password |
| -------- | -------- |
| exampleuser | examplepassword123 |
| exampleuser | examplepassword123 |

# Testing webhooks
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.
The domain does not matter, as we will be using `truelayer-cli` to forward webhooks.

Run the following to forward webhooks to your local instance:
```
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>
```
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.9"

services:
web:
image: michielgerritsen/magento-project-community-edition:php81-fpm-magento2.4.4
image: michielgerritsen/magento-project-community-edition:php81-fpm-magento2.4.6
ports:
- 1234:80
- 3307:3306
Expand All @@ -12,6 +12,6 @@ services:
- DOCKER_BUILDKIT=1
- COMPOSE_DOCKER_CLI_BUILD=1
- DOCKER_DEFAULT_PLATFORM=linux/amd64
- 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
- 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
volumes:
- ./:/data/extensions/tl-magento2

0 comments on commit 5bd77fb

Please sign in to comment.